initial commit

This commit is contained in:
hyung-hwan 2007-04-28 21:31:31 +00:00
parent 6acf470ccc
commit 2779dacb22
258 changed files with 10337 additions and 17385 deletions

22
ase/ase.bdsgroup Normal file
View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">Default.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{AEC503C7-4ABE-4581-B864-3F9D5490DBAC}</Option>
</Option>
</PersonalityInfo>
<Default.Personality> <Projects>
<Projects Name="aseawk.lib">awk\aseawk.bdsproj</Projects>
<Projects Name="asetestawk.exe">test\awk\asetestawk.bdsproj</Projects>
<Projects Name="Targets">aseawk.lib asetestawk.exe</Projects>
</Projects>
<Dependencies>
<Dependency GUID="{F0848980-053C-44B1-B7A0-4C834C1EB585}">
<Dependency GUID="{ECF01FD9-EC35-4278-B781-5106BC34F70E}"/>
</Dependency>
</Dependencies>
</Default.Personality>
</BorlandProject>

9
ase/awk/Argument.java Normal file
View File

@ -0,0 +1,9 @@
/*
* $Id: Argument.java,v 1.1 2007/10/15 16:10:09 bacon Exp $
*/
package ase.awk;
public class Argument
{
}

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.1 2007-04-22 13:51:44 bacon Exp $
* $Id: Awk.cpp,v 1.1 2007/04/30 05:47:33 bacon Exp $
*/
#include <ase/awk/Awk.hpp>

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.hpp,v 1.1 2007-04-22 13:51:44 bacon Exp $
* $Id: Awk.hpp,v 1.1 2007/04/30 05:47:33 bacon Exp $
*/
#ifndef _ASE_AWK_AWK_HPP_

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.java,v 1.27 2007-04-16 03:57:04 bacon Exp $
* $Id: Awk.java,v 1.1 2007/03/28 14:05:12 bacon Exp $
*
* {License}
*/
@ -35,7 +35,6 @@ public abstract class Awk
public static final int OPTION_STRIPSPACES = (1 << 11);
public static final int OPTION_NEXTOFILE = (1 << 12);
public static final int OPTION_CRLF = (1 << 13);
public static final int OPTION_ARGSTOMAIN = (1 << 14);
private long handle;

13
ase/awk/Clearable.java Normal file
View File

@ -0,0 +1,13 @@
/*
* $Id: Clearable.java,v 1.1 2007/11/02 05:49:19 bacon Exp $
*
* {License}
*/
package ase.awk;
public interface Clearable
{
public void clear ();
}

33
ase/awk/Console.java Normal file
View File

@ -0,0 +1,33 @@
/*
* $Id: Console.java,v 1.1 2007/05/26 10:23:52 bacon Exp $
*/
package ase.awk;
public class Console extends Extio
{
public static final int MODE_READ = MODE_CONSOLE_READ;
public static final int MODE_WRITE = MODE_CONSOLE_WRITE;
private Awk awk;
protected Console (Awk awk, Extio extio)
{
super (extio.getName(), TYPE_CONSOLE,
extio.getMode(), extio.getRunId());
setHandle (extio.getHandle());
this.awk = awk;
}
public void setFileName (String name) throws Exception
{
if (getMode() == MODE_READ)
{
awk.setfilename (getRunId(), name);
}
else
{
awk.setofilename (getRunId(), name);
}
}
}

15
ase/awk/Context.java Normal file
View File

@ -0,0 +1,15 @@
/*
* $Id: Context.java,v 1.1 2007/10/12 14:20:11 bacon Exp $
*/
package ase.awk;
public class Context
{
private long run;
Context (long run)
{
this.run = run;
}
}

View File

@ -1,5 +1,5 @@
/*
* $Id: Exception.java,v 1.4 2007-02-03 10:47:40 bacon Exp $
* $Id: Exception.java,v 1.1 2007/03/28 14:05:12 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: Extio.java,v 1.5 2007-02-03 10:47:40 bacon Exp $
* $Id: Extio.java,v 1.1 2007/03/28 14:05:13 bacon Exp $
*
* {License}
*/

22
ase/awk/File.java Normal file
View File

@ -0,0 +1,22 @@
/*
* $Id: File.java,v 1.1 2007/05/26 10:23:52 bacon Exp $
*/
package ase.awk;
public class File extends Extio
{
public static final int MODE_READ = MODE_FILE_READ;
public static final int MODE_WRITE = MODE_FILE_WRITE;
public static final int MODE_APPEND = MODE_FILE_APPEND;
private Awk awk;
protected File (Awk awk, Extio extio)
{
super (extio.getName(), TYPE_FILE,
extio.getMode(), extio.getRunId());
setHandle (extio.getHandle());
this.awk = awk;
}
}

44
ase/awk/IO.java Normal file
View File

@ -0,0 +1,44 @@
/*
* $Id: IO.java,v 1.1 2007/05/26 10:52:48 bacon Exp $
*/
package ase.awk;
class IO
{
protected Awk awk;
protected Extio extio;
protected Object handle;
protected IO (Awk awk, Extio extio)
{
this.awk = awk;
this.extio = extio;
}
public String getName ()
{
return extio.getName();
}
public int getMode ()
{
return extio.getMode();
}
public long getRunId ()
{
return extio.getRunId();
}
public void setHandle (Object handle)
{
this.handle = handle;
}
public Object getHandle ()
{
return handle;
}
}

21
ase/awk/Pipe.java Normal file
View File

@ -0,0 +1,21 @@
/*
* $Id: Pipe.java,v 1.1 2007/05/26 10:23:52 bacon Exp $
*/
package ase.awk;
public class Pipe extends Extio
{
public static final int MODE_READ = MODE_PIPE_READ;
public static final int MODE_WRITE = MODE_PIPE_WRITE;
private Awk awk;
protected Pipe (Awk awk, Extio extio)
{
super (extio.getName(), TYPE_PIPE,
extio.getMode(), extio.getRunId());
setHandle (extio.getHandle());
this.awk = awk;
}
}

9
ase/awk/Return.java Normal file
View File

@ -0,0 +1,9 @@
/*
* $Id: Return.java,v 1.1 2007/10/15 16:10:10 bacon Exp $
*/
package ase.awk;
public class Return
{
}

5
ase/awk/StdAwk.cpp Normal file
View File

@ -0,0 +1,5 @@
/*
* $Id: StdAwk.cpp,v 1.1 2007/05/05 12:03:35 bacon Exp $
*/
#include <ase/awk/StdAwk.hpp>

23
ase/awk/StdAwk.hpp Normal file
View File

@ -0,0 +1,23 @@
/*
* $Id: StdAwk.hpp,v 1.1 2007/05/05 12:03:35 bacon Exp $
*/
#ifndef _ASE_AWK_STDAWK_HPP_
#define _ASE_AWK_STDAWK_HPP_
#include <ase/awk/Awk.hpp>
namespace ASE
{
class StdAwk: public Awk
{
};
}
#endif

View File

@ -1,5 +1,5 @@
/*
* $Id: StdAwk.java,v 1.20 2007-04-12 10:50:05 bacon Exp $
* $Id: StdAwk.java,v 1.1 2007/03/28 14:05:13 bacon Exp $
*
* {License}
*/
@ -27,13 +27,9 @@ public abstract class StdAwk extends Awk
private long seed;
private java.util.Random random;
private final static Reader stdin =
new BufferedReader (new InputStreamReader (System.in));
private static Reader stdin = null;
private static Writer stdout = null;
private final static Writer stdout =
new BufferedWriter (new OutputStreamWriter (System.out));
/*
static
{
stdin = new BufferedReader (
@ -41,7 +37,6 @@ public abstract class StdAwk extends Awk
stdout = new BufferedWriter (
new OutputStreamWriter (System.out));
}
*/
public StdAwk () throws Exception
{
@ -49,23 +44,6 @@ public abstract class StdAwk extends Awk
seed = System.currentTimeMillis();
random = new java.util.Random (seed);
addBuiltinFunction ("sin", 1, 1);
addBuiltinFunction ("cos", 1, 1);
addBuiltinFunction ("tan", 1, 1);
addBuiltinFunction ("atan2", 1, 1);
addBuiltinFunction ("log", 1, 1);
addBuiltinFunction ("exp", 1, 1);
addBuiltinFunction ("sqrt", 1, 1);
addBuiltinFunction ("int", 1, 1);
addBuiltinFunction ("srand", 0, 1);
addBuiltinFunction ("rand", 0, 0);
addBuiltinFunction ("systime", 0, 0);
addBuiltinFunction ("strftime", 0, Integer.MAX_VALUE);
addBuiltinFunction ("system", 1, 1);
}
/* == major methods == */
@ -100,12 +78,12 @@ public abstract class StdAwk extends Awk
/* == source code names == */
protected String[] sourceInputNames () { return null; }
protected abstract String[] sourceInputNames ();
protected String[] sourceOutputNames () { return null; }
/* == console names == */
protected String[] consoleInputNames () { return null; }
protected String[] consoleOutputNames () { return null; }
protected abstract String[] consoleInputNames ();
protected abstract String[] consoleOutputNames ();
/* == source code == */
protected int openSource (int mode)
@ -439,7 +417,17 @@ public abstract class StdAwk extends Awk
{
Reader isr;
if (name == null || name.length() == 0) isr = StdAwk.stdin;
if (name == null || name.length() == 0)
{
//FileInputStream fis;
//fis = new FileInputStream (FileDescriptor.in);
//isr = new BufferedReader (new InputStreamReader (fis));
//isr = new BufferedReader (
// new InputStreamReader (System.in));
isr = StdAwk.stdin;
}
else
{
FileInputStream fis;
@ -455,7 +443,18 @@ public abstract class StdAwk extends Awk
{
Writer osw;
if (name == null || name.length() == 0) osw = StdAwk.stdout;
if (name == null || name.length() == 0)
{
//FileOutputStream fos;
//fos = new FileOutputStream (FileDescriptor.out);
//osw = new BufferedWriter (new OutputStreamWriter (fos));
//osw = new BufferedWriter(
// new OutputStreamWriter (System.out));
osw = StdAwk.stdout;
}
else
{
FileOutputStream fos;
@ -727,61 +726,55 @@ public abstract class StdAwk extends Awk
/* == arithmetic built-in functions */
public Object bfn_sin (long runid, Object[] args) throws Exception
public Object sin (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.sin(x));
}
public Object bfn_cos (long runid, Object[] args) throws Exception
public Object cos (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.cos(x));
}
public Object bfn_tan (long runid, Object[] args) throws Exception
public Object tan (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.tan(x));
}
public Object bfn_atan2 (long runid, Object[] args) throws Exception
public Object atan2 (long runid, Object[] args) throws Exception
{
double y = builtinFunctionArgumentToDouble (runid, args[0]);
double x = builtinFunctionArgumentToDouble (runid, args[1]);
return new Double (Math.atan2(y,x));
}
public Object bfn_log (long runid, Object[] args) throws Exception
public Object log (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.log(x));
}
public Object bfn_exp (long runid, Object[] args) throws Exception
public Object exp (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.exp(x));
}
public Object bfn_sqrt (long runid, Object[] args) throws Exception
public Object sqrt (long runid, Object[] args) throws Exception
{
double x = builtinFunctionArgumentToDouble (runid, args[0]);
return new Double (Math.sqrt(x));
}
public Object bfn_int (long runid, Object[] args) throws Exception
{
long x = builtinFunctionArgumentToLong (runid, args[0]);
return new Long (x);
}
public Object bfn_rand (long runid, Object[] args)
public Object rand (long runid, Object[] args)
{
return new Double (random.nextDouble ());
}
public Object bfn_srand (long runid, Object[] args) throws Exception
public Object srand (long runid, Object[] args) throws Exception
{
long prev_seed = seed;
@ -793,20 +786,8 @@ public abstract class StdAwk extends Awk
return new Long (prev_seed);
}
public Object bfn_systime (long runid, Object[] args)
{
long msec = System.currentTimeMillis ();
return new Long (msec / 1000);
}
public Object bfn_strftime (long runid, Object[] args)
{
// TODO: implement this...
return null;
}
/* miscellaneous built-in functions */
public Object bfn_system (long runid, Object[] args) throws Exception
public Object system (long runid, Object[] args) throws Exception
{
String str = builtinFunctionArgumentToString (runid, args[0]);
Process proc = null;

263
ase/awk/aseawk++.bdsproj Normal file
View File

@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppStaticLibrary</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{EDEF16CC-0C39-4E6B-A3CC-3DBF585BBD77}</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<Source>
<Source Name="MainSource">Awk.cpp</Source>
</Source>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="active" value="0"/>
<property category="build.config" name="count" value="1"/>
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="builddir" value="Debug"/>
<property category="build.config.0" name="key" value="Debug_Build"/>
<property category="build.config.0" name="name" value="Debug Build"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.config.0" name="type" value="Toolset"/>
<property category="build.config.0" name="win32.win32b.builddir" value="debug"/>
<property category="build.config.1" name="key" value="Release_Build"/>
<property category="build.config.1" name="name" value="Release Build"/>
<property category="build.config.1" name="settings.win32b" value="default"/>
<property category="build.config.1" name="type" value="Toolset"/>
<property category="build.config.1" name="win32.win32b.builddir" value="release"/>
<property category="build.node" name="libraries" value="vcl.lib rtl.lib"/>
<property category="build.node" name="name" value="aseawk++.lib"/>
<property category="build.node" name="packages" value="vclx;vcl;rtl;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;soaprtl;dsnap;bdertl;vcldbx"/>
<property category="build.node" name="sparelibs" value="rtl.lib vcl.lib"/>
<property category="build.node" name="use_packages" value="0"/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.Debug_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.config2.toolset" value="win32b"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.listfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.objfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.xreffile.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Od.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.k.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.1" value="debug\cpp"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.vi.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.y.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.brcc32" name="option.16.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.brcc32" name="option.31.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$O.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.1" value="DEBUG"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.V.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.Gn.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\debug"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.z.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zi.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.E.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\debug\lib"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.1" value="NDEBUG"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.O2.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.k.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.1" value="release\cpp"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.vi.enabled" value="1"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$D.enabled" value="0"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$O.enabled" value="1"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.V.enabled" value="0"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\release"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.z.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zi.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zn.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\release\lib"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.4.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.5.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.6.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.A.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.AK.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.AT.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.AU.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BDS)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.He.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Hs.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="..\.."/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BDS)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="$(BDS)\include\dinkumware"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BDS)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Jgi.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Jgx.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.O1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.O2.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Od.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.V0.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.V1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vmd.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vmm.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vms.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-2.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-3.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-5.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.b.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.disablewarns.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.noregistervars.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.p.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.pm.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.pr.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.ps.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.rd.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tW.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tWC.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWD.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWM.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.w.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.I.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.O.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.R.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.2" value="C:\Documents and Settings\evi\My Documents\Borland Studio Projects"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.3" value="$(BDS)\lib"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.4" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.U.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Gi.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BDS)\lib\psdk"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Tpd.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpe.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpp.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.ap.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.dynamicrtl.enabled" value="1"/>
<property category="win32.*.win32b.tlib" name="option.E.enabled" value="1"/>
<property category="win32.*.win32b.tlib" name="option.dynamicrtl.enabled" value="0"/>
<property category="win32.*.win32b.tlib" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.tlib" name="option.outputdir.enabled" value="0"/>
</optionset>
</project>
<FILELIST>
<FILE FILENAME="Awk.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="Awk" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="StdAwk.cpp" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="err" FORMNAME="" DESIGNCLASS=""/>
</FILELIST>
<IDEOPTIONS>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1033</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Debugging>
<Debugging Name="DebugSourceDirs"></Debugging>
</Debugging>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="RemoteHost"></Parameters>
<Parameters Name="RemotePath"></Parameters>
<Parameters Name="RemoteParams"></Parameters>
<Parameters Name="RemoteLauncher"></Parameters>
<Parameters Name="UseRemoteLauncher">False</Parameters>
<Parameters Name="RemoteCWD"></Parameters>
<Parameters Name="RemoteDebug">False</Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Linker>
<Linker Name="LibPrefix"></Linker>
<Linker Name="LibSuffix"></Linker>
<Linker Name="LibVersion"></Linker>
</Linker>
</IDEOPTIONS>
</BCBPROJECT>
<buildevents>
<buildevent file="aseawk++.bdsproj">
<precompile mode="0" cancancel="0" capture="-1" showconsole="0">mkdir $(PROJECTDIR)..\release\lib
mkdir $(PROJECTDIR)..\debug\lib
</precompile>
</buildevent>
</buildevents>
</CPlusPlusBuilder.Personality>
</BorlandProject>

122
ase/awk/aseawk++.dsp Normal file
View File

@ -0,0 +1,122 @@
# Microsoft Developer Studio Project File - Name="aseawk++" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=aseawk++ - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "aseawk++.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "aseawk++.mak" CFG="aseawk++ - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "aseawk++ - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "aseawk++ - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "aseawk++ - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../release/lib"
# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MT /Za /W3 /GX /O2 /I "..\.." /D "NDEBUG" /D "WIN32" /D "_UNICODE" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "aseawk++ - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../debug/lib"
# PROP Intermediate_Dir "debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MTd /Za /W3 /Gm /GX /ZI /Od /I "..\.." /D "_DEBUG" /D "WIN32" /D "_UNICODE" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "aseawk++ - Win32 Release"
# Name "aseawk++ - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\Awk.cpp
# End Source File
# Begin Source File
SOURCE=.\StdAwk.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\Awk.hpp
# End Source File
# Begin Source File
SOURCE=.\StdAwk.hpp
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

217
ase/awk/aseawk++.vcproj Normal file
View File

@ -0,0 +1,217 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="aseawk++"
ProjectGUID="{E7A8B741-4E9D-4ED4-9F77-E7F637A678A5}"
RootNamespace="aseawk++"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\..\debug\lib"
IntermediateDirectory=".\debug"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\.."
PreprocessorDefinitions="_DEBUG;WIN32"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
DisableLanguageExtensions="true"
PrecompiledHeaderFile=".\debug\aseawk++.pch"
AssemblerListingLocation=".\debug\"
ObjectFile=".\debug\"
ProgramDataBaseFileName=".\debug\"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile=".\..\debug\lib\aseawk++.lib"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\debug\lib\aseawk++.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\..\release\lib"
IntermediateDirectory=".\release"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\.."
PreprocessorDefinitions="NDEBUG;WIN32"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
DisableLanguageExtensions="true"
PrecompiledHeaderFile=".\release\aseawk++.pch"
AssemblerListingLocation=".\release\"
ObjectFile=".\release\"
ProgramDataBaseFileName=".\release\"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile=".\..\release\lib\aseawk++.lib"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\release\lib\aseawk++.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="Awk.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="Awk.hpp"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

