*** empty log message ***
This commit is contained in:
parent
d477a74b7f
commit
0260cdcdbf
@ -1,4 +1,4 @@
|
||||
LIBRARY "sseawk.dll"
|
||||
LIBRARY "aseawk.dll"
|
||||
|
||||
EXPORTS
|
||||
sse_awk_open
|
||||
|
@ -1,41 +1,46 @@
|
||||
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
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
OUT = aseawk
|
||||
|
||||
JAVA_INC = \
|
||||
/I"C:\Program Files\IBM\Java141\Include" \
|
||||
/I"C:\Program Files\IBM\Java141\Include\Win32"
|
||||
# source files
|
||||
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 = $(C_SRCS) jni.c
|
||||
JAVA_SRCS = Awk.java Exception.java Extio.java
|
||||
|
||||
# object files
|
||||
C_OBJS = $(C_SRCS:.c=.obj)
|
||||
JNI_OBJS = $(JNI_SRCS:.c=.obj)
|
||||
JAVA_OBJS = $(JAVA_SRCS:.java=.class)
|
||||
|
||||
JNI_INC = \
|
||||
/I"C:\Program Files\Java\jdk1.5.0_09\include" \
|
||||
/I"C:\Program Files\Java\jdk1.5.0_09\include\win32"
|
||||
|
||||
CC = cl
|
||||
LD = link
|
||||
CFLAGS = /nologo /O2 /MT /W3 /GR- /Za -I../.. -DSSE_CHAR_IS_WCHAR $(JAVA_INC)
|
||||
JAVAC = javac
|
||||
|
||||
all: lib
|
||||
CFLAGS = /nologo /O2 /MT /W3 /GR- /Za -I../.. -DSSE_CHAR_IS_WCHAR $(JNI_INC)
|
||||
JAVACFLAGS = -classpath ../..
|
||||
|
||||
all: lib jni
|
||||
|
||||
lib: $(OBJS)
|
||||
$(LD) /lib @<<
|
||||
/nologo /out:$(OUT).lib $(OBJS)
|
||||
<<
|
||||
|
||||
dll: $(OBJS)
|
||||
$(LD) /dll /def:awk.def /subsystem:console /version:0.1 /release @<<
|
||||
/nologo /out:$(OUT).dll $(OBJS)
|
||||
<<
|
||||
|
||||
jni: $(OBJS) jni.obj
|
||||
jni: $(JNI_OBJS) $(JAVA_OBJS)
|
||||
$(LD) /dll /def:jni.def /subsystem:console /version:0.1 /release @<<
|
||||
/nologo /out:$(OUT).dll $(OBJS) jni.obj
|
||||
/nologo /out:$(OUT).dll $(JNI_OBJS)
|
||||
<<
|
||||
|
||||
java:
|
||||
javac -classpath ../.. Awk.java Extio.java Exception.java
|
||||
|
||||
clean:
|
||||
del $(OBJS) $(OUT) *.obj *.class
|
||||
|
||||
.SUFFIXES: .c .obj
|
||||
.SUFFIXES: .c .obj .java .class
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) /c $<
|
||||
|
||||
.java.class:
|
||||
$(JAVAC) $(JAVACFLAGS) $<
|
||||
|
85
ase/lsp/lsp_i.h
Normal file
85
ase/lsp/lsp_i.h
Normal file
@ -0,0 +1,85 @@
|
||||
/*
|
||||
* $Id: lsp_i.h,v 1.1 2006-10-24 15:10:25 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ASE_LSP_LSPI_H_
|
||||
#define _ASE_LSP_LSPI_H_
|
||||
|
||||
#include <ase/lsp/lsp.h>
|
||||
#include <ase/lsp/token.h>
|
||||
#include <ase/lsp/mem.h>
|
||||
#include <ase/lsp/misc.h>
|
||||
#include <ase/lsp/prim.h>
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define ase_lsp_assert(lsp,expr) ((void)0)
|
||||
#else
|
||||
#define ase_lsp_assert(lsp,expr) (void)((expr) || \
|
||||
(ase_lsp_abort(lsp, ASE_T(#expr), ASE_T(__FILE__), __LINE__), 0))
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (disable: 4996)
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(_DEBUG)
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <crtdbg.h>
|
||||
|
||||
#define ASE_LSP_MALLOC(lsp,size) malloc (size)
|
||||
#define ASE_LSP_REALLOC(lsp,ptr,size) realloc (ptr, size)
|
||||
#define ASE_LSP_FREE(lsp,ptr) free (ptr)
|
||||
#else
|
||||
#define ASE_LSP_MALLOC(lsp,size) \
|
||||
(lsp)->syscas.malloc (size, (lsp)->syscas.custom_data)
|
||||
#define ASE_LSP_REALLOC(lsp,ptr,size) \
|
||||
(lsp)->syscas.realloc (ptr, size, (lsp)->syscas.custom_data)
|
||||
#define ASE_LSP_FREE(lsp,ptr) \
|
||||
(lsp)->syscas.free (ptr, (lsp)->syscas.custom_data)
|
||||
#endif
|
||||
|
||||
#define ASE_LSP_ISUPPER(lsp,c) (lsp)->syscas.is_upper(c)
|
||||
#define ASE_LSP_ISLOWER(lsp,c) (lsp)->syscas.is_lower(c)
|
||||
#define ASE_LSP_ISALPHA(lsp,c) (lsp)->syscas.is_alpha(c)
|
||||
#define ASE_LSP_ISDIGIT(lsp,c) (lsp)->syscas.is_digit(c)
|
||||
#define ASE_LSP_ISXDIGIT(lsp,c) (lsp)->syscas.is_xdigit(c)
|
||||
#define ASE_LSP_ISALNUM(lsp,c) (lsp)->syscas.is_alnum(c)
|
||||
#define ASE_LSP_ISSPACE(lsp,c) (lsp)->syscas.is_space(c)
|
||||
#define ASE_LSP_ISPRINT(lsp,c) (lsp)->syscas.is_print(c)
|
||||
#define ASE_LSP_ISGRAPH(lsp,c) (lsp)->syscas.is_graph(c)
|
||||
#define ASE_LSP_ISCNTRL(lsp,c) (lsp)->syscas.is_cntrl(c)
|
||||
#define ASE_LSP_ISPUNCT(lsp,c) (lsp)->syscas.is_punct(c)
|
||||
#define ASE_LSP_TOUPPER(lsp,c) (lsp)->syscas.to_upper(c)
|
||||
#define ASE_LSP_TOLOWER(lsp,c) (lsp)->syscas.to_lower(c)
|
||||
|
||||
#define ASE_LSP_MEMCPY(lsp,dst,src,len) (lsp)->syscas.memcpy (dst, src, len)
|
||||
#define ASE_LSP_MEMSET(lsp,dst,val,len) (lsp)->syscas.memset (dst, val, len)
|
||||
|
||||
struct ase_lsp_t
|
||||
{
|
||||
ase_lsp_syscas_t syscas;
|
||||
|
||||
/* error number */
|
||||
int errnum;
|
||||
int opt_undef_symbol;
|
||||
|
||||
/* for read */
|
||||
ase_cint_t curc;
|
||||
ase_lsp_token_t token;
|
||||
|
||||
/* io functions */
|
||||
ase_lsp_io_t input_func;
|
||||
ase_lsp_io_t output_func;
|
||||
void* input_arg;
|
||||
void* output_arg;
|
||||
|
||||
/* security options */
|
||||
ase_size_t max_eval_depth;
|
||||
ase_size_t cur_eval_depth;
|
||||
|
||||
/* memory manager */
|
||||
ase_lsp_mem_t* mem;
|
||||
ase_bool_t __dynamic;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,16 +1,18 @@
|
||||
SRCS = lsp.c name.c token.c array.c mem.c env.c err.c \
|
||||
read.c eval.c print.c \
|
||||
OUT = aselsp
|
||||
|
||||
SRCS = lsp.c name.c token.c array.c mem.c env.c err.c read.c eval.c print.c \
|
||||
prim.c prim_prog.c prim_let.c prim_compar.c prim_math.c
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
OUT = aselsp.lib
|
||||
|
||||
CC = cl
|
||||
LD = link
|
||||
CFLAGS = /nologo /O2 /MT /W3 /GR- /Za -I../.. -DSSE_CHAR_IS_WCHAR
|
||||
|
||||
all: $(OBJS)
|
||||
all: lib
|
||||
|
||||
lib: $(OBJS)
|
||||
$(LD) -lib @<<
|
||||
/nologo /out:$(OUT) $(OBJS)
|
||||
/nologo /out:$(OUT).lib $(OBJS)
|
||||
<<
|
||||
|
||||
clean:
|
||||
|
Loading…
x
Reference in New Issue
Block a user