274
ase/awk/aseawk.bdsproj Normal file
View File

@ -0,0 +1,274 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppStaticLibrary</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{EDEF16CC-0C39-4E6B-A3CC-3DBF585BBD77}</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<Source>
<Source Name="MainSource">awk.c</Source>
</Source>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="active" value="1"/>
<property category="build.config" name="count" value="1"/>
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="builddir" value="Debug"/>
<property category="build.config.0" name="key" value="Debug_Build"/>
<property category="build.config.0" name="name" value="Debug Win32"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.config.0" name="type" value="Toolset"/>
<property category="build.config.0" name="win32.win32b.builddir" value="..\debug\win32\bds"/>
<property category="build.config.1" name="key" value="Release_Build"/>
<property category="build.config.1" name="name" value="Release Win32"/>
<property category="build.config.1" name="settings.win32b" value="default"/>
<property category="build.config.1" name="type" value="Toolset"/>
<property category="build.config.1" name="win32.win32b.builddir" value="..\release\win32\bds"/>
<property category="build.node" name="lastconfig" value="Debug_Build"/>
<property category="build.node" name="libraries" value="vcl.lib rtl.lib"/>
<property category="build.node" name="name" value="aseawk.lib"/>
<property category="build.node" name="packages" value="vclx;vcl;rtl;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;soaprtl;dsnap;bdertl;vcldbx"/>
<property category="build.node" name="sparelibs" value="rtl.lib vcl.lib"/>
<property category="build.node" name="use_packages" value="0"/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.Debug_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.config2.toolset" value="win32b"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.listfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.objfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.xreffile.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Od.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.k.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.1" value="debug"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.vi.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.y.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.brcc32" name="option.16.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.brcc32" name="option.31.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$O.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.1" value="DEBUG"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.V.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.Gn.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\debug"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.z.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zi.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.E.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\debug\lib"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.1" value="NDEBUG"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.O2.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.k.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.1" value="release"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.vi.enabled" value="1"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$D.enabled" value="0"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$O.enabled" value="1"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.V.enabled" value="0"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\release"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.z.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zi.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zn.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\release\lib"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="container.SelectedOptimizations.containerenabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.4.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.5.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.6.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.A.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.AK.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.AU.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BDS)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.He.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Hs.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="..\.."/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="$(BDS)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="$(BDS)\include\dinkumware"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BDS)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Jgi.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Jgx.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.O1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.O2.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Od.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.V0.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.V1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vmd.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vmm.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.Vms.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-1.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-2.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-3.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.align-5.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.b.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.disablewarns.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.noregistervars.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.p.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.pm.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.pr.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.ps.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.rd.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tW.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tWC.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWD.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWM.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.w.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.I.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.O.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.R.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.2" value="C:\Documents and Settings\evi\My Documents\Borland Studio Projects"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.3" value="$(BDS)\lib"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.4" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.U.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.1" value="C:\projects\ase\awk"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Gi.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BDS)\lib\psdk"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Tpd.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpe.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpp.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.ap.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.dynamicrtl.enabled" value="1"/>
<property category="win32.*.win32b.tlib" name="option.E.enabled" value="1"/>
<property category="win32.*.win32b.tlib" name="option.dynamicrtl.enabled" value="0"/>
<property category="win32.*.win32b.tlib" name="option.outputdir.arg.merge" value="1"/>
<property category="win32.*.win32b.tlib" name="option.outputdir.enabled" value="0"/>
</optionset>
</project>
<FILELIST>
<FILE FILENAME="awk.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="awk" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="err.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="err" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="extio.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="extio" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="func.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="func" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="map.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="map" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="misc.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="misc" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="parse.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="parse" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="rec.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="rec" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="rex.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="rex" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="run.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="run" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="tab.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="tab" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="tree.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="tree" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="val.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="val" FORMNAME="" DESIGNCLASS=""/>
</FILELIST>
<IDEOPTIONS>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1033</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Debugging>
<Debugging Name="DebugSourceDirs"></Debugging>
</Debugging>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="RemoteHost"></Parameters>
<Parameters Name="RemotePath"></Parameters>
<Parameters Name="RemoteParams"></Parameters>
<Parameters Name="RemoteLauncher"></Parameters>
<Parameters Name="UseRemoteLauncher">False</Parameters>
<Parameters Name="RemoteCWD"></Parameters>
<Parameters Name="RemoteDebug">False</Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Linker>
<Linker Name="LibPrefix"></Linker>
<Linker Name="LibSuffix"></Linker>
<Linker Name="LibVersion"></Linker>
</Linker>
</IDEOPTIONS>
</BCBPROJECT>
<buildevents>
<buildevent file="aseawk.bdsproj">
<precompile mode="0" cancancel="0" capture="-1" showconsole="0">mkdir $(PROJECTDIR)..\release\lib
mkdir $(PROJECTDIR)..\debug\lib
</precompile>
</buildevent>
</buildevents>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JNI_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\.." /I "C:\Program Files\java\jdk1.5.0_09\include" /I "C:\Program Files\java\jdk1.5.0_09\include\win32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /FD /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "JNI_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "$(JAVA_HOME)\include" /I "$(JAVA_HOME)\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\.." /I "C:\Program Files\java\jdk1.5.0_09\include" /I "C:\Program Files\java\jdk1.5.0_09\include\win32" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "_USRDLL" /FD /GZ /c
# SUBTRACT CPP /YX
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.c,v 1.119 2007-03-22 10:31:23 bacon Exp $
* $Id: awk.c,v 1.1 2007/03/28 14:05:13 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.h,v 1.214 2007-04-15 15:26:57 bacon Exp $
* $Id: awk.h,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/
@ -187,10 +187,7 @@ enum
ASE_AWK_NEXTOFILE = (1 << 12),
/* cr + lf by default */
ASE_AWK_CRLF = (1 << 13),
/* pass the arguments to the main function */
ASE_AWK_ARGSTOMAIN = (1 << 14)
ASE_AWK_CRLF = (1 << 13)
};
/* error code */

View File

@ -1,5 +1,5 @@
/*
* $Id: awk_i.h,v 1.111 2007-03-04 15:04:40 bacon Exp $
* $Id: awk_i.h,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

155
ase/awk/dmc-msw.mak Normal file
View File

@ -0,0 +1,155 @@
NAME = aseawk
JNI =
JNI_INC = \
-I"$(JAVA_HOME)/include" \
-I"$(JAVA_HOME)/include\win32"
CC = dmc
CXX = dmc
LD = link
AR = lib
JAVAC = javac
CFLAGS = -mn -I../.. $(JNI_INC)
CXXFLAGS = -cpp -mn -I../.. $(JNI_INC)
JAVACFLAGS = -classpath ../.. -Xlint:unchecked
MODE=debug
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
OUT_FILE_JNI = $(OUT_DIR)\lib$(NAME)_jni.la
OUT_FILE_LIB_CXX = $(OUT_DIR)\$(NAME)pp.lib
OUT_FILE_JAR = $(OUT_DIR)/$(NAME).jar
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)/cxx
OBJ_FILES_LIB = \
$(TMP_DIR)\awk.obj \
$(TMP_DIR)\err.obj \
$(TMP_DIR)\tree.obj \
$(TMP_DIR)\tab.obj \
$(TMP_DIR)\map.obj \
$(TMP_DIR)\parse.obj \
$(TMP_DIR)\run.obj \
$(TMP_DIR)\rec.obj \
$(TMP_DIR)\val.obj \
$(TMP_DIR)\func.obj \
$(TMP_DIR)\misc.obj \
$(TMP_DIR)\extio.obj \
$(TMP_DIR)\rex.obj
OBJ_FILES_JNI = $(TMP_DIR)\jni.obj
OBJ_FILES_LIB_CXX = \
$(TMP_DIR)\cxx\Awk.obj \
$(TMP_DIR)\cxx\StdAwk.obj
OBJ_FILES_JAR = \
$(TMP_DIR)/ase/awk/Awk.class \
$(TMP_DIR)/ase/awk/StdAwk.class \
$(TMP_DIR)/ase/awk/Extio.class \
$(TMP_DIR)/ase/awk/IO.class \
$(TMP_DIR)/ase/awk/Console.class \
$(TMP_DIR)/ase/awk/File.class \
$(TMP_DIR)/ase/awk/Pipe.class \
$(TMP_DIR)/ase/awk/Exception.class
lib: build$(JNI)
build: $(OUT_FILE_LIB)
buildjni: build $(OUT_FILE_JNI)
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) -c $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
$(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OUT_FILE_LIB) $(OBJ_FILES_LIB_CXX)
$(AR) -c $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
$(TMP_DIR)\awk.obj: awk.c
$(CC) $(CFLAGS) -o$@ -c awk.c
$(TMP_DIR)\err.obj: err.c
$(CC) $(CFLAGS) -o$@ -c err.c
$(TMP_DIR)\tree.obj: tree.c
$(CC) $(CFLAGS) -o$@ -c tree.c
$(TMP_DIR)\tab.obj: tab.c
$(CC) $(CFLAGS) -o$@ -c tab.c
$(TMP_DIR)\map.obj: map.c
$(CC) $(CFLAGS) -o$@ -c map.c
$(TMP_DIR)\parse.obj: parse.c
$(CC) $(CFLAGS) -o$@ -c parse.c
$(TMP_DIR)\run.obj: run.c
$(CC) $(CFLAGS) -o$@ -c run.c
$(TMP_DIR)\rec.obj: rec.c
$(CC) $(CFLAGS) -o$@ -c rec.c
$(TMP_DIR)\val.obj: val.c
$(CC) $(CFLAGS) -o$@ -c val.c
$(TMP_DIR)\func.obj: func.c
$(CC) $(CFLAGS) -o$@ -c func.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(TMP_DIR)\extio.obj: extio.c
$(CC) $(CFLAGS) -o$@ -c extio.c
$(TMP_DIR)\rex.obj: rex.c
$(CC) $(CFLAGS) -o$@ -c rex.c
$(TMP_DIR)\jni.obj: jni.c
$(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c
$(TMP_DIR)\cxx\Awk.obj: Awk.cpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
$(TMP_DIR)\cxx\StdAwk.obj: StdAwk.cpp StdAwk.hpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c StdAwk.cpp
$(TMP_DIR)/ase/awk/Awk.class: Awk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Awk.java
$(TMP_DIR)/ase/awk/StdAwk.class: StdAwk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) StdAwk.java
$(TMP_DIR)/ase/awk/Extio.class: Extio.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Extio.java
$(TMP_DIR)/ase/awk/IO.class: IO.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) IO.java
$(TMP_DIR)/ase/awk/Console.class: Console.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Console.java
$(TMP_DIR)/ase/awk/File.class: File.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) File.java
$(TMP_DIR)/ase/awk/Pipe.class: Pipe.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Pipe.java
$(TMP_DIR)/ase/awk/Exception.class: Exception.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
$(TMP_DIR_CXX): $(TMP_DIR)
md $(TMP_DIR)/cxx
clean:
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_JAR) $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OBJ_FILES_LIB_CXX)

View File

@ -1,5 +1,5 @@
/*
* $Id: err.c,v 1.97 2007-03-22 10:31:24 bacon Exp $
* $Id: err.c,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: extio.c,v 1.79 2007-03-22 10:31:24 bacon Exp $
* $Id: extio.c,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: extio.h,v 1.18 2007-02-23 08:17:49 bacon Exp $
* $Id: extio.h,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: func.c,v 1.102 2007-03-20 10:44:44 bacon Exp $
* $Id: func.c,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: func.h,v 1.18 2007-02-03 10:47:41 bacon Exp $
* $Id: func.h,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -0,0 +1,34 @@
#
# generrcode.awk
#
# aseawk -f generrcode-java.awk awk.h
#
BEGIN {
collect=0;
tab2="\t";
tab3="\t\t";
count=0;
}
/^[[:space:]]*enum[[:space:]]+ase_awk_errnum_t[[:space:]]*$/ {
collect=1;
print tab2 "// generated by generrcode-java.awk";
#print tab2 "enum ErrorCode";
#print tab2 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
#print tab2 "};";
print tab2 "// end of error codes";
print "";
collect=0;
}
collect && /^[[:space:]]*ASE_AWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab2 "public static final int " substr (name,10,length(name)-9) " = " count++ ";";
}

View File

@ -0,0 +1,34 @@
#
# generrcode-net.awk
#
# aseawk -f generrcode-net.awk awk.h
#
BEGIN {
collect=0;
tab3="\t\t";
tab4="\t\t\t";
}
/^[[:space:]]*enum[[:space:]]+ase_awk_errnum_t[[:space:]]*$/ {
collect=1;
print tab3 "// generated by generrcode-net.awk";
print tab3 "enum class ERROR: int";
print tab3 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
print tab3 "};";
print tab3 "// end of enum class ERROR";
print "";
collect=0;
}
collect && /^[[:space:]]*ASE_AWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
x = substr (name,10,length(name)-9);
print tab4 x " = ASE::Awk::ERR_" x ",";
}

33
ase/awk/generrcode.awk Normal file
View File

@ -0,0 +1,33 @@
#
# generrcode.awk
#
# aseawk -f generror.awk awk.h
#
BEGIN {
collect=0;
tab3="\t\t";
tab4="\t\t\t";
}
/^[[:space:]]*enum[[:space:]]+ase_awk_errnum_t[[:space:]]*$/ {
collect=1;
print tab3 "// generated by generrcode.awk";
print tab3 "enum ErrorCode";
print tab3 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
print tab3 "};";
print tab3 "// end of enum ErrorCode";
print "";
collect=0;
}
collect && /^[[:space:]]*ASE_AWK_E[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab4 "E_" substr (name,10,length(name)-9) " = " name ",";
}

33
ase/awk/genoptcode.awk Normal file
View File

@ -0,0 +1,33 @@
#
# genoptcode.awk
#
# aseawk -f generror.awk awk.h
#
BEGIN {
collect=0;
tab3="\t\t";
tab4="\t\t\t";
}
/^[[:space:]]*enum[[:space:]]+ase_awk_option_t[[:space:]]*$/ {
collect=1;
print tab3 "// generated by genoptcode.awk";
print tab3 "enum Option";
print tab3 "{";
}
collect && /^[[:space:]]*};[[:space:]]*$/ {
print tab3 "};";
print tab3 "// end of enum Option";
print "";
collect=0;
}
collect && /^[[:space:]]*ASE_AWK_[[:alnum:]]+/ {
split ($1, flds, ",");
name=flds[1];
print tab4 "OPT_" substr (name,9,length(name)-8) " = " name ",";
}

25
ase/awk/jni-dmc.def Normal file
View File

@ -0,0 +1,25 @@
LIBRARY "aseawk_jni.dll"
EXETYPE NT
EXPORTS
Java_ase_awk_Awk_open
Java_ase_awk_Awk_close
Java_ase_awk_Awk_parse
Java_ase_awk_Awk_run
Java_ase_awk_Awk_stop
Java_ase_awk_Awk_getmaxdepth
Java_ase_awk_Awk_setmaxdepth
Java_ase_awk_Awk_getoption
Java_ase_awk_Awk_setoption
Java_ase_awk_Awk_getdebug
Java_ase_awk_Awk_setdebug
Java_ase_awk_Awk_addfunc
Java_ase_awk_Awk_delfunc
Java_ase_awk_Awk_setfilename
Java_ase_awk_Awk_setofilename
Java_ase_awk_Awk_strtonum
Java_ase_awk_Awk_valtostr
Java_ase_awk_Awk_strftime
Java_ase_awk_Awk_strfgmtime
Java_ase_awk_Awk_system

View File

@ -1,5 +1,5 @@
/*
* $Id: jni.c,v 1.77 2007-04-11 15:21:24 bacon Exp $
* $Id: jni.c,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/
@ -1429,28 +1429,24 @@ static int __handle_bfn (
env = run_data->env;
obj = run_data->obj;
/*if (fnl > 0 && ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t))*/
if (fnl > 0 && ASE_SIZEOF(jchar) != ASE_SIZEOF(ase_char_t))
{
ase_size_t i;
jchar* tmp = (jchar*) malloc (ASE_SIZEOF(jchar)*(fnl+4));
jchar* tmp = (jchar*) malloc (ASE_SIZEOF(jchar)*fnl);
if (tmp == NULL)
{
ase_awk_setrunerrnum (run, ASE_AWK_ENOMEM);
return -1;
}
tmp[0] = (jchar*)'b';
tmp[1] = (jchar*)'f';
tmp[2] = (jchar*)'n';
tmp[3] = (jchar*)'_';
for (i = 0; i < fnl; i++) tmp[i+4] = (jchar)fnm[i];
name = (*env)->NewString (env, tmp, fnl+4);
for (i = 0; i < fnl; i++) tmp[i] = (jchar)fnm[i];
name = (*env)->NewString (env, tmp, fnl);
free (tmp);
}
/*else
else
{
name = (*env)->NewString (env, (jchar*)fnm, fnl);
}*/
}
if (name == NULL)
{

View File

@ -1,5 +1,5 @@
/*
* $Id: jni.h,v 1.22 2007-02-03 10:47:41 bacon Exp $
* $Id: jni.h,v 1.1 2007/03/28 14:05:15 bacon Exp $
*
* {License}
*/

View File

@ -1,40 +1,24 @@
#
# $Id: makefile.in,v 1.42 2007-04-22 13:51:44 bacon Exp $
# $Id: makefile.in,v 1.1 2007/03/28 14:05:15 bacon Exp $
#
NAME = aseawk
TOP_BUILDDIR = @abs_top_builddir@
TOP_INSTALLDIR = @prefix@/ase
CC = @CC@
CXX = @CXX@
AR = ar
MAKE = @MAKE@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/..
CXXFLAGS = @CXXFLAGS@ -I@abs_top_builddir@/..
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
MODE = @BUILDMODE@
JAVAC = @JAVAC@
JAR = @JAR@
CFLAGS_JNI = @CFLAGS_JNI@
JNI = @JNI@
LIBTOOL_COMPILE = ../libtool --mode=compile
LIBTOOL_LINK = ../libtool --mode=link
OUT_DIR = ../$(MODE)/lib
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).a
OUT_FILE_JNI = $(OUT_DIR)/lib$(NAME)_jni.la
OUT_FILE_LIB_CXX = $(OUT_DIR)/lib$(NAME)++.a
OUT_FILE_JAR = $(OUT_DIR)/$(NAME).jar
OUT_FILE = $(OUT_DIR)/lib$(NAME).a
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)/cxx
OBJ_FILES_LIB = \
OBJ_FILES = \
$(TMP_DIR)/awk.o \
$(TMP_DIR)/err.o \
$(TMP_DIR)/tree.o \
@ -49,94 +33,50 @@ OBJ_FILES_LIB = \
$(TMP_DIR)/extio.o \
$(TMP_DIR)/rex.o
OBJ_FILES_JNI = $(TMP_DIR)/jni.o
lib: $(OUT_FILE)
OBJ_FILES_LIB_CXX = \
$(OBJ_FILES_LIB) \
$(TMP_DIR)/cxx/Awk.o
$(OUT_FILE): $(OBJ_FILES) $(OUT_DIR)
$(AR) cr $(OUT_FILE) $(OBJ_FILES)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE); fi
$(TMP_DIR)/awk.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c awk.c
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
$(TMP_DIR)/err.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c err.c
OBJ_FILES_JAR = \
$(TMP_DIR)/ase/awk/Awk.class \
$(TMP_DIR)/ase/awk/StdAwk.class \
$(TMP_DIR)/ase/awk/Extio.class \
$(TMP_DIR)/ase/awk/Exception.class
$(TMP_DIR)/tree.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c tree.c
lib: build$(JNI)
$(TMP_DIR)/tab.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c tab.c
build: $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
$(TMP_DIR)/map.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c map.c
buildjni: build $(OUT_FILE_JNI)
$(TMP_DIR)/parse.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c parse.c
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) cr $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE_LIB); fi
$(TMP_DIR)/run.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c run.c
$(OUT_FILE_JNI): $(TMP_DIR) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OUT_FILE_LIB)
$(LIBTOOL_LINK) $(CC) -rpath $(TOP_INSTALLDIR)/lib -version-info 1:0:0 -o $(OUT_FILE_JNI) $(OBJ_FILES_SO) -lm -L$(OUT_DIR) -l$(NAME) -lasecmn -laseutl
$(JAR) -Mcvf $(OUT_FILE_JAR) -C $(TMP_DIR) ase
$(TMP_DIR)/rec.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c rec.c
$(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OBJ_FILES_LIB_CXX)
$(AR) cr $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE_LIB_CXX); fi
$(TMP_DIR)/val.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c val.c
$(TMP_DIR)/awk.o: awk.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c awk.c
$(TMP_DIR)/func.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c func.c
$(TMP_DIR)/err.o: err.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c err.c
$(TMP_DIR)/misc.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c misc.c
$(TMP_DIR)/tree.o: tree.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tree.c
$(TMP_DIR)/extio.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c extio.c
$(TMP_DIR)/tab.o: tab.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tab.c
$(TMP_DIR)/map.o: map.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c map.c
$(TMP_DIR)/parse.o: parse.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c parse.c
$(TMP_DIR)/run.o: run.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c run.c
$(TMP_DIR)/rec.o: rec.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rec.c
$(TMP_DIR)/val.o: val.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c val.c
$(TMP_DIR)/func.o: func.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c func.c
$(TMP_DIR)/misc.o: misc.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c misc.c
$(TMP_DIR)/extio.o: extio.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c extio.c
$(TMP_DIR)/rex.o: rex.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rex.c
$(TMP_DIR)/jni.o: jni.c
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c
$(TMP_DIR)/ase/awk/Awk.class:
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Awk.java
$(TMP_DIR)/ase/awk/StdAwk.class:
$(JAVAC) -classpath ../.. -d $(TMP_DIR) StdAwk.java
$(TMP_DIR)/ase/awk/Extio.class:
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Extio.java
$(TMP_DIR)/ase/awk/Exception.class:
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
$(TMP_DIR)/cxx/Awk.o:
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
$(TMP_DIR)/rex.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c rex.c
$(OUT_DIR):
mkdir -p $(OUT_DIR)
@ -144,9 +84,6 @@ $(OUT_DIR):
$(TMP_DIR):
mkdir -p $(TMP_DIR)
$(TMP_DIR_CXX): $(TMP_DIR)
mkdir -p $(TMP_DIR)/cxx
clean:
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_JAR) $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OBJ_FILES_LIB_CXX)
rm -rf $(OUT_FILE) $(OBJ_FILES)

47
ase/awk/makefile.lnx.gcc Normal file
View File

@ -0,0 +1,47 @@
OUT = aseawk
C_SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \
run.c rec.c val.c func.c misc.c extio.c rex.c
JNI_SRCS = jni.c
JAVA_SRCS = Exception.java Extio.java Awk.java StdAwk.java
C_OBJS = $(C_SRCS:.c=.o)
JNI_OBJS = $(JNI_SRCS:.c=.o)
JAVA_OBJS = $(JAVA_SRCS:.java=.class)
JNI_INCPATH= \
-I"$(JAVA_HOME)/include" \
-I"$(JAVA_HOME)/include/linux"
CC = gcc
AR = ar
LD = ld
RANLIB = ranlib
CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -I../.. $(JNI_INCPATH)
LDFLAGS =
LIBS =
JAVAC = javac
JAVACFLAGS = -classpath ../..
all: lib jni
lib: $(C_OBJS)
$(AR) cr lib$(OUT).a $(C_OBJS)
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
$(CC) -shared -o $(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT)
#$(CC) -fPIC -shared -static-libgcc -o $(OUT)_jni.so -L. -laseawk -lm libaseawk.a jni.o
#$(LD) -fPIC -shared -soname lib$(OUT).so -o $(OUT)_jni.so -L . -l aseawk jni.o
clean:
rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) lib$(OUT).a lib$(OUT).so *.o
.SUFFIXES: .c .o .java .class
.c.o:
$(CC) $(CFLAGS) -c $<
.java.class:
$(JAVAC) $(JAVACFLAGS) $<

41
ase/awk/makefile.mac.gcc Normal file
View File

@ -0,0 +1,41 @@
OUT = aseawk
C_SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \
run.c rec.c val.c func.c misc.c extio.c rex.c
JNI_SRCS = jni.c
JAVA_SRCS = Exception.java Extio.java Awk.java StdAwk.java
C_OBJS = $(C_SRCS:.c=.o)
JNI_OBJS = $(JNI_SRCS:.c=.o)
JAVA_OBJS = $(JAVA_SRCS:.java=.class)
CC = gcc
AR = ar
LD = ld
RANLIB = ranlib
CFLAGS = -Wall -O2 -D_REENTRANT -D_THREAD_SAFE -I../..
LDFLAGS =
LIBS =
JAVAC = javac
JAVACFLAGS = -classpath ../..
all: lib jni
lib: $(C_OBJS)
$(AR) cr lib$(OUT).a $(C_OBJS)
ranlib lib$(OUT).a
jni: lib $(JNI_OBJS) $(JAVA_OBJS)
$(CC) -bundle -o $(OUT)_jni.so $(JNI_OBJS) -lm -L. -l$(OUT)
clean:
rm -rf $(C_OBJS) $(JNI_OBJS) $(JAVA_OBJS) lib$(OUT).a lib$(OUT).so *.o
.SUFFIXES: .c .o .java .class
.c.o:
$(CC) $(CFLAGS) -c $<
.java.class:
$(JAVAC) $(JAVACFLAGS) $<

View File

@ -17,8 +17,8 @@ CC = cl
LD = link
JAVAC = javac
#CFLAGS = /nologo /O2 /MT /W3 /GR- /GS- /Za -I../.. $(JNI_INC)
CFLAGS = /nologo /O2 /MT /W3 /GR- /GS- -I../.. $(JNI_INC)
#CFLAGS = /nologo /O2 /MT /W3 /GR- /Za -I../.. $(JNI_INC)
CFLAGS = /nologo /O2 /MT /W3 /GR- -I../.. $(JNI_INC)
JAVACFLAGS = -classpath ../.. -Xlint:unchecked
all: lib

View File

@ -1,5 +1,5 @@
/*
* $Id: map.c,v 1.39 2007-04-24 14:42:24 bacon Exp $
* $Id: map.c,v 1.1 2007/03/28 14:05:16 bacon Exp $
*
* {License}
*/
@ -9,13 +9,13 @@
/* TODO: improve the entire map routines.
support automatic bucket resizing and remaping, etc. */
static ase_size_t hashkey (const ase_char_t* keyptr, ase_size_t keylen);
static ase_size_t hash (const ase_char_t* key, ase_size_t key_len);
#define FREE_PAIR(map,pair) \
do { \
ASE_AWK_FREE ((map)->awk, (ase_char_t*)PAIR_KEYPTR(pair)); \
ASE_AWK_FREE ((map)->awk, (ase_char_t*)(pair)->key); \
if ((map)->freeval != ASE_NULL) \
(map)->freeval ((map)->owner, PAIR_VAL(pair)); \
(map)->freeval ((map)->owner, (pair)->val); \
ASE_AWK_FREE ((map)->awk, pair); \
} while (0)
@ -70,7 +70,7 @@ void ase_awk_map_clear (ase_awk_map_t* map)
while (pair != ASE_NULL)
{
next = PAIR_LNK(pair);
next = pair->next;
FREE_PAIR (map, pair);
map->size--;
pair = next;
@ -86,53 +86,52 @@ ase_size_t ase_awk_map_getsize (ase_awk_map_t* map)
}
ase_awk_pair_t* ase_awk_map_get (
ase_awk_map_t* map, const ase_char_t* keyptr, ase_size_t keylen)
ase_awk_map_t* map, const ase_char_t* key, ase_size_t key_len)
{
ase_awk_pair_t* pair;
ase_size_t hc;
hc = hashkey(keyptr,keylen) % map->capa;
hc = hash(key,key_len) % map->capa;
pair = map->buck[hc];
while (pair != ASE_NULL)
{
if (ase_strxncmp (
PAIR_KEYPTR(pair), PAIR_KEYLEN(pair),
keyptr, keylen) == 0) return pair;
pair->key, pair->key_len,
key, key_len) == 0) return pair;
pair = PAIR_LNK(pair);
pair = pair->next;
}
return ASE_NULL;
}
ase_awk_pair_t* ase_awk_map_put (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen, void* val)
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len, void* val)
{
int n;
ase_awk_pair_t* px;
n = ase_awk_map_putx (map, keyptr, keylen, val, &px);
n = ase_awk_map_putx (map, key, key_len, val, &px);
if (n < 0) return ASE_NULL;
return px;
}
int ase_awk_map_putx (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen,
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len,
void* val, ase_awk_pair_t** px)
{
ase_awk_pair_t* pair;
ase_size_t hc;
hc = hashkey(keyptr,keylen) % map->capa;
hc = hash(key,key_len) % map->capa;
pair = map->buck[hc];
while (pair != ASE_NULL)
{
if (ase_strxncmp (
PAIR_KEYPTR(pair), PAIR_KEYLEN(pair),
keyptr, keylen) == 0)
pair->key, pair->key_len, key, key_len) == 0)
{
if (px != ASE_NULL)
*px = ase_awk_map_setpair (map, pair, val);
@ -141,25 +140,26 @@ int ase_awk_map_putx (
return 0; /* value changed for the existing key */
}
pair = PAIR_LNK(pair);
pair = pair->next;
}
pair = (ase_awk_pair_t*) ASE_AWK_MALLOC (
map->awk, ASE_SIZEOF(ase_awk_pair_t));
if (pair == ASE_NULL) return -1; /* error */
/*pair->key = key;*/
/* duplicate the key if it is new */
PAIR_KEYPTR(pair) = ase_strxdup (
keyptr, keylen, &map->awk->prmfns.mmgr);
if (PAIR_KEYPTR(pair) == ASE_NULL)
pair->key = ase_strxdup (key, key_len, &map->awk->prmfns.mmgr);
if (pair->key == ASE_NULL)
{
ASE_AWK_FREE (map->awk, pair);
return -1; /* error */
}
PAIR_KEYLEN(pair) = keylen;
PAIR_VAL(pair) = val;
PAIR_LNK(pair) = map->buck[hc];
pair->key_len = key_len;
pair->val = val;
pair->next = map->buck[hc];
map->buck[hc] = pair;
map->size++;
@ -168,37 +168,35 @@ int ase_awk_map_putx (
}
ase_awk_pair_t* ase_awk_map_set (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen, void* val)
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len, void* val)
{
ase_awk_pair_t* pair;
ase_size_t hc;
hc = hashkey(keyptr,keylen) % map->capa;
hc = hash(key,key_len) % map->capa;
pair = map->buck[hc];
while (pair != ASE_NULL)
{
if (ase_strxncmp (
PAIR_KEYPTR(pair), PAIR_KEYLEN(pair),
keyptr, keylen) == 0)
pair->key, pair->key_len, key, key_len) == 0)
{
return ase_awk_map_setpair (map, pair, val);
}
pair = PAIR_LNK(pair);
pair = pair->next;
}
return ASE_NULL;
}
ase_awk_pair_t* ase_awk_map_getpair (
ase_awk_map_t* map, const ase_char_t* keyptr, ase_size_t keylen,
void** val)
ase_awk_map_t* map, const ase_char_t* key, ase_size_t key_len, void** val)
{
ase_awk_pair_t* pair;
pair = ase_awk_map_get (map, keyptr, keylen);
pair = ase_awk_map_get (map, key, key_len);
if (pair == ASE_NULL) return ASE_NULL;
*val = PAIR_VAL(pair);
*val = pair->val;
return pair;
}
@ -207,37 +205,35 @@ ase_awk_pair_t* ase_awk_map_setpair (
ase_awk_map_t* map, ase_awk_pair_t* pair, void* val)
{
/* use this function with care */
if (PAIR_VAL(pair) != val)
if (pair->val != val)
{
if (map->freeval != ASE_NULL)
{
map->freeval (map->owner, PAIR_VAL(pair));
map->freeval (map->owner, pair->val);
}
PAIR_VAL(pair) = val;
pair->val = val;
}
return pair;
}
int ase_awk_map_remove (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen)
int ase_awk_map_remove (ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len)
{
ase_awk_pair_t* pair, * prev;
ase_size_t hc;
hc = hashkey(keyptr,keylen) % map->capa;
hc = hash(key,key_len) % map->capa;
pair = map->buck[hc];
prev = ASE_NULL;
while (pair != ASE_NULL)
{
if (ase_strxncmp (
PAIR_KEYPTR(pair), PAIR_KEYLEN(pair),
keyptr, keylen) == 0)
pair->key, pair->key_len, key, key_len) == 0)
{
if (prev == ASE_NULL)
map->buck[hc] = PAIR_LNK(pair);
else prev->next = PAIR_LNK(pair);
map->buck[hc] = pair->next;
else prev->next = pair->next;
FREE_PAIR (map, pair);
map->size--;
@ -246,7 +242,7 @@ int ase_awk_map_remove (
}
prev = pair;
pair = PAIR_LNK(pair);
pair = pair->next;
}
return -1;
@ -264,7 +260,7 @@ int ase_awk_map_walk (ase_awk_map_t* map,
while (pair != ASE_NULL)
{
next = PAIR_LNK(pair);
next = pair->next;
if (walker(pair,arg) == -1) return -1;
pair = next;
}
@ -273,16 +269,16 @@ int ase_awk_map_walk (ase_awk_map_t* map,
return 0;
}
static ase_size_t hashkey (const ase_char_t* keyptr, ase_size_t keylen)
static ase_size_t hash (const ase_char_t* key, ase_size_t key_len)
{
ase_size_t n = 0, i;
const ase_char_t* end = keyptr + keylen;
const ase_char_t* end = key + key_len;
while (keyptr < end)
while (key < end)
{
ase_byte_t* bp = (ase_byte_t*)keyptr;
for (i = 0; i < ASE_SIZEOF(*keyptr); i++) n = n * 31 + *bp++;
keyptr++;
ase_byte_t* bp = (ase_byte_t*)key;
for (i = 0; i < ASE_SIZEOF(*key); i++) n = n * 31 + *bp++;
key++;
}
return n;

View File

@ -1,5 +1,5 @@
/*
* $Id: map.h,v 1.21 2007-04-24 14:42:24 bacon Exp $
* $Id: map.h,v 1.1 2007/03/28 14:05:16 bacon Exp $
*
* {License}
*/
@ -16,12 +16,8 @@ typedef struct ase_awk_pair_t ase_awk_pair_t;
struct ase_awk_pair_t
{
struct
{
ase_char_t* ptr;
ase_size_t len;
} key;
ase_char_t* key;
ase_size_t key_len;
void* val;
ase_awk_pair_t* next;
};
@ -37,11 +33,6 @@ struct ase_awk_map_t
ase_bool_t __dynamic;
};
#define PAIR_KEYPTR(p) ((p)->key.ptr)
#define PAIR_KEYLEN(p) ((p)->key.len)
#define PAIR_VAL(p) ((p)->val)
#define PAIR_LNK(p) ((p)->next)
#ifdef __cplusplus
extern "C" {
#endif
@ -57,27 +48,25 @@ void ase_awk_map_clear (ase_awk_map_t* map);
ase_size_t ase_awk_map_getsize (ase_awk_map_t* map);
ase_awk_pair_t* ase_awk_map_get (
ase_awk_map_t* map, const ase_char_t* keyptr, ase_size_t keylen);
ase_awk_map_t* map, const ase_char_t* key, ase_size_t key_len);
ase_awk_pair_t* ase_awk_map_put (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen, void* val);
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len, void* val);
int ase_awk_map_putx (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen,
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len,
void* val, ase_awk_pair_t** px);
ase_awk_pair_t* ase_awk_map_set (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen, void* val);
ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len, void* val);
ase_awk_pair_t* ase_awk_map_getpair (
ase_awk_map_t* map, const ase_char_t* keyptr, ase_size_t keylen,
void** val);
ase_awk_map_t* map, const ase_char_t* key, ase_size_t key_len, void** val);
ase_awk_pair_t* ase_awk_map_setpair (
ase_awk_map_t* map, ase_awk_pair_t* pair, void* val);
int ase_awk_map_remove (
ase_awk_map_t* map, ase_char_t* keyptr, ase_size_t keylen);
int ase_awk_map_remove (ase_awk_map_t* map, ase_char_t* key, ase_size_t key_len);
int ase_awk_map_walk (ase_awk_map_t* map,
int (*walker)(ase_awk_pair_t*,void*), void* arg);

View File

@ -1,5 +1,5 @@
/*
* $Id: misc.c,v 1.53 2007-03-06 14:51:52 bacon Exp $
* $Id: misc.c,v 1.1 2007/03/28 14:05:16 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: misc.h,v 1.12 2007-02-23 08:17:49 bacon Exp $
* $Id: misc.h,v 1.1 2007/03/28 14:05:16 bacon Exp $
*
* {License}
*/

182
ase/awk/msw-bcc.mak Normal file
View File

@ -0,0 +1,182 @@
NAME = aseawk
MODE = release
JNI_INC = \
-I"$(JAVA_HOME)\include" \
-I"$(JAVA_HOME)\include\win32"
CC = bcc32
CXX = bcc32
LD = ilink32
AR = tlib
JAVAC = javac
JAR = jar
CFLAGS = -O2 -WM -WU -RT- -w -q -I..\..
CXXFLAGS = -O2 -WM -WU -RT- -w -q -I..\..
JAVACFLAGS = -classpath ..\.. -Xlint:unchecked
LDFLAGS = -Tpd -ap -Gn -c -q -L..\$(MODE)\lib
STARTUP = c0d32w.obj
LIBS = import32.lib cw32mt.lib asecmn.lib aseutl.lib $(NAME).lib
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
OUT_FILE_JNI = $(OUT_DIR)\$(NAME)_jni.dll
OUT_FILE_LIB_CXX = $(OUT_DIR)\$(NAME)++.lib
OUT_FILE_JAR = $(OUT_DIR)\$(NAME).jar
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)\cxx
OBJ_FILES_LIB = \
$(TMP_DIR)\awk.obj \
$(TMP_DIR)\err.obj \
$(TMP_DIR)\tree.obj \
$(TMP_DIR)\tab.obj \
$(TMP_DIR)\map.obj \
$(TMP_DIR)\parse.obj \
$(TMP_DIR)\run.obj \
$(TMP_DIR)\rec.obj \
$(TMP_DIR)\val.obj \
$(TMP_DIR)\func.obj \
$(TMP_DIR)\misc.obj \
$(TMP_DIR)\extio.obj \
$(TMP_DIR)\rex.obj
OBJ_FILES_JNI = $(TMP_DIR)\jni.obj
OBJ_FILES_LIB_CXX = \
$(TMP_DIR)\cxx\Awk.obj \
$(TMP_DIR)\cxx\StdAwk.obj
OBJ_FILES_JAR = \
$(TMP_DIR)\ase\awk\Awk.class \
$(TMP_DIR)\ase\awk\StdAwk.class \
$(TMP_DIR)\ase\awk\Context.class \
$(TMP_DIR)\ase\awk\Extio.class \
$(TMP_DIR)\ase\awk\IO.class \
$(TMP_DIR)\ase\awk\Console.class \
$(TMP_DIR)\ase\awk\File.class \
$(TMP_DIR)\ase\awk\Pipe.class \
$(TMP_DIR)\ase\awk\Exception.class
all: lib
lib: $(TMP_DIR) $(OUT_DIR) $(OUT_DIR_CXX) $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
jnidll: $(TMP_DIR) $(OUT_DIR) $(OUT_FILE_JNI)
jar: $(OUT_FILE_JAR)
$(OUT_FILE_LIB): $(OBJ_FILES_LIB)
$(AR) $(OUT_FILE_LIB) @&&!
+-$(**: = &^
+-)
!
$(OUT_FILE_LIB_CXX): $(OBJ_FILES_LIB_CXX)
$(AR) "$(OUT_FILE_LIB_CXX)" @&&!
+-$(**: = &^
+-)
!
$(OUT_FILE_JNI): $(OUT_FILE_LIB) $(OBJ_FILES_JNI)
$(LD) $(LDFLAGS) $(STARTUP) $(OBJ_FILES_JNI),$(OUT_FILE_JNI),,$(LIBS),jni.def,
$(OUT_FILE_JAR): $(OBJ_FILES_JAR)
$(JAR) -Mcvf $(OUT_FILE_JAR) -C $(TMP_DIR) ase
$(TMP_DIR)\awk.obj: awk.c
$(CC) $(CFLAGS) -o$@ -c awk.c
$(TMP_DIR)\err.obj: err.c
$(CC) $(CFLAGS) -o$@ -c err.c
$(TMP_DIR)\tree.obj: tree.c
$(CC) $(CFLAGS) -o$@ -c tree.c
$(TMP_DIR)\tab.obj: tab.c
$(CC) $(CFLAGS) -o$@ -c tab.c
$(TMP_DIR)\map.obj: map.c
$(CC) $(CFLAGS) -o$@ -c map.c
$(TMP_DIR)\parse.obj: parse.c
$(CC) $(CFLAGS) -o$@ -c parse.c
$(TMP_DIR)\run.obj: run.c
$(CC) $(CFLAGS) -o$@ -c run.c
$(TMP_DIR)\rec.obj: rec.c
$(CC) $(CFLAGS) -o$@ -c rec.c
$(TMP_DIR)\val.obj: val.c
$(CC) $(CFLAGS) -o$@ -c val.c
$(TMP_DIR)\func.obj: func.c
$(CC) $(CFLAGS) -o$@ -c func.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(TMP_DIR)\extio.obj: extio.c
$(CC) $(CFLAGS) -o$@ -c extio.c
$(TMP_DIR)\rex.obj: rex.c
$(CC) $(CFLAGS) -o$@ -c rex.c
$(TMP_DIR)\jni.obj: jni.c
$(CC) $(CFLAGS) $(JNI_INC) -o$@ -c jni.c
$(TMP_DIR)\cxx\Awk.obj: Awk.cpp Awk.hpp
$(CXX) $(CXXFLAGS) -o$@ -c Awk.cpp
$(TMP_DIR)\cxx\StdAwk.obj: StdAwk.cpp StdAwk.hpp Awk.hpp
$(CXX) $(CXXFLAGS) -o$@ -c StdAwk.cpp
$(TMP_DIR)\ase\awk\Awk.class: Awk.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Awk.java
$(TMP_DIR)\ase\awk\StdAwk.class: StdAwk.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) StdAwk.java
$(TMP_DIR)\ase\awk\Context.class: Context.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Context.java
$(TMP_DIR)\ase\awk\Extio.class: Extio.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Extio.java
$(TMP_DIR)\ase\awk\IO.class: IO.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) IO.java
$(TMP_DIR)\ase\awk\Console.class: Console.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Console.java
$(TMP_DIR)\ase\awk\File.class: File.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) File.java
$(TMP_DIR)\ase\awk\Pipe.class: Pipe.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Pipe.java
$(TMP_DIR)\ase\awk\Exception.class: Exception.java
$(JAVAC) $(JAVACFLAGS) -d $(TMP_DIR) Exception.java
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
$(TMP_DIR_CXX): $(TMP_DIR)
md $(TMP_DIR_CXX)
clean:
del $(OUT_FILE_LIB)
del $(OUT_FILE_JNI)
del $(OUT_FILE_JAR)
del $(OUT_FILE_LIB_CXX)
del $(OBJ_FILES_LIB)
del $(OBJ_FILES_JNI)
del $(OBJ_FILES_JAR)
del $(OBJ_FILES_LIB_CXX)

155
ase/awk/msw-cl.mak Normal file
View File

@ -0,0 +1,155 @@
NAME = aseawk
JNI =
JNI_INC = \
-I"$(JAVA_HOME)/include" \
-I"$(JAVA_HOME)/include\win32"
CC = dmc
CXX = dmc
LD = link
AR = lib
JAVAC = javac
CFLAGS = -mn -I..\.. $(JNI_INC)
CXXFLAGS = -Aa -Ab -Ae -mn -I..\.. $(JNI_INC)
JAVACFLAGS = -classpath ..\.. -Xlint:unchecked
MODE=debug
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
OUT_FILE_JNI = $(OUT_DIR)\lib$(NAME)_jni.la
OUT_FILE_LIB_CXX = $(OUT_DIR)\$(NAME)pp.lib
OUT_FILE_JAR = $(OUT_DIR)/$(NAME).jar
TMP_DIR = $(MODE)
TMP_DIR_CXX = $(TMP_DIR)\cxx
OBJ_FILES_LIB = \
$(TMP_DIR)\awk.obj \
$(TMP_DIR)\err.obj \
$(TMP_DIR)\tree.obj \
$(TMP_DIR)\tab.obj \
$(TMP_DIR)\map.obj \
$(TMP_DIR)\parse.obj \
$(TMP_DIR)\run.obj \
$(TMP_DIR)\rec.obj \
$(TMP_DIR)\val.obj \
$(TMP_DIR)\func.obj \
$(TMP_DIR)\misc.obj \
$(TMP_DIR)\extio.obj \
$(TMP_DIR)\rex.obj
OBJ_FILES_JNI = $(TMP_DIR)\jni.obj
OBJ_FILES_LIB_CXX = \
$(TMP_DIR)\cxx\Awk.obj \
$(TMP_DIR)\cxx\StdAwk.obj
OBJ_FILES_JAR = \
$(TMP_DIR)/ase/awk/Awk.class \
$(TMP_DIR)/ase/awk/StdAwk.class \
$(TMP_DIR)/ase/awk/Extio.class \
$(TMP_DIR)/ase/awk/IO.class \
$(TMP_DIR)/ase/awk/Console.class \
$(TMP_DIR)/ase/awk/File.class \
$(TMP_DIR)/ase/awk/Pipe.class \
$(TMP_DIR)/ase/awk/Exception.class
lib: build$(JNI)
build: $(OUT_FILE_LIB) $(OUT_FILE_LIB_CXX)
buildjni: build $(OUT_FILE_JNI)
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) -c $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
$(OUT_FILE_LIB_CXX): $(TMP_DIR_CXX) $(OUT_DIR) $(OUT_FILE_LIB) $(OBJ_FILES_LIB_CXX)
$(AR) -c $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB_CXX)
$(TMP_DIR)\awk.obj: awk.c
$(CC) $(CFLAGS) -o$@ -c awk.c
$(TMP_DIR)\err.obj: err.c
$(CC) $(CFLAGS) -o$@ -c err.c
$(TMP_DIR)\tree.obj: tree.c
$(CC) $(CFLAGS) -o$@ -c tree.c
$(TMP_DIR)\tab.obj: tab.c
$(CC) $(CFLAGS) -o$@ -c tab.c
$(TMP_DIR)\map.obj: map.c
$(CC) $(CFLAGS) -o$@ -c map.c
$(TMP_DIR)\parse.obj: parse.c
$(CC) $(CFLAGS) -o$@ -c parse.c
$(TMP_DIR)\run.obj: run.c
$(CC) $(CFLAGS) -o$@ -c run.c
$(TMP_DIR)\rec.obj: rec.c
$(CC) $(CFLAGS) -o$@ -c rec.c
$(TMP_DIR)\val.obj: val.c
$(CC) $(CFLAGS) -o$@ -c val.c
$(TMP_DIR)\func.obj: func.c
$(CC) $(CFLAGS) -o$@ -c func.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(TMP_DIR)\extio.obj: extio.c
$(CC) $(CFLAGS) -o$@ -c extio.c
$(TMP_DIR)\rex.obj: rex.c
$(CC) $(CFLAGS) -o$@ -c rex.c
$(TMP_DIR)\jni.obj: jni.c
$(CC) $(CFLAGS) $(CFLAGS_JNI) -o $@ -c jni.c
$(TMP_DIR)\cxx\Awk.obj: Awk.cpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c Awk.cpp
$(TMP_DIR)\cxx\StdAwk.obj: StdAwk.cpp StdAwk.hpp Awk.hpp
$(CXX) $(CXXFLAGS) -o $@ -c StdAwk.cpp
$(TMP_DIR)/ase/awk/Awk.class: Awk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Awk.java
$(TMP_DIR)/ase/awk/StdAwk.class: StdAwk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) StdAwk.java
$(TMP_DIR)/ase/awk/Extio.class: Extio.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Extio.java
$(TMP_DIR)/ase/awk/IO.class: IO.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) IO.java
$(TMP_DIR)/ase/awk/Console.class: Console.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Console.java
$(TMP_DIR)/ase/awk/File.class: File.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) File.java
$(TMP_DIR)/ase/awk/Pipe.class: Pipe.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Pipe.java
$(TMP_DIR)/ase/awk/Exception.class: Exception.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
$(TMP_DIR_CXX): $(TMP_DIR)
md $(TMP_DIR_CXX)
clean:
rm -rf $(OUT_FILE_LIB) $(OUT_FILE_JNI) $(OUT_FILE_JAR) $(OUT_FILE_LIB_CXX) $(OBJ_FILES_LIB) $(OBJ_FILES_JNI) $(OBJ_FILES_JAR) $(OBJ_FILES_LIB_CXX)

147
ase/awk/msw-dmc.mak Normal file
View File

@ -0,0 +1,147 @@
NAME = aseawk
MODE = release
JNI_INC = \
-I"$(JAVA_HOME)\include" \
-I"$(JAVA_HOME)\include\win32"
CC = dmc
LD = dmc
AR = lib
JAVAC = javac
JAR = jar
CFLAGS = -mn -I..\.. -DUNICODE -D_UNICODE #-D_DEBUG
JAVACFLAGS = -classpath ..\.. -Xlint:unchecked
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
OUT_FILE_JNI = $(OUT_DIR)\$(NAME)_jni.dll
OUT_FILE_JAR = $(OUT_DIR)\$(NAME).jar
TMP_DIR = $(MODE)
OBJ_FILES_LIB = \
$(TMP_DIR)\awk.obj \
$(TMP_DIR)\err.obj \
$(TMP_DIR)\tree.obj \
$(TMP_DIR)\tab.obj \
$(TMP_DIR)\map.obj \
$(TMP_DIR)\parse.obj \
$(TMP_DIR)\run.obj \
$(TMP_DIR)\rec.obj \
$(TMP_DIR)\val.obj \
$(TMP_DIR)\func.obj \
$(TMP_DIR)\misc.obj \
$(TMP_DIR)\extio.obj \
$(TMP_DIR)\rex.obj
OBJ_FILES_JNI = $(TMP_DIR)\jni.obj
OBJ_FILES_JAR = \
$(TMP_DIR)\ase\awk\Awk.class \
$(TMP_DIR)\ase\awk\StdAwk.class \
$(TMP_DIR)\ase\awk\Extio.class \
$(TMP_DIR)\ase\awk\IO.class \
$(TMP_DIR)\ase\awk\Console.class \
$(TMP_DIR)\ase\awk\File.class \
$(TMP_DIR)\ase\awk\Pipe.class \
$(TMP_DIR)\ase\awk\Exception.class
all: aseawk.lib
aseawk.lib: $(OUT_FILE_LIB)
aseawk_jni.dll: $(OUT_FILE_JNI)
aseawk.jar: $(OUT_FILE_JAR)
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) -c $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
$(OUT_FILE_JNI): $(OUT_FILE_LIB) $(OBJ_FILES_JNI)
$(LD) -WD -o$(OUT_FILE_JNI) $(OBJ_FILES_JNI) $(OUT_FILE_LIB) $(OUT_DIR)\asecmn.lib $(OUT_DIR)\aseutl.lib kernel32.lib jni.def
$(OUT_FILE_JAR): $(OBJ_FILES_JAR)
$(JAR) -Mcvf $(OUT_FILE_JAR) -C $(TMP_DIR) ase
$(TMP_DIR)\awk.obj: awk.c
$(CC) $(CFLAGS) -o$@ -c awk.c
$(TMP_DIR)\err.obj: err.c
$(CC) $(CFLAGS) -o$@ -c err.c
$(TMP_DIR)\tree.obj: tree.c
$(CC) $(CFLAGS) -o$@ -c tree.c
$(TMP_DIR)\tab.obj: tab.c
$(CC) $(CFLAGS) -o$@ -c tab.c
$(TMP_DIR)\map.obj: map.c
$(CC) $(CFLAGS) -o$@ -c map.c
$(TMP_DIR)\parse.obj: parse.c
$(CC) $(CFLAGS) -o$@ -c parse.c
$(TMP_DIR)\run.obj: run.c
$(CC) $(CFLAGS) -o$@ -c run.c
$(TMP_DIR)\rec.obj: rec.c
$(CC) $(CFLAGS) -o$@ -c rec.c
$(TMP_DIR)\val.obj: val.c
$(CC) $(CFLAGS) -o$@ -c val.c
$(TMP_DIR)\func.obj: func.c
$(CC) $(CFLAGS) -o$@ -c func.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(TMP_DIR)\extio.obj: extio.c
$(CC) $(CFLAGS) -o$@ -c extio.c
$(TMP_DIR)\rex.obj: rex.c
$(CC) $(CFLAGS) -o$@ -c rex.c
$(TMP_DIR)\jni.obj: jni.c
$(CC) $(CFLAGS) $(JNI_INC) -o$@ -c jni.c
$(TMP_DIR)\ase\awk\Awk.class: Awk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Awk.java
$(TMP_DIR)\ase\awk\StdAwk.class: StdAwk.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) StdAwk.java
$(TMP_DIR)\ase\awk\Extio.class: Extio.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Extio.java
$(TMP_DIR)\ase\awk\IO.class: IO.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) IO.java
$(TMP_DIR)\ase\awk\Console.class: Console.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Console.java
$(TMP_DIR)\ase\awk\File.class: File.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) File.java
$(TMP_DIR)\ase\awk\Pipe.class: Pipe.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Pipe.java
$(TMP_DIR)\ase\awk\Exception.class: Exception.java
$(JAVAC) -classpath ../.. -d $(TMP_DIR) Exception.java
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
clean:
del $(OUT_FILE_LIB)
del $(OUT_FILE_JNI)
del $(OUT_FILE_JAR)
del $(OBJ_FILES_LIB)
del $(OBJ_FILES_JNI)
del $(OBJ_FILES_JAR)

View File

@ -1,5 +1,5 @@
/*
* $Id: parse.c,v 1.259 2007-04-24 14:42:24 bacon Exp $
* $Id: parse.c,v 1.1 2007/03/28 14:05:17 bacon Exp $
*
* {License}
*/
@ -960,8 +960,8 @@ static ase_awk_nde_t* parse_function (ase_awk_t* awk)
/* duplicate functions should have been detected previously */
ASE_ASSERT (n != 0);
afn->name = PAIR_KEYPTR(pair); /* do some trick to save a string. */
afn->name_len = PAIR_KEYLEN(pair);
afn->name = pair->key; /* do some trick to save a string. */
afn->name_len = pair->key_len;
ASE_AWK_FREE (awk, name_dup);
return body;
@ -5015,7 +5015,7 @@ static int deparse_func (ase_awk_pair_t* pair, void* arg)
ase_awk_afn_t* afn = (ase_awk_afn_t*)pair->val;
ase_size_t i, n;
ASE_ASSERT (ase_strxncmp (PAIR_KEYPTR(pair), PAIR_KEYLEN(pair), afn->name, afn->name_len) == 0);
ASE_ASSERT (ase_strxncmp (pair->key, pair->key_len, afn->name, afn->name_len) == 0);
if (ase_awk_putsrcstr (df->awk, ASE_T("function ")) == -1) return -1;
if (ase_awk_putsrcstr (df->awk, afn->name) == -1) return -1;

View File

@ -1,5 +1,5 @@
/*
* $Id: parse.h,v 1.5 2007-03-02 11:14:34 bacon Exp $
* $Id: parse.h,v 1.1 2007/03/28 14:05:17 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: rec.c,v 1.19 2007-03-10 15:22:54 bacon Exp $
* $Id: rec.c,v 1.1 2007/03/28 14:05:17 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: rex.c,v 1.79 2007-03-06 14:51:53 bacon Exp $
* $Id: rex.c,v 1.1 2007/03/28 14:05:17 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: rex.h,v 1.28 2007-03-06 14:16:52 bacon Exp $
* $Id: rex.h,v 1.1 2007/03/28 14:05:17 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: run.c,v 1.350 2007-04-24 14:42:24 bacon Exp $
* $Id: run.c,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/
@ -1177,7 +1177,8 @@ static int run_main (
return -1;
}
if (__build_runarg (run, runarg, &nrunargs) == -1)
if (runarg == ASE_NULL) nrunargs = 0;
else if (__build_runarg (run, runarg, &nrunargs) == -1)
{
/* it can simply restore the top of the stack this way
* because the values pused onto the stack so far are
@ -1208,14 +1209,6 @@ static int run_main (
if (runarg != ASE_NULL)
{
if (!(run->awk->option & ASE_AWK_ARGSTOMAIN))
{
/* if the option is not set, the arguments
* are not passed to the main function as
* parameters */
nrunargs = 0;
}
/* prepare to pass the arguments to the main function */
for (i = nrunargs; i > 0; )
{
@ -2042,7 +2035,7 @@ static int __walk_foreach (ase_awk_pair_t* pair, void* arg)
ase_awk_val_t* str;
str = (ase_awk_val_t*) ase_awk_makestrval (
w->run, PAIR_KEYPTR(pair), PAIR_KEYLEN(pair));
w->run, pair->key, ase_strlen(pair->key));
if (str == ASE_NULL)
{
ase_awk_setrunerror (

View File

@ -1,5 +1,5 @@
/*
* $Id: run.h,v 1.33 2007-02-23 08:17:50 bacon Exp $
* $Id: run.h,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: tab.c,v 1.32 2007-03-06 14:51:53 bacon Exp $
* $Id: tab.c,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: tab.h,v 1.16 2007-02-03 10:51:14 bacon Exp $
* $Id: tab.h,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: tree.c,v 1.108 2007-03-22 10:26:04 bacon Exp $
* $Id: tree.c,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: tree.h,v 1.87 2007-02-03 10:51:14 bacon Exp $
* $Id: tree.h,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: val.c,v 1.116 2007-03-22 10:31:24 bacon Exp $
* $Id: val.c,v 1.1 2007/03/28 14:05:20 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: val.h,v 1.62 2007-02-23 08:17:51 bacon Exp $
* $Id: val.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,4 +1,4 @@
<!-- $Id: build.xml,v 1.11 2007-04-12 11:28:14 bacon Exp $ -->
<!-- $Id: build.xml,v 1.1 2007/03/28 14:05:10 bacon Exp $ -->
<project name="ase" default="release" basedir=".">
@ -48,26 +48,21 @@
<javac srcdir="test/awk"
classpath="${libdir}/aseawk.jar"
destdir="${bindir}" />
</target>
<unjar src="${libdir}/aseawk.jar" dest="${bindir}" />
<jar jarfile="${bindir}/aseawk.jar"
basedir="${bindir}"
includes="**/*.class"
manifest="test/awk/manifest" />
<delete>
<fileset dir="${bindir}" includes="*.class" />
</delete>
<delete dir="${bindir}/ase" verbose="true" />
<delete dir="${bindir}/META-INF" verbose="true" />
<target name="aseawk.applet" depends="aseawk.jar"
description="compile the awk test applet">
<copy file="test/awk/AseAwkApplet.html" todir="${bindir}" />
<javac srcdir="test/awk"
classpath="${libdir}/aseawk.jar"
destdir="${bindir}" />
</target>
<target name="clean" description="clean up">
<delete dir="${basedir}/release"
includes="**/*.class,**/*.jar" verbose="true"/>
includes="**/*.class,**/*.jar" />
<delete dir="${basedir}/debug"
includes="**/*.class,**/*.jar" verbose="true"/>
includes="**/*.class,**/*.jar" />
</target>
</project>

8
ase/change.log Normal file
View File

@ -0,0 +1,8 @@
[0.2.0]
* fixed bug (nextofile shown as nextfile in source output)
* fixed bug (nextofile not allowed in the BEGIN and END block)
[0.1.0]
* initial release

244
ase/cmn/asecmn.bdsproj Normal file
View File

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<PersonalityInfo>
<Option>
<Option Name="Personality">CPlusPlusBuilder.Personality</Option>
<Option Name="ProjectType">CppStaticLibrary</Option>
<Option Name="Version">1.0</Option>
<Option Name="GUID">{C16C0B49-6DA4-43F4-9DA8-021728817084}</Option>
</Option>
</PersonalityInfo>
<CPlusPlusBuilder.Personality>
<Source>
<Source Name="MainSource">asecmn.cpp</Source>
</Source>
<BCBPROJECT>
<project version="10.0">
<property category="build.config" name="active" value="1"/>
<property category="build.config" name="count" value="1"/>
<property category="build.config" name="excludedefaultforzero" value="0"/>
<property category="build.config.0" name="builddir" value="Debug"/>
<property category="build.config.0" name="key" value="Debug_Build"/>
<property category="build.config.0" name="name" value="Debug Build"/>
<property category="build.config.0" name="settings.win32b" value="default"/>
<property category="build.config.0" name="type" value="Toolset"/>
<property category="build.config.0" name="win32.win32b.builddir" value="debug"/>
<property category="build.config.1" name="key" value="Release_Build"/>
<property category="build.config.1" name="name" value="Release Build"/>
<property category="build.config.1" name="settings.win32b" value="default"/>
<property category="build.config.1" name="type" value="Toolset"/>
<property category="build.config.1" name="win32.win32b.builddir" value="release"/>
<property category="build.node" name="libraries" value="vcl.lib rtl.lib"/>
<property category="build.node" name="name" value="asecmn.lib"/>
<property category="build.node" name="packages" value="vclx;vcl;rtl;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;soaprtl;dsnap;bdertl;vcldbx"/>
<property category="build.node" name="sparelibs" value="rtl.lib vcl.lib"/>
<property category="build.node" name="use_packages" value="0"/>
<property category="build.platform" name="active" value="win32"/>
<property category="build.platform" name="win32.Debug_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.Release_Build.toolset" value="win32b"/>
<property category="build.platform" name="win32.default" value="win32b"/>
<property category="build.platform" name="win32.enabled" value="1"/>
<property category="build.platform" name="win32.win32b.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.listfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.objfile.merge" value="1"/>
<property category="win32.*.win32b.tasm32" name="param.xreffile.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.A.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.AK.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.AU.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.1" value="_DEBUG"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.H=.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Hc.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.He.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Hs.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Jgi.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Jgx.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.Od.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.k.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.1" value="debug"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.r.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.vi.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.bcc32" name="option.y.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.$O.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.1" value="DEBUG"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.dcc32" name="option.V.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.D.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.Gn.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\debug"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.ilink32" name="option.v.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.z.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Debug_Build.win32b.tasm32" name="option.zi.enabled" value="1"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\debug\lib"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Debug_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="container.SelectedWarnings.containerenabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.1" value="NDEBUG"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.D.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.H=.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.Hc.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.He.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.Hs.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.O2.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.disablewarns.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.k.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.1" value="release"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.n.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.noregistervars.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.r.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.rd.enabled" value="0"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.vi.enabled" value="1"/>
<property category="win32.Release_Build.win32b.bcc32" name="option.w.enabled" value="0"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$D.enabled" value="0"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.$O.enabled" value="1"/>
<property category="win32.Release_Build.win32b.dcc32" name="option.V.enabled" value="0"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib\release"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.Release_Build.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.z.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zd.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zi.enabled" value="0"/>
<property category="win32.Release_Build.win32b.tasm32" name="option.zn.enabled" value="1"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.1" value="..\release\lib"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.arg.merge" value="0"/>
<property category="win32.Release_Build.win32b.tlib" name="option.outputdir.enabled" value="1"/>
<optionset name="all_configurations">
<property category="node" name="displayname" value="All Configurations"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.1" value="$(BDS)\lib\vcl100.csm"/>
<property category="win32.*.win32b.bcc32" name="option.H=.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.H=.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.Hc.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="..\.."/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.2" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.3" value="$(BDS)\include"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.4" value="$(BDS)\include\dinkumware"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.5" value="$(BDS)\include\vcl"/>
<property category="win32.*.win32b.bcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.b.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.n.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.n.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.1" value="_RTLDLL"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.2" value="NO_STRICT"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.arg.merge" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.sysdefines.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tW.enabled" value="1"/>
<property category="win32.*.win32b.bcc32" name="option.tWC.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWD.enabled" value="0"/>
<property category="win32.*.win32b.bcc32" name="option.tWM.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.1" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.dcc32" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.I.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.1" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.dcc32" name="option.O.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.O.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.1" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.dcc32" name="option.R.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.R.enabled" value="0"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.1" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.2" value="C:\Documents and Settings\Administrator\My Documents\Borland Studio Projects"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.3" value="$(BDS)\lib"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.4" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.dcc32" name="option.U.arg.merge" value="1"/>
<property category="win32.*.win32b.dcc32" name="option.U.enabled" value="1"/>
<property category="win32.*.win32b.dcc32" name="param.filenames.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.1" value="C:\projects\ase\cmn"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.arg.merge" value="1"/>
<property category="win32.*.win32b.idl2cpp" name="option.I.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Gi.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.1" value="$(BDS)\lib"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.2" value="$(BDS)\lib\obj"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.3" value="$(BDS)\lib\psdk"/>
<property category="win32.*.win32b.ilink32" name="option.L.arg.merge" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.L.enabled" value="1"/>
<property category="win32.*.win32b.ilink32" name="option.Tpd.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpe.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.Tpp.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.aa.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.ap.enabled" value="0"/>
<property category="win32.*.win32b.ilink32" name="option.dynamicrtl.enabled" value="1"/>
<property category="win32.*.win32b.tlib" name="option.dynamicrtl.enabled" value="0"/>
</optionset>
</project>
<FILELIST>
<FILE FILENAME="str.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="str" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="mem.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="mem" FORMNAME="" DESIGNCLASS=""/>
<FILE FILENAME="misc.c" CONTAINERID="CCompiler" LOCALCOMMAND="" UNITNAME="misc" FORMNAME="" DESIGNCLASS=""/>
</FILELIST>
<IDEOPTIONS>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
<VersionInfo Name="MajorVer">1</VersionInfo>
<VersionInfo Name="MinorVer">0</VersionInfo>
<VersionInfo Name="Release">0</VersionInfo>
<VersionInfo Name="Build">0</VersionInfo>
<VersionInfo Name="Debug">False</VersionInfo>
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
<VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1033</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Debugging>
<Debugging Name="DebugSourceDirs"></Debugging>
</Debugging>
<Parameters>
<Parameters Name="RunParams"></Parameters>
<Parameters Name="Launcher"></Parameters>
<Parameters Name="UseLauncher">False</Parameters>
<Parameters Name="DebugCWD"></Parameters>
<Parameters Name="HostApplication"></Parameters>
<Parameters Name="RemoteHost"></Parameters>
<Parameters Name="RemotePath"></Parameters>
<Parameters Name="RemoteParams"></Parameters>
<Parameters Name="RemoteLauncher"></Parameters>
<Parameters Name="UseRemoteLauncher">False</Parameters>
<Parameters Name="RemoteCWD"></Parameters>
<Parameters Name="RemoteDebug">False</Parameters>
<Parameters Name="Debug Symbols Search Path"></Parameters>
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
<Linker>
<Linker Name="LibPrefix"></Linker>
<Linker Name="LibSuffix"></Linker>
<Linker Name="LibVersion"></Linker>
</Linker>
</IDEOPTIONS>
</BCBPROJECT> <buildevents>
<buildevent file="asecmn.bdsproj">
<precompile mode="0" cancancel="0" capture="-1" showconsole="0">mkdir $(PROJECTDIR)..\release\lib
mkdir $(PROJECTDIR)..\debug\lib
</precompile>
</buildevent>
</buildevents>
</CPlusPlusBuilder.Personality>
</BorlandProject>

View File

@ -1,5 +1,5 @@
/*
* $Id: conf_msw.h,v 1.1 2007-03-06 14:16:52 bacon Exp $
* $Id: conf_msw.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: conf_unx.h.in,v 1.1 2007-03-06 14:16:52 bacon Exp $
* $Id: conf_unx.h.in,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: conf_vms.h,v 1.1 2007-03-06 14:16:52 bacon Exp $
* $Id: conf_vms.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: macros.h,v 1.3 2007-03-06 14:54:49 bacon Exp $
* $Id: macros.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
#
# $Id: makefile.in,v 1.9 2007-04-10 07:23:49 bacon Exp $
# $Id: makefile.in,v 1.1 2007/03/28 14:05:21 bacon Exp $
#
NAME = asecmn
@ -25,17 +25,17 @@ OBJ_FILES = \
lib: $(OUT_FILE)
$(OUT_FILE): $(TMP_DIR) $(OBJ_FILES) $(OUT_DIR)
$(OUT_FILE): $(OBJ_FILES) $(OUT_DIR)
$(AR) cr $(OUT_FILE) $(OBJ_FILES)
if [ "$(RANLIB)" = "ranlib" ]; then ranlib $(OUT_FILE); fi
$(TMP_DIR)/mem.o: mem.c
$(TMP_DIR)/mem.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c mem.c
$(TMP_DIR)/str.o: str.c
$(TMP_DIR)/str.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c str.c
$(TMP_DIR)/misc.o: misc.c
$(TMP_DIR)/misc.o: $(TMP_DIR)
$(CC) $(CFLAGS) -o $@ -c misc.c
$(OUT_DIR):

View File

@ -6,7 +6,7 @@ C_OBJS = $(C_SRCS:.c=.obj)
CC = cl
LD = link
CFLAGS = /nologo /O2 /MT /W3 /GR- /GS- /Za -I../..
CFLAGS = /nologo /O2 /MT /W3 /GR- /Za -I../..
all: lib

View File

@ -1,5 +1,5 @@
/*
* $Id: mem.c,v 1.1 2007-02-23 07:13:58 bacon Exp $
* $Id: mem.c,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: mem.h,v 1.3 2007-03-06 14:16:52 bacon Exp $
* $Id: mem.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: misc.c,v 1.3 2007-03-19 03:33:54 bacon Exp $
* $Id: misc.c,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

48
ase/cmn/msw-bcc.mak Normal file
View File

@ -0,0 +1,48 @@
NAME = asecmn
MODE = release
CC = bcc32
LD = ilink32
AR = tlib
CFLAGS = -O2 -WM -WU -RT- -w -q -I..\..
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
TMP_DIR = $(MODE)
OBJ_FILES_LIB = \
$(TMP_DIR)\mem.obj \
$(TMP_DIR)\str.obj \
$(TMP_DIR)\misc.obj
all: lib
lib: $(TMP_DIR) $(OUT_DIR) $(OUT_FILE_LIB)
$(OUT_FILE_LIB): $(OBJ_FILES_LIB)
$(AR) $(OUT_FILE_LIB) @&&!
+-$(**: = &^
+-)
!
$(TMP_DIR)\mem.obj: mem.c
$(CC) $(CFLAGS) -o$@ -c mem.c
$(TMP_DIR)\str.obj: str.c
$(CC) $(CFLAGS) -o$@ -c str.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
clean:
del $(OUT_FILE_LIB)
del $(OBJ_FILES_LIB)

47
ase/cmn/msw-cl.mak Normal file
View File

@ -0,0 +1,47 @@
NAME = asecmn
MODE = release
CC = cl
LD = link
AR = link
CFLAGS = /nologo /O2 /MT /W3 -I..\..
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
TMP_DIR = $(MODE)
OBJ_FILES_LIB = \
$(TMP_DIR)\mem.obj \
$(TMP_DIR)\str.obj \
$(TMP_DIR)\misc.obj
all: lib
lib: $(OUT_FILE_LIB)
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) /lib @<<
/nologo /out:$(OUT_FILE_LIB) $(OBJ_FILES_LIB)
<<
$(TMP_DIR)\mem.obj: mem.c
$(CC) $(CFLAGS) /Fo$@ /c mem.c
$(TMP_DIR)\str.obj: str.c
$(CC) $(CFLAGS) /Fo$@ /c str.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) /Fo$@ /c misc.c
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
clean:
del $(OUT_FILE_LIB)
del $(OBJ_FILES_LIB)

46
ase/cmn/msw-dmc.mak Normal file
View File

@ -0,0 +1,46 @@
#
# You may override the value of MODE by specifying from the command-line
# make -f msw-dmc.mak MODE=debug
#
NAME = asecmn
MODE = release
CC = dmc
AR = lib
CFLAGS = -mn -I..\.. -DUNICODE -D_UNICODE
OUT_DIR = ..\$(MODE)\lib
OUT_FILE_LIB = $(OUT_DIR)\$(NAME).lib
TMP_DIR = $(MODE)
OBJ_FILES_LIB = \
$(TMP_DIR)\mem.obj \
$(TMP_DIR)\str.obj \
$(TMP_DIR)\misc.obj
all: $(OUT_FILE_LIB)
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
$(AR) -c $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
$(TMP_DIR)\mem.obj: mem.c
$(CC) $(CFLAGS) -o$@ -c mem.c
$(TMP_DIR)\str.obj: str.c
$(CC) $(CFLAGS) -o$@ -c str.c
$(TMP_DIR)\misc.obj: misc.c
$(CC) $(CFLAGS) -o$@ -c misc.c
$(OUT_DIR):
md $(OUT_DIR)
$(TMP_DIR):
md $(TMP_DIR)
clean:
del $(OUT_FILE_LIB) $(OBJ_FILES_LIB)

View File

@ -1,5 +1,5 @@
/*
* $Id: pack.h,v 1.1 2007-03-06 14:16:52 bacon Exp $
* $Id: pack.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: str.c,v 1.6 2007-03-02 11:41:55 bacon Exp $
* $Id: str.c,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: str.h,v 1.5 2007-03-06 14:16:52 bacon Exp $
* $Id: str.h,v 1.1 2007/03/28 14:05:21 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: types.h,v 1.1 2007-03-06 14:16:53 bacon Exp $
* $Id: types.h,v 1.1 2007/03/28 14:05:22 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: unpack.h,v 1.2 2007-03-22 06:30:46 bacon Exp $
* $Id: unpack.h,v 1.1 2007/03/28 14:05:22 bacon Exp $
*
* {License}
*/

420
ase/cnt/Awk.cs Normal file
View File

@ -0,0 +1,420 @@
/*
* $Id: Awk.cs,v 1.1 2007/05/01 07:47:12 bacon Exp $
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using COM = System.Runtime.InteropServices.ComTypes;
namespace ASECNT
{
public class Awk : ASECOM.IAwkEvents
{
private ASECOM.Awk awk;
private int cookie = -1;
private COM.IConnectionPoint icp;
private Stream sourceInputStream = null;
private Stream sourceOutputStream = null;
private StreamReader sourceInputReader;
private StreamWriter sourceOutputWriter;
private Stream consoleInputStream = null;
private Stream consoleOutputStream = null;
private StreamReader consoleInputReader;
private StreamWriter consoleOutputWriter;
public delegate object FunctionHandler (object[] args);
private System.Collections.Hashtable funcTable;
char[] consoleInputBuffer = new char[1024];
public Awk()
{
this.funcTable = new System.Collections.Hashtable();
this.awk = new ASECOM.Awk();
this.awk.UseLongLong = true;
//this.awk.UseCrlf = true;
COM.IConnectionPointContainer icpc =
(COM.IConnectionPointContainer)awk;
Guid g = typeof(ASECOM.IAwkEvents).GUID;
try
{
icpc.FindConnectionPoint(ref g, out icp);
icp.Advise(this, out this.cookie);
}
catch (System.Runtime.InteropServices.COMException ex)
{
this.cookie = -1;
//System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
/*~Awk()
{
if (cookie != -1 && icp != null)
{
try
{
icp.Unadvise(cookie);
cookie = -1;
}
catch (System.Runtime.InteropServices.COMException ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}
}*/
public int ErrorCode
{
get { return awk.ErrorCode; }
}
public int ErrorLine
{
get { return awk.ErrorLine; }
}
public string ErrorMessage
{
get { return awk.ErrorMessage; }
}
public bool ImplicitVariable
{
get { return awk.ImplicitVariable; }
set { awk.ImplicitVariable = value; }
}
public bool ExplicitVariable
{
get { return awk.ExplicitVariable; }
set { awk.ExplicitVariable = value; }
}
public bool UniqueFunction
{
get { return awk.UniqueFunction; }
set { awk.UniqueFunction = value; }
}
public bool VariableShading
{
get { return awk.VariableShading; }
set { awk.VariableShading = value; }
}
public bool ShiftOperators
{
get { return awk.ShiftOperators; }
set { awk.ShiftOperators = value; }
}
public bool IdivOperator
{
get { return awk.IdivOperator; }
set { awk.IdivOperator = value; }
}
public bool ConcatString
{
get { return awk.ConcatString; }
set { awk.ConcatString = value; }
}
public bool SupportExtio
{
get { return awk.SupportExtio; }
set { awk.SupportExtio = value; }
}
public bool SupportBlockless
{
get { return awk.SupportBlockless; }
set { awk.SupportBlockless = value; }
}
public bool StringBaseOne
{
get { return awk.StringBaseOne; }
set { awk.StringBaseOne = value; }
}
public bool StripSpaces
{
get { return awk.StripSpaces; }
set { awk.StripSpaces = value; }
}
public bool Nextofile
{
get { return awk.Nextofile; }
set { awk.Nextofile = value; }
}
public bool Usecrlf
{
get { return awk.UseCrlf; }
set { awk.UseCrlf = value; }
}
public string EntryPoint
{
get { return awk.EntryPoint; }
set { awk.EntryPoint = value; }
}
public bool ArgumentsToEntryPoint
{
get { return awk.ArgumentsToEntryPoint; }
set { awk.ArgumentsToEntryPoint = value; }
}
public bool Debug
{
get { return awk.Debug; }
set { awk.Debug = value; }
}
/* this property doesn't need to be available to the public
* as it can be always true in .NET environment. However,
* it is kept private here for reference */
private bool UseLongLong
{
get { return awk.UseLongLong; }
set { awk.UseLongLong = value; }
}
public int MaxDepthForBlockParse
{
get { return awk.MaxDepthForBlockParse; }
set { awk.MaxDepthForBlockParse = value; }
}
public int MaxDepthForBlockRun
{
get { return awk.MaxDepthForBlockRun; }
set { awk.MaxDepthForBlockRun = value; }
}
public int MaxDepthForExprParse
{
get { return awk.MaxDepthForExprParse; }
set { awk.MaxDepthForExprParse = value; }
}
public int MaxDepthForExprRun
{
get { return awk.MaxDepthForExprRun; }
set { awk.MaxDepthForExprRun = value; }
}
public int MaxDepthForRexBuild
{
get { return awk.MaxDepthForRexBuild; }
set { awk.MaxDepthForRexBuild = value; }
}
public int MaxDepthForRexMatch
{
get { return awk.MaxDepthForRexMatch; }
set { awk.MaxDepthForRexMatch = value; }
}
public virtual bool AddFunction(string name, int minArgs, int maxArgs, FunctionHandler handler)
{
if (funcTable.ContainsKey(name)) return false;
funcTable.Add(name, handler);
if (!awk.AddFunction(name, minArgs, maxArgs))
{
funcTable.Remove(name);
return false;
}
return true;
}
public virtual bool DeleteFunction(string name)
{
if (!funcTable.ContainsKey(name)) return false;
if (awk.DeleteFunction(name))
{
funcTable.Remove(name);
return true;
}
return false;
}
public virtual bool Parse()
{
return awk.Parse();
}
public virtual bool Run ()
{
return awk.Run(null);
}
public virtual bool Run(string[] args)
{
return awk.Run(args);
}
public Stream SourceInputStream
{
get { return this.sourceInputStream; }
set { this.sourceInputStream = value; }
}
public Stream SourceOutputStream
{
get { return this.sourceOutputStream; }
set { this.sourceOutputStream = value; }
}
public Stream ConsoleInputStream
{
get { return this.consoleInputStream; }
set { this.consoleInputStream = value; }
}
public Stream ConsoleOutputStream
{
get { return this.consoleOutputStream; }
set { this.consoleOutputStream = value; }
}
public virtual int OpenSource(ASECOM.AwkSourceMode mode)
{
if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_READ)
{
if (this.sourceInputStream == null) return 0;
this.sourceInputReader = new StreamReader (this.sourceInputStream);
return 1;
}
else if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_WRITE)
{
if (this.sourceOutputStream == null) return 0;
this.sourceOutputWriter = new StreamWriter (this.sourceOutputStream);
return 1;
}
return -1;
}
public virtual int CloseSource(ASECOM.AwkSourceMode mode)
{
if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_READ)
{
this.sourceInputReader.Close ();
return 0;
}
else if (mode == ASECOM.AwkSourceMode.AWK_SOURCE_WRITE)
{
this.sourceOutputWriter.Close ();
return 0;
}
return -1;
}
public virtual int ReadSource(ASECOM.Buffer buf)
{
buf.Value = this.sourceInputReader.ReadLine();
if (buf.Value == null) return 0;
return buf.Value.Length;
}
public virtual int WriteSource(ASECOM.Buffer buf)
{
this.sourceOutputWriter.Write(buf.Value);
return buf.Value.Length;
}
public virtual int OpenExtio(ASECOM.AwkExtio extio)
{
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_READ)
{
if (this.consoleInputStream == null) return 0;
this.consoleInputReader = new StreamReader(this.consoleInputStream);
return 1;
}
else if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
{
if (this.consoleOutputStream == null) return 0;
this.consoleOutputWriter = new StreamWriter(this.consoleOutputStream);
return 1;
}
return -1;
}
public virtual int CloseExtio(ASECOM.AwkExtio extio)
{
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_READ)
{
this.consoleInputReader.Close();
return 0;
}
else if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
{
this.consoleOutputWriter.Close();
return 0;
}
return -1;
}
public virtual int ReadExtio(ASECOM.AwkExtio extio, ASECOM.Buffer buf)
{
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_READ)
{
int n = this.consoleInputReader.Read(consoleInputBuffer, 0, consoleInputBuffer.Length);
if (n == 0) return 0;
buf.Value = new string(consoleInputBuffer, 0, n);
return buf.Value.Length;
}
return -1;
}
public virtual int WriteExtio(ASECOM.AwkExtio extio, ASECOM.Buffer buf)
{
if (extio.Mode == ASECOM.AwkExtioMode.AWK_EXTIO_CONSOLE_WRITE)
{
this.consoleOutputWriter.Write(buf.Value);
return buf.Value.Length;
}
return -1;
}
public virtual int FlushExtio(ASECOM.AwkExtio extio)
{
return -1;
}
public virtual int NextExtio(ASECOM.AwkExtio extio)
{
return 1;
}
public virtual object HandleFunction(string name, object argarray)
{
FunctionHandler handler = (FunctionHandler)funcTable[name];
return handler((object[])argarray);
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("asecnt")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("asecnt")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("be3e4e5d-2eac-4629-bdc6-d61b1c858015")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

60
ase/cnt/StdAwk.cs Normal file
View File

@ -0,0 +1,60 @@
/*
* $Id: StdAwk.cs,v 1.1 2007/05/01 07:47:12 bacon Exp $
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace ASECNT
{
public class StdAwk: Awk
{
public StdAwk(): base ()
{
AddFunction("sin", 1, 1, new FunctionHandler(handleSin));
AddFunction("cos", 1, 1, new FunctionHandler(handleCos));
AddFunction("tan", 1, 1, new FunctionHandler(handleTan));
}
protected virtual object handleSin(object[] args)
{
if (args[0] is System.Double)
{
return System.Math.Sin((double)args[0]);
}
else if (args[0] is System.Int32)
{
return System.Math.Sin((double)(int)args[0]);
}
else if (args[0] is System.Int64)
{
return System.Math.Sin((double)(long)args[0]);
}
else if (args[0] is string)
{
double t;
/* TODO: atoi */
try { t = System.Double.Parse((string)args[0]); }
catch (System.Exception e) { t = 0; }
return System.Math.Sin(t);
}
else
{
return System.Math.Sin(0.0);
}
}
protected virtual object handleCos(object[] args)
{
return 0;
}
protected virtual object handleTan(object[] args)
{
return 0;
}
}
}

58
ase/cnt/asecnt.csproj Normal file
View File

@ -0,0 +1,58 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7F679165-41FB-4E1E-B3F5-23C5EE94166A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AESCNT</RootNamespace>
<AssemblyName>asecnt</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\lib\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Release\lib\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Awk.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StdAwk.cs" />
</ItemGroup>
<ItemGroup>
<COMReference Include="ASECOM">
<Guid>{F9C69806-16A1-4162-998A-876B33C470BF}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>tlbimp</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.cpp,v 1.37 2007-04-26 15:50:17 bacon Exp $
* $Id: Awk.cpp,v 1.1 2007/03/28 14:05:22 bacon Exp $
*
* {License}
*/
@ -19,10 +19,6 @@
#include <ase/utl/stdio.h>
#include <ase/utl/ctype.h>
#ifdef _MSC_VER
#pragma warning (disable: 4996)
#endif
#define DBGOUT(x) do { if (debug) OutputDebugString (x); } while(0)
#define DBGOUT2(awk,x) do { if (awk->debug) OutputDebugString (x); } while(0)
@ -74,7 +70,6 @@ CAwk::CAwk ():
CAwk::~CAwk ()
{
while (bfn_list != NULL)
{
bfn_t* next = bfn_list->next;
@ -233,11 +228,11 @@ static ase_ssize_t __read_source (
if (cmd == ASE_AWK_IO_OPEN)
{
return (ase_ssize_t)awk->Fire_OpenSource (AWK_SOURCE_READ);
return (ase_ssize_t)awk->Fire_OpenSource (0);
}
else if (cmd == ASE_AWK_IO_CLOSE)
{
return (ase_ssize_t)awk->Fire_CloseSource (AWK_SOURCE_READ);
return (ase_ssize_t)awk->Fire_CloseSource (0);
}
else if (cmd == ASE_AWK_IO_READ)
{
@ -301,11 +296,11 @@ static ase_ssize_t __write_source (
if (cmd == ASE_AWK_IO_OPEN)
{
return (ase_ssize_t)awk->Fire_OpenSource (AWK_SOURCE_WRITE);
return (ase_ssize_t)awk->Fire_OpenSource (1);
}
else if (cmd == ASE_AWK_IO_CLOSE)
{
return (ase_ssize_t)awk->Fire_CloseSource (AWK_SOURCE_WRITE);
return (ase_ssize_t)awk->Fire_CloseSource (1);
}
else if (cmd == ASE_AWK_IO_WRITE)
{
@ -447,7 +442,7 @@ static int __handle_bfn (
}
ase_awk_val_t* ret;
int n = awk->Fire_HandleFunction (run, name, aa, &ret);
int n = awk->Fire_HandleBuiltinFunction (run, name, aa, &ret);
if (n == 1)
{
ase_char_t buf[128];
@ -476,7 +471,7 @@ static int __handle_bfn (
return -1;
}
/* name and aa are destroyed in HandleFunction */
/* name and aa are destroyed in HandleBuiltinFunction */
//SafeArrayDestroy (aa);
//SysFreeString (name);
@ -484,7 +479,7 @@ static int __handle_bfn (
return 0;
}
HRESULT CAwk::Parse (VARIANT_BOOL* ret)
HRESULT CAwk::Parse (int* ret)
{
if (handle == NULL)
{
@ -522,7 +517,7 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, ASE_AWK_ENOMEM));
*ret = VARIANT_FALSE;
*ret = -1;
DBGOUT (_T("cannot open awk"));
return S_OK;
@ -561,7 +556,7 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
ase_awk_geterror (handle, &errnum, &errlin, &msg);
ase_strxcpy (errmsg, ASE_COUNTOF(errmsg), msg);
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
}
@ -581,12 +576,12 @@ HRESULT CAwk::Parse (VARIANT_BOOL* ret)
DBGOUT (_T("cannot parse the source code"));
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
else DBGOUT (_T("parsed the source code successfully"));
*ret = VARIANT_TRUE;
*ret = 0;
return S_OK;
}
@ -629,8 +624,8 @@ static ase_ssize_t __process_extio (
DBGOUT2 (awk, _T("cannot set the name of the extio input buffer"));
return -1;
}
extio2->type = (AwkExtioType)(epa->type & 0xFF);
extio2->mode = (AwkExtioMode)(epa->mode);
extio2->type = epa->type & 0xFF;
extio2->mode = epa->mode;
read_buf->AddRef ();
extio2->read_buf = read_buf;
@ -752,11 +747,9 @@ static ase_ssize_t __process_extio (
return -1;
}
HRESULT CAwk::Run (VARIANT argarray, VARIANT_BOOL* ret)
HRESULT CAwk::Run (int* ret)
{
const ase_char_t* entry = NULL;
ase_awk_runarg_t* runarg;
long nrunargs;
if (handle == NULL)
{
@ -764,7 +757,7 @@ HRESULT CAwk::Run (VARIANT argarray, VARIANT_BOOL* ret)
errlin = 0;
_tcscpy (errmsg, _T("parse not called yet"));
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
@ -778,80 +771,7 @@ HRESULT CAwk::Run (VARIANT argarray, VARIANT_BOOL* ret)
if (entry_point != NULL &&
SysStringLen(entry_point) > 0) entry = entry_point;
if (argarray.vt == VT_EMPTY || argarray.vt == VT_NULL)
{
/* no run-time argument specified */
runarg = NULL;
}
else if (argarray.vt == (VT_ARRAY|VT_BSTR))
{
SAFEARRAY* sa = argarray.parray;
UINT dim = SafeArrayGetDim (sa);
if (dim != 1)
{
/* arguments should not be multi-dimensional */
errnum = ASE_AWK_EINTERN;
errlin = 0;
_tcscpy (errmsg, _T("multi-dimensional run-time argument array not allowed"));
*ret = VARIANT_FALSE;
return S_OK;
}
long lbound, ubound;
SafeArrayGetLBound (sa, 1, &lbound);
SafeArrayGetUBound (sa, 1, &ubound);
nrunargs = ubound - lbound + 1;
runarg = (ase_awk_runarg_t*) malloc (sizeof(*runarg) * (nrunargs+1));
if (runarg == NULL)
{
errnum = ASE_AWK_ENOMEM;
errlin = 0;
ase_strxcpy (
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = VARIANT_FALSE;
return S_OK;
}
long i, j;
for (i = lbound, j = 0; i <= ubound; i++, j++)
{
BSTR bstr;
HRESULT hr = SafeArrayGetElement (sa, &i, (void**)&bstr);
if (FAILED(hr))
{
errnum = ASE_AWK_EINTERN;
errlin = 0;
_tcscpy (errmsg, _T("cannot get run-time argument array element"));
for (long i = 0; i < j; i++) SysFreeString (runarg[i].ptr);
free (runarg);
*ret = VARIANT_FALSE;
return S_OK;
}
runarg[j].ptr = bstr;
runarg[j].len = SysStringLen (bstr);
}
runarg[j].ptr = NULL;
runarg[j].len = 0;
}
else
{
errnum = ASE_AWK_EINTERN;
errlin = 0;
_tcscpy (errmsg, _T("invalid arguments"));
*ret = VARIANT_FALSE;
return S_OK;
}
if (ase_awk_run (handle, entry, &runios, NULL, runarg, this) == -1)
if (ase_awk_run (handle, entry, &runios, NULL, NULL, this) == -1)
{
const ase_char_t* msg;
@ -859,31 +779,17 @@ HRESULT CAwk::Run (VARIANT argarray, VARIANT_BOOL* ret)
ase_strxcpy (errmsg, ASE_COUNTOF(errmsg), msg);
DBGOUT (_T("cannot run the program"));
if (runarg != NULL)
{
for (long j = 0; j < nrunargs; j++) SysFreeString (runarg[j].ptr);
free (runarg);
}
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
else DBGOUT (_T("run the program successfully"));
if (runarg != NULL)
{
for (long j = 0; j < nrunargs; j++) SysFreeString (runarg[j].ptr);
free (runarg);
}
*ret = VARIANT_TRUE;
*ret = 0;
return S_OK;
}
STDMETHODIMP CAwk::AddFunction (
BSTR name, int minArgs, int maxArgs, VARIANT_BOOL* ret)
STDMETHODIMP CAwk::AddBuiltinFunction (
BSTR name, int min_args, int max_args, int* ret)
{
bfn_t* bfn;
size_t name_len = SysStringLen(name);
@ -901,7 +807,7 @@ STDMETHODIMP CAwk::AddFunction (
_T("'%.*s' added already"),
bfn->name.len, bfn->name.ptr);
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
}
@ -915,7 +821,7 @@ STDMETHODIMP CAwk::AddFunction (
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
@ -931,21 +837,21 @@ STDMETHODIMP CAwk::AddFunction (
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
memcpy (bfn->name.ptr, name, sizeof(TCHAR) * bfn->name.len);
bfn->min_args = minArgs;
bfn->max_args = maxArgs;
bfn->min_args = min_args;
bfn->max_args = max_args;
bfn->next = bfn_list;
bfn_list = bfn;
*ret = VARIANT_TRUE;
*ret = 0;
return S_OK;
}
STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
STDMETHODIMP CAwk::DeleteBuiltinFunction (BSTR name, int* ret)
{
size_t name_len = SysStringLen(name);
bfn_t* bfn, * next, * prev = NULL;
@ -964,7 +870,7 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
if (prev == NULL) bfn_list = next;
else prev->next = next;
*ret = VARIANT_TRUE;
*ret = 0;
return S_OK;
}
@ -977,7 +883,7 @@ STDMETHODIMP CAwk::DeleteFunction (BSTR name, VARIANT_BOOL* ret)
errmsg, ASE_COUNTOF(errmsg),
ase_awk_geterrstr(NULL, errnum));
*ret = VARIANT_FALSE;
*ret = -1;
return S_OK;
}
@ -1001,14 +907,14 @@ STDMETHODIMP CAwk::get_ErrorMessage(BSTR *pVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ImplicitVariable(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_ImplicitVariable(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_IMPLICIT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ImplicitVariable(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_ImplicitVariable(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_IMPLICIT;
else option = option & ~ASE_AWK_IMPLICIT;
@ -1016,14 +922,14 @@ STDMETHODIMP CAwk::put_ImplicitVariable(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ExplicitVariable(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_ExplicitVariable(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_EXPLICIT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ExplicitVariable(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_ExplicitVariable(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_EXPLICIT;
else option = option & ~ASE_AWK_EXPLICIT;
@ -1031,14 +937,14 @@ STDMETHODIMP CAwk::put_ExplicitVariable(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_UniqueFunction(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_UniqueFunction(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_UNIQUEFN) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_UniqueFunction(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_UniqueFunction(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_UNIQUEFN;
else option = option & ~ASE_AWK_UNIQUEFN;
@ -1046,14 +952,14 @@ STDMETHODIMP CAwk::put_UniqueFunction(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_VariableShading(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_VariableShading(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_SHADING) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_VariableShading(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_VariableShading(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_SHADING;
else option = option & ~ASE_AWK_SHADING;
@ -1061,14 +967,14 @@ STDMETHODIMP CAwk::put_VariableShading(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ShiftOperators(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_ShiftOperators(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_SHIFT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ShiftOperators(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_ShiftOperators(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_SHIFT;
else option = option & ~ASE_AWK_SHIFT;
@ -1076,14 +982,14 @@ STDMETHODIMP CAwk::put_ShiftOperators(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_IdivOperator(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_IdivOperator(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_IDIV) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_IdivOperator(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_IdivOperator(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_IDIV;
else option = option & ~ASE_AWK_IDIV;
@ -1091,14 +997,14 @@ STDMETHODIMP CAwk::put_IdivOperator(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ConcatString(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_ConcatString(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRCONCAT) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ConcatString(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_ConcatString(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRCONCAT;
else option = option & ~ASE_AWK_STRCONCAT;
@ -1106,14 +1012,14 @@ STDMETHODIMP CAwk::put_ConcatString(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_SupportExtio(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_SupportExtio(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_EXTIO) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_SupportExtio(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_SupportExtio(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_EXTIO;
else option = option & ~ASE_AWK_EXTIO;
@ -1121,14 +1027,14 @@ STDMETHODIMP CAwk::put_SupportExtio(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_SupportBlockless(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_SupportBlockless(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_BLOCKLESS) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_SupportBlockless(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_SupportBlockless(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_BLOCKLESS;
else option = option & ~ASE_AWK_BLOCKLESS;
@ -1136,14 +1042,14 @@ STDMETHODIMP CAwk::put_SupportBlockless(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_StringBaseOne(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_StringBaseOne(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRBASEONE) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_StringBaseOne(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_StringBaseOne(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRBASEONE;
else option = option & ~ASE_AWK_STRBASEONE;
@ -1151,14 +1057,14 @@ STDMETHODIMP CAwk::put_StringBaseOne(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_StripSpaces(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_StripSpaces(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_STRIPSPACES) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_StripSpaces(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_StripSpaces(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_STRIPSPACES;
else option = option & ~ASE_AWK_STRIPSPACES;
@ -1166,14 +1072,14 @@ STDMETHODIMP CAwk::put_StripSpaces(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_Nextofile(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_Nextofile(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_NEXTOFILE) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_Nextofile(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_Nextofile(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_NEXTOFILE;
else option = option & ~ASE_AWK_NEXTOFILE;
@ -1181,14 +1087,14 @@ STDMETHODIMP CAwk::put_Nextofile(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_UseCrlf(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_UseCrlf(BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_CRLF) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_UseCrlf(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_UseCrlf(BOOL newVal)
{
if (newVal) option = option | ASE_AWK_CRLF;
else option = option & ~ASE_AWK_CRLF;
@ -1196,21 +1102,6 @@ STDMETHODIMP CAwk::put_UseCrlf(VARIANT_BOOL newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_ArgumentsToEntryPoint(VARIANT_BOOL *pVal)
{
if (handle != NULL) option = ase_awk_getoption (handle);
*pVal = (option & ASE_AWK_ARGSTOMAIN) == 1;
return S_OK;
}
STDMETHODIMP CAwk::put_ArgumentsToEntryPoint(VARIANT_BOOL newVal)
{
if (newVal) option = option | ASE_AWK_ARGSTOMAIN;
else option = option & ~ASE_AWK_ARGSTOMAIN;
if (handle != NULL) ase_awk_setoption (handle, option);
return S_OK;
}
STDMETHODIMP CAwk::get_MaxDepthForBlockParse(int *pVal)
{
if (handle != NULL)
@ -1370,25 +1261,25 @@ STDMETHODIMP CAwk::put_EntryPoint(BSTR newVal)
return S_OK;
}
STDMETHODIMP CAwk::get_Debug(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_Debug(BOOL *pVal)
{
*pVal = debug;
return S_OK;
}
STDMETHODIMP CAwk::put_Debug(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_Debug(BOOL newVal)
{
debug = newVal;
return S_OK;
}
STDMETHODIMP CAwk::get_UseLongLong(VARIANT_BOOL *pVal)
STDMETHODIMP CAwk::get_UseLongLong(BOOL *pVal)
{
*pVal = use_longlong;
return S_OK;
}
STDMETHODIMP CAwk::put_UseLongLong(VARIANT_BOOL newVal)
STDMETHODIMP CAwk::put_UseLongLong(BOOL newVal)
{
use_longlong = newVal;
return S_OK;

View File

@ -1,5 +1,5 @@
/*
* $Id: Awk.h,v 1.23 2007-04-22 07:47:15 bacon Exp $
* $Id: Awk.h,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/
@ -21,13 +21,13 @@
// CAwk
class CAwk :
public IDispatchImpl<IAwk, &IID_IAwk, &LIBID_ASECOM>,
public IDispatchImpl<IAwk, &IID_IAwk, &LIBID_ASELib>,
public ISupportErrorInfo,
/*public CComObjectRoot,*/
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CAwk,&CLSID_Awk>,
public IConnectionPointContainerImpl<CAwk>,
public IProvideClassInfo2Impl<&CLSID_Awk, &DIID_IAwkEvents, &LIBID_ASECOM>,
public IProvideClassInfo2Impl<&CLSID_Awk, &DIID_IAwkEvents, &LIBID_ASELib>,
public CProxyIAwkEvents< CAwk >
{
@ -77,8 +77,8 @@ public:
} * bfn_list;
BSTR entry_point;
VARIANT_BOOL debug;
VARIANT_BOOL use_longlong;
BOOL debug;
BOOL use_longlong;
public:
CAwk();
~CAwk ();
@ -106,10 +106,9 @@ DECLARE_REGISTRY_RESOURCEID(IDR_AWK)
// IAwk
public:
STDMETHOD(get_UseLongLong)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UseLongLong)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_Debug)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Debug)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(put_UseLongLong)(/*[in]*/ BOOL newVal);
STDMETHOD(get_Debug)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_Debug)(/*[in]*/ BOOL newVal);
STDMETHOD(get_EntryPoint)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(put_EntryPoint)(/*[in]*/ BSTR newVal);
STDMETHOD(get_MaxDepthForRexMatch)(/*[out, retval]*/ int *pVal);
@ -124,48 +123,40 @@ public:
STDMETHOD(put_MaxDepthForBlockRun)(/*[in]*/ int newVal);
STDMETHOD(get_MaxDepthForBlockParse)(/*[out, retval]*/ int *pVal);
STDMETHOD(put_MaxDepthForBlockParse)(/*[in]*/ int newVal);
STDMETHOD(get_ArgumentsToEntryPoint)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ArgumentsToEntryPoint)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_UseCrlf)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UseCrlf)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_Nextofile)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Nextofile)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_StripSpaces)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_StripSpaces)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_StringBaseOne)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_StringBaseOne)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_SupportBlockless)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_SupportBlockless)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_SupportExtio)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_SupportExtio)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ConcatString)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ConcatString)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_IdivOperator)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_IdivOperator)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ShiftOperators)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ShiftOperators)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_VariableShading)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_VariableShading)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_UniqueFunction)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_UniqueFunction)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ExplicitVariable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ExplicitVariable)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ImplicitVariable)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_ImplicitVariable)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_UseCrlf)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_UseCrlf)(/*[in]*/ BOOL newVal);
STDMETHOD(get_Nextofile)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_Nextofile)(/*[in]*/ BOOL newVal);
STDMETHOD(get_StripSpaces)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_StripSpaces)(/*[in]*/ BOOL newVal);
STDMETHOD(get_StringBaseOne)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_StringBaseOne)(/*[in]*/ BOOL newVal);
STDMETHOD(get_SupportBlockless)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_SupportBlockless)(/*[in]*/ BOOL newVal);
STDMETHOD(get_SupportExtio)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_SupportExtio)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ConcatString)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ConcatString)(/*[in]*/ BOOL newVal);
STDMETHOD(get_IdivOperator)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_IdivOperator)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ShiftOperators)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ShiftOperators)(/*[in]*/ BOOL newVal);
STDMETHOD(get_VariableShading)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_VariableShading)(/*[in]*/ BOOL newVal);
STDMETHOD(get_UniqueFunction)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_UniqueFunction)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ExplicitVariable)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ExplicitVariable)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ImplicitVariable)(/*[out, retval]*/ BOOL *pVal);
STDMETHOD(put_ImplicitVariable)(/*[in]*/ BOOL newVal);
STDMETHOD(get_ErrorMessage)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_ErrorLine)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_ErrorCode)(/*[out, retval]*/ int *pVal);
HRESULT __stdcall DeleteFunction (
/*[in]*/ BSTR name, /*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall AddFunction (
/*[in]*/ BSTR name, /*[in]*/ int minArgs,
/*[in]*/ int maxArgs, /*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall Parse (/*[out, retval]*/ VARIANT_BOOL* ret);
HRESULT __stdcall Run (
/*[in]*/ VARIANT argarray, /*[out, retval]*/ VARIANT_BOOL* ret);
STDMETHOD(DeleteBuiltinFunction)(/*[in]*/ BSTR name, /*[out, retval]*/ int* ret);
STDMETHOD(AddBuiltinFunction)(/*[in]*/ BSTR name, /*[in]*/ int min_args, /*[in]*/ int max_args, /*[out, retval]*/ int* ret);
STDMETHOD(get_UseLongLong)(/*[out, retval]*/ BOOL *pVal);
HRESULT __stdcall Parse (/*[out, retval]*/ int* ret);
HRESULT __stdcall Run (/*[out, retval]*/ int* ret);
};
#endif

View File

@ -1,5 +1,5 @@
/*
* $Id: AwkExtio.cpp,v 1.11 2007-04-15 13:15:35 bacon Exp $
* $Id: AwkExtio.cpp,v 1.1 2007/03/28 14:05:22 bacon Exp $
*
* {License}
*/
@ -43,13 +43,13 @@ BOOL CAwkExtio::PutName (const TCHAR* val)
return (name == NULL)? FALSE: TRUE;
}
STDMETHODIMP CAwkExtio::get_Type(AwkExtioType *pVal)
STDMETHODIMP CAwkExtio::get_Type(int *pVal)
{
*pVal = type;
return S_OK;
}
STDMETHODIMP CAwkExtio::get_Mode(AwkExtioMode *pVal)
STDMETHODIMP CAwkExtio::get_Mode(int *pVal)
{
*pVal = mode;
return S_OK;

View File

@ -1,5 +1,5 @@
/*
* $Id: AwkExtio.h,v 1.11 2007-04-22 07:47:15 bacon Exp $
* $Id: AwkExtio.h,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/
@ -15,12 +15,12 @@
class ATL_NO_VTABLE CAwkExtio :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CAwkExtio, &CLSID_AwkExtio>,
public IDispatchImpl<IAwkExtio, &IID_IAwkExtio, &LIBID_ASECOM>
public IDispatchImpl<IAwkExtio, &IID_IAwkExtio, &LIBID_ASELib>
{
public:
BSTR name;
AwkExtioType type;
AwkExtioMode mode;
int type;
int mode;
VARIANT handle;
IBuffer* read_buf;
@ -45,8 +45,8 @@ END_COM_MAP()
public:
STDMETHOD(get_Handle)(/*[out, retval]*/ VARIANT *pVal);
STDMETHOD(put_Handle)(/*[in]*/ VARIANT newVal);
STDMETHOD(get_Mode)(/*[out, retval]*/ AwkExtioMode *pVal);
STDMETHOD(get_Type)(/*[out, retval]*/ AwkExtioType *pVal);
STDMETHOD(get_Mode)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_Type)(/*[out, retval]*/ int *pVal);
STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
};

View File

@ -1,5 +1,5 @@
/*
* $Id: Buffer.cpp,v 1.6 2007-02-03 10:52:12 bacon Exp $
* $Id: Buffer.cpp,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: Buffer.h,v 1.7 2007-04-22 07:47:15 bacon Exp $
* $Id: Buffer.h,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/
@ -13,7 +13,7 @@
class ATL_NO_VTABLE CBuffer :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CBuffer, &CLSID_Buffer>,
public IDispatchImpl<IBuffer, &IID_IBuffer, &LIBID_ASECOM>
public IDispatchImpl<IBuffer, &IID_IBuffer, &LIBID_ASELib>
{
public:
BSTR str;

View File

@ -1,5 +1,5 @@
/*
* $Id: asecom.cpp,v 1.3 2007-04-22 07:47:15 bacon Exp $
* $Id: asecom.cpp,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/
@ -34,7 +34,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_Module.Init(ObjectMap, hInstance, &LIBID_ASECOM);
_Module.Init(ObjectMap, hInstance, &LIBID_ASELib);
DisableThreadLibraryCalls(hInstance);
}
else if (dwReason == DLL_PROCESS_DETACH)

View File

@ -53,11 +53,11 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 aseawk.lib asecmn.lib aseutl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /implib:"debug/asecom.lib" /pdbtype:sept /libpath:"$(OutDir)"
# Begin Custom Build - Performing registration
IntDir=.\debug
OutDir=.\../debug/lib
TargetPath=\projects\ase\debug\lib\asecom.dll
InputPath=\projects\ase\debug\lib\asecom.dll
SOURCE="$(InputPath)"
IntDir=./debug
OutDir=./../debug/lib
#TargetPath=\projects\ase\debug\lib\asecom.dll
#InputPath=\projects\ase\debug\lib\asecom.dll
#SOURCE="$(InputPath)"
"$(IntDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy .\asecom.tlb "$(OUTDIR)\asecom.tlb"
@ -94,13 +94,13 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo /o"release/awk.bsc"
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 aseawk.lib asecmn.lib aseutl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /implib:"release/asecom.lib" /libpath:"$(OutDir)"
# ADD LINK32 aseawk.lib asecmn.lib aseutl.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386 /implib:"release/asecom.lib" /libpath:"$(OutDir)"
# Begin Custom Build - Performing registration
IntDir=.\release
OutDir=.\../release/lib
TargetPath=\projects\ase\release\lib\asecom.dll
InputPath=\projects\ase\release\lib\asecom.dll
SOURCE="$(InputPath)"
IntDir=./release
OutDir=./../release/lib
#TargetPath=\projects\ase\release\lib\asecom.dll
#InputPath=\projects\ase\release\lib\asecom.dll
#SOURCE="$(InputPath)"
"$(IntDir)\regsvr32.trg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
copy .\asecom.tlb "$(OUTDIR)\asecom.tlb"
@ -186,6 +186,10 @@ SOURCE=.\resource.h
SOURCE=.\stdafx.h
# End Source File
# Begin Source File
SOURCE=.\xxx.h
# End Source File
# End Group
# Begin Group "Resource Files"

View File

@ -1,5 +1,5 @@
/*
* $Id: asecom.idl,v 1.8 2007-04-22 08:41:51 bacon Exp $
* $Id: asecom.idl,v 1.1 2007/03/28 14:05:23 bacon Exp $
*/
import "oaidl.idl";
@ -16,161 +16,149 @@ import "ocidl.idl";
interface IAwk : IDispatch
{
[id(1), helpstring("method Parse")]
HRESULT Parse([out,retval] VARIANT_BOOL* ret);
HRESULT Parse([out, retval] int* ret);
[id(2), helpstring("method Run")]
HRESULT Run([in] VARIANT argarray, [out,retval] VARIANT_BOOL* ret);
HRESULT Run([out, retval] int* ret);
[id(3), helpstring("method AddFunction")]
HRESULT AddFunction([in] BSTR name, [in] int minArgs, [in] int maxArgs, [out,retval] VARIANT_BOOL* ret);
[id(3), helpstring("method AddBuiltinFunction")]
HRESULT AddBuiltinFunction([in] BSTR name, [in] int min_args, [in] int max_args, [out, retval] int* ret);
[id(4), helpstring("method DeleteFunction")]
HRESULT DeleteFunction([in] BSTR name, [out,retval] VARIANT_BOOL* ret);
[id(4), helpstring("method DeleteBuiltinFunction")]
HRESULT DeleteBuiltinFunction([in] BSTR name, [out, retval] int* ret);
[propget, id(5), helpstring("property ErrorCode")]
HRESULT ErrorCode([out,retval] int *pVal);
HRESULT ErrorCode([out, retval] int *pVal);
[propget, id(6), helpstring("property ErrorLine")]
HRESULT ErrorLine([out,retval] int *pVal);
HRESULT ErrorLine([out, retval] int *pVal);
[propget, id(7), helpstring("property ErrorMessage")]
HRESULT ErrorMessage([out,retval] BSTR *pVal);
HRESULT ErrorMessage([out, retval] BSTR *pVal);
[propget, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([out,retval] VARIANT_BOOL *pVal);
HRESULT ImplicitVariable([out, retval] BOOL *pVal);
[propput, id(8), helpstring("property ImplicitVariable")]
HRESULT ImplicitVariable([in] VARIANT_BOOL newVal);
HRESULT ImplicitVariable([in] BOOL newVal);
[propget, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([out,retval] VARIANT_BOOL *pVal);
HRESULT ExplicitVariable([out, retval] BOOL *pVal);
[propput, id(9), helpstring("property ExplicitVariable")]
HRESULT ExplicitVariable([in] VARIANT_BOOL newVal);
HRESULT ExplicitVariable([in] BOOL newVal);
[propget, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([out,retval] VARIANT_BOOL *pVal);
HRESULT UniqueFunction([out, retval] BOOL *pVal);
[propput, id(10), helpstring("property UniqueFunction")]
HRESULT UniqueFunction([in] VARIANT_BOOL newVal);
HRESULT UniqueFunction([in] BOOL newVal);
[propget, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([out,retval] VARIANT_BOOL *pVal);
HRESULT VariableShading([out, retval] BOOL *pVal);
[propput, id(11), helpstring("property VariableShading")]
HRESULT VariableShading([in] VARIANT_BOOL newVal);
HRESULT VariableShading([in] BOOL newVal);
[propget, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([out,retval] VARIANT_BOOL *pVal);
HRESULT ShiftOperators([out, retval] BOOL *pVal);
[propput, id(12), helpstring("property ShiftOperators")]
HRESULT ShiftOperators([in] VARIANT_BOOL newVal);
HRESULT ShiftOperators([in] BOOL newVal);
[propget, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([out,retval] VARIANT_BOOL *pVal);
HRESULT IdivOperator([out, retval] BOOL *pVal);
[propput, id(13), helpstring("property IdivOperator")]
HRESULT IdivOperator([in] VARIANT_BOOL newVal);
HRESULT IdivOperator([in] BOOL newVal);
[propget, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([out,retval] VARIANT_BOOL *pVal);
HRESULT ConcatString([out, retval] BOOL *pVal);
[propput, id(14), helpstring("property ConcatString")]
HRESULT ConcatString([in] VARIANT_BOOL newVal);
HRESULT ConcatString([in] BOOL newVal);
[propget, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([out,retval] VARIANT_BOOL *pVal);
HRESULT SupportExtio([out, retval] BOOL *pVal);
[propput, id(15), helpstring("property SupportExtio")]
HRESULT SupportExtio([in] VARIANT_BOOL newVal);
HRESULT SupportExtio([in] BOOL newVal);
[propget, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([out,retval] VARIANT_BOOL *pVal);
HRESULT SupportBlockless([out, retval] BOOL *pVal);
[propput, id(16), helpstring("property SupportBlockless")]
HRESULT SupportBlockless([in] VARIANT_BOOL newVal);
HRESULT SupportBlockless([in] BOOL newVal);
[propget, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([out,retval] VARIANT_BOOL *pVal);
HRESULT StringBaseOne([out, retval] BOOL *pVal);
[propput, id(17), helpstring("property StringBaseOne")]
HRESULT StringBaseOne([in] VARIANT_BOOL newVal);
HRESULT StringBaseOne([in] BOOL newVal);
[propget, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([out,retval] VARIANT_BOOL *pVal);
HRESULT StripSpaces([out, retval] BOOL *pVal);
[propput, id(18), helpstring("property StripSpaces")]
HRESULT StripSpaces([in] VARIANT_BOOL newVal);
HRESULT StripSpaces([in] BOOL newVal);
[propget, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([out,retval] VARIANT_BOOL *pVal);
HRESULT Nextofile([out, retval] BOOL *pVal);
[propput, id(19), helpstring("property Nextofile")]
HRESULT Nextofile([in] VARIANT_BOOL newVal);
HRESULT Nextofile([in] BOOL newVal);
[propget, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([out,retval] VARIANT_BOOL *pVal);
HRESULT UseCrlf([out, retval] BOOL *pVal);
[propput, id(20), helpstring("property UseCrlf")]
HRESULT UseCrlf([in] VARIANT_BOOL newVal);
HRESULT UseCrlf([in] BOOL newVal);
[propget, id(21), helpstring("property ArgumentsToEntryPoint")]
HRESULT ArgumentsToEntryPoint([out,retval] VARIANT_BOOL *pVal);
[propput, id(21), helpstring("property ArgumentsToEntryPoint")]
HRESULT ArgumentsToEntryPoint([in] VARIANT_BOOL newVal);
[propget, id(22), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out,retval] int *pVal);
[propput, id(22), helpstring("property MaxDepthForBlockParse")]
[propget, id(21), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([out, retval] int *pVal);
[propput, id(21), helpstring("property MaxDepthForBlockParse")]
HRESULT MaxDepthForBlockParse([in] int newVal);
[propget, id(23), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([out,retval] int *pVal);
[propput, id(23), helpstring("property MaxDepthForBlockRun")]
[propget, id(22), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([out, retval] int *pVal);
[propput, id(22), helpstring("property MaxDepthForBlockRun")]
HRESULT MaxDepthForBlockRun([in] int newVal);
[propget, id(24), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([out,retval] int *pVal);
[propput, id(24), helpstring("property MaxDepthForExprParse")]
[propget, id(23), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([out, retval] int *pVal);
[propput, id(23), helpstring("property MaxDepthForExprParse")]
HRESULT MaxDepthForExprParse([in] int newVal);
[propget, id(25), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([out,retval] int *pVal);
[propput, id(25), helpstring("property MaxDepthForExprRun")]
[propget, id(24), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([out, retval] int *pVal);
[propput, id(24), helpstring("property MaxDepthForExprRun")]
HRESULT MaxDepthForExprRun([in] int newVal);
[propget, id(26), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([out,retval] int *pVal);
[propput, id(26), helpstring("property MaxDepthForRexBuild")]
[propget, id(25), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([out, retval] int *pVal);
[propput, id(25), helpstring("property MaxDepthForRexBuild")]
HRESULT MaxDepthForRexBuild([in] int newVal);
[propget, id(27), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([out,retval] int *pVal);
[propput, id(27), helpstring("property MaxDepthForRexMatch")]
[propget, id(26), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([out, retval] int *pVal);
[propput, id(26), helpstring("property MaxDepthForRexMatch")]
HRESULT MaxDepthForRexMatch([in] int newVal);
[propget, id(28), helpstring("property EntryPoint")]
HRESULT EntryPoint([out,retval] BSTR *pVal);
[propput, id(28), helpstring("property EntryPoint")]
[propget, id(27), helpstring("property EntryPoint")]
HRESULT EntryPoint([out, retval] BSTR *pVal);
[propput, id(27), helpstring("property EntryPoint")]
HRESULT EntryPoint([in] BSTR newVal);
[propget, id(29), helpstring("property Debug")]
HRESULT Debug([out,retval] VARIANT_BOOL *pVal);
[propput, id(29), helpstring("property Debug")]
HRESULT Debug([in] VARIANT_BOOL newVal);
[propget, id(28), helpstring("property Debug")]
HRESULT Debug([out, retval] BOOL *pVal);
[propput, id(28), helpstring("property Debug")]
HRESULT Debug([in] BOOL newVal);
[propget, id(30), helpstring("property UseLongLong")]
HRESULT UseLongLong([out,retval] VARIANT_BOOL *pVal);
[propput, id(30), helpstring("property UseLongLong")]
HRESULT UseLongLong([in] VARIANT_BOOL newVal);
[propget, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([out, retval] BOOL *pVal);
[propput, id(29), helpstring("property UseLongLong")]
HRESULT UseLongLong([in] BOOL newVal);
};
/* ASECOM */
/* ASELib */
[
uuid(F9C69806-16A1-4162-998A-876B33C470BF),
version(1.0),
helpstring("ASECOM 1.0 Type Library")
helpstring("ASE 1.0 Type Library")
]
library ASECOM
library ASELib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[helpstring("Awk source mode")]
typedef [v1_enum] enum AwkSourceMode
{
AWK_SOURCE_READ = 0,
AWK_SOURCE_WRITE = 1
} AwkSourceMode;
[helpstring("AwkExtio type")]
[helpstring("AwkExtio tpe")]
typedef [v1_enum] enum AwkExtioType
{
AWK_EXTIO_PIPE = 0,
@ -208,7 +196,7 @@ library ASECOM
interface IBuffer : IDispatch
{
[propget, id(1), helpstring("property Value")]
HRESULT Value([out,retval] BSTR *pVal);
HRESULT Value([out, retval] BSTR *pVal);
[propput, id(1), helpstring("property Value")]
HRESULT Value([in] BSTR newVal);
@ -225,16 +213,16 @@ library ASECOM
interface IAwkExtio : IDispatch
{
[propget, id(1), helpstring("property Name")]
HRESULT Name([out,retval] BSTR *pVal);
HRESULT Name([out, retval] BSTR *pVal);
[propget, id(2), helpstring("property Type")]
HRESULT Type([out,retval] AwkExtioType *pVal);
HRESULT Type([out, retval] int *pVal);
[propget, id(3), helpstring("property Mode")]
HRESULT Mode([out,retval] AwkExtioMode *pVal);
HRESULT Mode([out, retval] int *pVal);
[propget, id(4), helpstring("property Handle")]
HRESULT Handle([out,retval] VARIANT *pVal);
HRESULT Handle([out, retval] VARIANT *pVal);
[propput, id(4), helpstring("property Handle")]
HRESULT Handle([in] VARIANT newVal);
};
@ -249,40 +237,37 @@ library ASECOM
properties:
methods:
[id(1), helpstring("open the source code")]
HRESULT OpenSource([in] AwkSourceMode mode, [out,retval] int* ret);
int OpenSource([in] int mode);
[id(2), helpstring("close the source code")]
HRESULT CloseSource([in] AwkSourceMode mode, [out,retval] int* ret);
int CloseSource([in] int mode);
[id(3), helpstring("read the source code")]
HRESULT ReadSource([in] IBuffer* buf, [out,retval] int* ret);
int ReadSource([in] IBuffer* buf);
[id(4), helpstring("write the source code")]
HRESULT WriteSource([in] IBuffer* buf, [out,retval] int* ret);
int WriteSource([in] IBuffer* buf);
[id(5), helpstring("method OpenExtio")]
HRESULT OpenExtio([in] IAwkExtio* extio, [out,retval] int* ret);
int OpenExtio([in] IAwkExtio* extio);
[id(6), helpstring("method CloseExtio")]
HRESULT CloseExtio([in] IAwkExtio* extio, [out,retval] int* ret);
int CloseExtio([in] IAwkExtio* extio);
[id(7), helpstring("method ReadExtio")]
HRESULT ReadExtio([in] IAwkExtio* extio, [in] IBuffer* buf, [out,retval] int* ret);
int ReadExtio([in] IAwkExtio* extio, [in] IBuffer* buf);
[id(8), helpstring("method WriteExtio")]
HRESULT WriteExtio([in] IAwkExtio* extio, [in] IBuffer* buf, [out,retval] int* ret);
int WriteExtio([in] IAwkExtio* extio, [in] IBuffer* buf);
[id(9), helpstring("method FlushExtio")]
HRESULT FlushExtio([in] IAwkExtio* extio, [out,retval] int* ret);
int FlushExtio([in] IAwkExtio* extio);
[id(10), helpstring("method NextExtio")]
HRESULT NextExtio([in] IAwkExtio* extio, [out,retval] int* ret);
int NextExtio([in] IAwkExtio* extio);
[id(11), helpstring("method HandleFunction")]
HRESULT HandleFunction([in] BSTR name, [in] VARIANT argarray, [out,retval] VARIANT* ret);
/*[id(12), helpstring("method OnClose")]
HRESULT OnClose([out,retval] int* ret);*/
[id(11), helpstring("method HandleBuiltinFunction")]
int HandleBuiltinFunction([in] BSTR name, [in] VARIANT argarray, [out, retval] VARIANT* ret);
};
/* Awk */

View File

@ -1,4 +1,4 @@
// Microsoft Visual C++ generated resource script.
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// TEXTINCLUDE
//
1 TEXTINCLUDE
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
3 TEXTINCLUDE DISCARDABLE
BEGIN
"1 TYPELIB ""asecom.tlb""\r\n"
"\0"
@ -47,14 +47,15 @@ END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -67,15 +68,17 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BLOCK "040904B0"
BEGIN
VALUE "FileDescription", "ASE.COM"
VALUE "FileVersion", "1, 0, 0, 0"
VALUE "InternalName", "ASECOM"
VALUE "LegalCopyright", "Hyung-Hwan Chung. All rights reserved"
VALUE "OriginalFilename", "asecom.dll"
VALUE "ProductName", "ASE.COM"
VALUE "ProductVersion", "1, 0, 0, 0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "ASE COM Module\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "ASE\0"
VALUE "LegalCopyright", "Copyright 2006\0"
VALUE "OriginalFilename", "asecom.dll\0"
VALUE "ProductName", "ASE COM Module\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "OLESelfRegister", "\0"
END
END
BLOCK "VarFileInfo"
@ -84,22 +87,24 @@ BEGIN
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// REGISTRY
//
IDR_AWK REGISTRY "Awk.rgs"
IDR_AWKEXTIO REGISTRY "AwkExtio.rgs"
IDR_BUFFER REGISTRY "Buffer.rgs"
IDR_AWK REGISTRY DISCARDABLE "Awk.rgs"
IDR_AWKEXTIO REGISTRY DISCARDABLE "AwkExtio.rgs"
IDR_BUFFER REGISTRY DISCARDABLE "Buffer.rgs"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
STRINGTABLE DISCARDABLE
BEGIN
IDS_PROJNAME "ASE COM Project"
END

View File

@ -1,5 +1,5 @@
/*
* $Id: awk_cp.h,v 1.11 2007-04-15 13:15:35 bacon Exp $
* $Id: awk_cp.h,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/
@ -506,7 +506,7 @@ public:
return -1;
}
int Fire_HandleFunction (
int Fire_HandleBuiltinFunction (
ase_awk_run_t* run, BSTR name, SAFEARRAY* argarray, ase_awk_val_t** retv)
{
T* pT = static_cast<T*>(this);
@ -595,43 +595,7 @@ public:
return 2; /* no proper handler */
}
INT Fire_OnClose ()
{
T* pT = static_cast<T*>(this);
int i, nconns = m_vec.GetSize();
CComVariant ret;
for (i = 0; i < nconns; i++)
{
pT->Lock();
CComPtr<IUnknown> sp = m_vec.GetAt(i);
pT->Unlock();
IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
if (pDispatch == NULL) continue;
VariantClear (&ret);
HRESULT hr = pDispatch->Invoke(
0xC, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_METHOD, NULL, &ret, NULL, NULL);
if (FAILED(hr)) continue;
if (ret.vt == VT_EMPTY) continue;
hr = ret.ChangeType (VT_I4);
if (FAILED(hr))
{
/* TODO: set the error code properly... */
/* invalid value returned... */
return -1;
}
return ret.lVal;
}
return -1;
}
};
#endif

View File

@ -1,6 +1,6 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by asecom.rc
// Used by ase.rc
//
#define IDS_PROJNAME 100
#define IDR_AWK 101

View File

@ -1,5 +1,5 @@
/*
* $Id: stdafx.cpp,v 1.3 2007-02-03 10:52:12 bacon Exp $
* $Id: stdafx.cpp,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/

View File

@ -1,5 +1,5 @@
/*
* $Id: stdafx.h,v 1.3 2007-02-03 10:52:12 bacon Exp $
* $Id: stdafx.h,v 1.1 2007/03/28 14:05:23 bacon Exp $
*
* {License}
*/

Some files were not shown because too many files have changed in this diff Show More