*** empty log message ***
This commit is contained in:
parent
8666a05126
commit
e39140359a
@ -1,22 +1,22 @@
|
|||||||
LIBRARY "xpawk.dll"
|
LIBRARY "sseawk.dll"
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
xp_awk_open
|
sse_awk_open
|
||||||
xp_awk_close
|
sse_awk_close
|
||||||
|
|
||||||
xp_awk_geterrnum
|
sse_awk_geterrnum
|
||||||
xp_awk_geterrstr
|
sse_awk_geterrstr
|
||||||
|
|
||||||
xp_awk_clear
|
sse_awk_clear
|
||||||
xp_awk_setparseopt
|
sse_awk_setparseopt
|
||||||
xp_awk_setrunopt
|
sse_awk_setrunopt
|
||||||
|
|
||||||
xp_awk_attsrc
|
sse_awk_attsrc
|
||||||
xp_awk_detsrc
|
sse_awk_detsrc
|
||||||
|
|
||||||
xp_awk_parse
|
sse_awk_parse
|
||||||
xp_awk_run
|
sse_awk_run
|
||||||
|
|
||||||
xp_awk_printf
|
sse_awk_printf
|
||||||
xp_awk_strcmp
|
sse_awk_strcmp
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ objects = awk.obj,err.obj,extio.obj,func.obj,map.obj,misc.obj,parse.obj,rex.obj,
|
|||||||
CFLAGS = /pointer_size=long /define=XP_AWK_STAND_ALONE
|
CFLAGS = /pointer_size=long /define=XP_AWK_STAND_ALONE
|
||||||
LIBRFLAGS =
|
LIBRFLAGS =
|
||||||
|
|
||||||
xpawk.olb : $(objects)
|
sseawk.olb : $(objects)
|
||||||
$(LIBR)/create $(MMS$TARGET)
|
$(LIBR)/create $(MMS$TARGET)
|
||||||
$(LIBR)/replace $(LIBRFLAGS) $(MMS$TARGET) $(objects)
|
$(LIBR)/replace $(LIBRFLAGS) $(MMS$TARGET) $(objects)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: jni.c,v 1.12 2006-10-22 11:34:53 bacon Exp $
|
* $Id: jni.c,v 1.13 2006-10-22 11:40:51 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sse/awk/jni.h>
|
#include <sse/awk/jni.h>
|
||||||
@ -10,7 +10,7 @@
|
|||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#define EXCEPTION_AWK "ssekit/ssej/awk/AwkException"
|
#define EXCEPTION_AWK "sse/awk/AwkException"
|
||||||
#define FIELD_AWK "__awk"
|
#define FIELD_AWK "__awk"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
@ -60,7 +60,7 @@ static void __awk_free (void* ptr, void* custom_data)
|
|||||||
free (ptr);
|
free (ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_open (JNIEnv* env, jobject obj)
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_open (JNIEnv* env, jobject obj)
|
||||||
{
|
{
|
||||||
jclass class;
|
jclass class;
|
||||||
jfieldID fid;
|
jfieldID fid;
|
||||||
@ -125,7 +125,7 @@ JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_open (JNIEnv* env, jobject obj)
|
|||||||
printf ("__awk(native) done => %u, 0x%X\n", awk, awk);
|
printf ("__awk(native) done => %u, 0x%X\n", awk, awk);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_close (JNIEnv* env, jobject obj)
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_close (JNIEnv* env, jobject obj)
|
||||||
{
|
{
|
||||||
jclass class;
|
jclass class;
|
||||||
jfieldID fid;
|
jfieldID fid;
|
||||||
@ -141,7 +141,7 @@ JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_close (JNIEnv* env, jobject obj
|
|||||||
printf ("close (native) done\n");
|
printf ("close (native) done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_parse (JNIEnv* env, jobject obj)
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_parse (JNIEnv* env, jobject obj)
|
||||||
{
|
{
|
||||||
jclass class;
|
jclass class;
|
||||||
jfieldID fid;
|
jfieldID fid;
|
||||||
@ -176,7 +176,7 @@ printf ("parse error -> line [%d] %S\n", sse_awk_getsrcline(awk), sse_awk_geterr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_run (JNIEnv* env, jobject obj)
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_run (JNIEnv* env, jobject obj)
|
||||||
{
|
{
|
||||||
jclass class;
|
jclass class;
|
||||||
jfieldID fid;
|
jfieldID fid;
|
||||||
@ -211,14 +211,14 @@ JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_run (JNIEnv* env, jobject obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_set_1extio (
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_set_1extio (
|
||||||
JNIEnv* env, jobject obj, jlong extio, jobject handle)
|
JNIEnv* env, jobject obj, jlong extio, jobject handle)
|
||||||
{
|
{
|
||||||
sse_awk_extio_t* epa = (sse_awk_extio_t*)extio;
|
sse_awk_extio_t* epa = (sse_awk_extio_t*)extio;
|
||||||
epa->handle = (void*)handle;
|
epa->handle = (void*)handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIESSEORT jobject JNICALL Java_ssekit_ssej_awk_Awk_get_1extio (
|
JNIESSEORT jobject JNICALL Java_sse_awk_Awk_get_1extio (
|
||||||
JNIEnv* env, jobject obj, jlong extio)
|
JNIEnv* env, jobject obj, jlong extio)
|
||||||
{
|
{
|
||||||
sse_awk_extio_t* epa = (sse_awk_extio_t*)extio;
|
sse_awk_extio_t* epa = (sse_awk_extio_t*)extio;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
LIBRARY "xpawk.dll"
|
LIBRARY "sseawk.dll"
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
Java_xpkit_xpj_awk_Awk_open
|
Java_sse_awk_Awk_open
|
||||||
Java_xpkit_xpj_awk_Awk_close
|
Java_sse_awk_Awk_close
|
||||||
Java_xpkit_xpj_awk_Awk_parse
|
Java_sse_awk_Awk_parse
|
||||||
Java_xpkit_xpj_awk_Awk_run
|
Java_sse_awk_Awk_run
|
||||||
Java_xpkit_xpj_awk_Awk_get_1extio
|
Java_sse_awk_Awk_get_1extio
|
||||||
Java_xpkit_xpj_awk_Awk_set_1extio
|
Java_sse_awk_Awk_set_1extio
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: jni.h,v 1.4 2006-10-22 11:34:53 bacon Exp $
|
* $Id: jni.h,v 1.5 2006-10-22 11:40:51 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SSE_AWK_JNI_H_
|
#ifndef _SSE_AWK_JNI_H_
|
||||||
@ -11,10 +11,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_open (JNIEnv*, jobject);
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_open (JNIEnv*, jobject);
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_close (JNIEnv*, jobject);
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_close (JNIEnv*, jobject);
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_parse (JNIEnv*, jobject);
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_parse (JNIEnv*, jobject);
|
||||||
JNIESSEORT void JNICALL Java_ssekit_ssej_awk_Awk_run (JNIEnv*, jobject);
|
JNIESSEORT void JNICALL Java_sse_awk_Awk_run (JNIEnv*, jobject);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.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
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
OBJS = $(SRCS:.c=.obj)
|
OBJS = $(SRCS:.c=.obj)
|
||||||
OUT = xpawk.lib
|
OUT = sseawk.lib
|
||||||
|
|
||||||
CC = bcc32
|
CC = bcc32
|
||||||
CFLAGS = -O2 -WM -w -w-inl -w-sig -w-spa -w-hid -RT- -I../.. -DXP_AWK_STAND_ALONE -DXP_CHAR_IS_WCHAR
|
CFLAGS = -O2 -WM -w -w-inl -w-sig -w-spa -w-hid -RT- -I../..
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
tlib $(OUT) @&&!
|
tlib $(OUT) @&&!
|
||||||
|
@ -2,7 +2,7 @@ SRCS = \
|
|||||||
awk.c err.c tree.c str.c tab.c map.c parse.c \
|
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
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
OBJS = $(SRCS:.c=.obj)
|
OBJS = $(SRCS:.c=.obj)
|
||||||
OUT = xpawk
|
OUT = sseawk
|
||||||
|
|
||||||
JAVA_INC = \
|
JAVA_INC = \
|
||||||
/I"C:\Program Files\IBM\Java141\Include" \
|
/I"C:\Program Files\IBM\Java141\Include" \
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.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
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
OUT = libxpawk.a
|
OUT = libsseawk.a
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
CFLAGS = -Wall -I../.. -DXP_AWK_STAND_ALONE
|
CFLAGS = -Wall -I../..
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
ar cr $(OUT) $(OBJS)
|
ar cr $(OUT) $(OBJS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.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
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
OUT = libxpawk.a
|
OUT = libsseawk.a
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c run.c rec.c val.c misc.c
|
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c run.c rec.c val.c misc.c
|
||||||
OBJS = awk.obj err.obj tree.obj str.obj tab.obj map.obj parse.obj run.obj rec.obj val.obj misc.obj
|
OBJS = awk.obj err.obj tree.obj str.obj tab.obj map.obj parse.obj run.obj rec.obj val.obj misc.obj
|
||||||
OUT = xpawk.lib
|
OUT = sseawk.lib
|
||||||
|
|
||||||
CC = lcc
|
CC = lcc
|
||||||
CFLAGS = -I../.. -A -ansic -libcdll -DXP_AWK_STAND_ALONE
|
CFLAGS = -I../.. -A -ansic -libcdll
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
SRCS = awk.c err.c tree.c str.c tab.c map.c parse.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
|
run.c rec.c val.c func.c misc.c extio.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
OUT = libxpawk.a
|
OUT = libsseawk.a
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
CFLAGS = -Xc -a ansi -w3 -O2 -I../.. -DXP_AWK_STAND_ALONE
|
CFLAGS = -Xc -a ansi -w3 -O2 -I../..
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
ar cr $(OUT) $(OBJS)
|
ar cr $(OUT) $(OBJS)
|
||||||
|
@ -2,11 +2,11 @@ SRCS = \
|
|||||||
awk.c err.c tree.c str.c tab.c map.c parse.c \
|
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
|
run.c rec.c val.c func.c misc.c extio.c rex.c
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
OUT = libxpawk.a
|
OUT = libsseawk.a
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
#CFLAGS = -m64 -O2 -Wall -std=c89 -pedantic -I../.. -DXP_AWK_STAND_ALONE
|
#CFLAGS = -m64 -O2 -Wall -std=c89 -pedantic -I../..
|
||||||
CFLAGS = -m64 -O2 -Wall -I../.. -DXP_AWK_STAND_ALONE
|
CFLAGS = -m64 -O2 -Wall -I../..
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
ar cr $(OUT) $(OBJS)
|
ar cr $(OUT) $(OBJS)
|
||||||
|
@ -6,11 +6,11 @@ SRCS = awk.c err.c tree.c str.c tab.c map.c parse.c \
|
|||||||
run.c rec.c val.c misc.c extio.c rex.c
|
run.c rec.c val.c misc.c extio.c rex.c
|
||||||
OBJS = awk.obj err.obj tree.obj str.obj tab.obj map.obj parse.obj \
|
OBJS = awk.obj err.obj tree.obj str.obj tab.obj map.obj parse.obj \
|
||||||
run.obj rec.obj val.obj misc.obj extio.obj rex.obj
|
run.obj rec.obj val.obj misc.obj extio.obj rex.obj
|
||||||
OUT = xpawk.lib
|
OUT = sseawk.lib
|
||||||
|
|
||||||
CC = tcc
|
CC = tcc
|
||||||
AR = tlib
|
AR = tlib
|
||||||
CFLAGS = -1 -O -mh -w -f87 -G -I..\.. -Ddos -DXP_AWK_STAND_ALONE
|
CFLAGS = -1 -O -mh -w -f87 -G -I..\.. -Ddos
|
||||||
|
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
-del $(OUT)
|
-del $(OUT)
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: conf_dos.h,v 1.5 2006-05-06 16:05:12 bacon Exp $
|
* $Id: conf_dos.h,v 1.6 2006-10-22 11:46:18 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(__LARGE__) && !defined(__HUGE__)
|
#if !defined(__LARGE__) && !defined(__HUGE__)
|
||||||
#error this library supports the large and the huge memory models only
|
#error this library supports the large and the huge memory models only
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_ENDIAN_LITTLE
|
#define SSE_ENDIAN_LITTLE
|
||||||
|
|
||||||
#define XP_SIZEOF_CHAR 1
|
#define SSE_SIZEOF_CHAR 1
|
||||||
#define XP_SIZEOF_SHORT 2
|
#define SSE_SIZEOF_SHORT 2
|
||||||
#define XP_SIZEOF_INT 2
|
#define SSE_SIZEOF_INT 2
|
||||||
#define XP_SIZEOF_LONG 4
|
#define SSE_SIZEOF_LONG 4
|
||||||
#define XP_SIZEOF_LONG_LONG 0
|
#define SSE_SIZEOF_LONG_LONG 0
|
||||||
|
|
||||||
#define XP_SIZEOF___INT8 0
|
#define SSE_SIZEOF___INT8 0
|
||||||
#define XP_SIZEOF___INT16 0
|
#define SSE_SIZEOF___INT16 0
|
||||||
#define XP_SIZEOF___INT32 0
|
#define SSE_SIZEOF___INT32 0
|
||||||
#define XP_SIZEOF___INT64 0
|
#define SSE_SIZEOF___INT64 0
|
||||||
#define XP_SIZEOF___INT96 0
|
#define SSE_SIZEOF___INT96 0
|
||||||
#define XP_SIZEOF___INT128 0
|
#define SSE_SIZEOF___INT128 0
|
||||||
|
|
||||||
#define XP_SIZEOF_VOID_P 4
|
#define SSE_SIZEOF_VOID_P 4
|
||||||
|
|
||||||
#define XP_SIZEOF_FLOAT 4
|
#define SSE_SIZEOF_FLOAT 4
|
||||||
#define XP_SIZEOF_DOUBLE 8
|
#define SSE_SIZEOF_DOUBLE 8
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 10 /* turbo c 2.01 */
|
#define SSE_SIZEOF_LONG_DOUBLE 10 /* turbo c 2.01 */
|
||||||
#define XP_SIZEOF_WCHAR_T 0
|
#define SSE_SIZEOF_WCHAR_T 0
|
||||||
|
|
||||||
#define XP_CHAR_IS_MCHAR
|
#define SSE_CHAR_IS_MCHAR
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: conf_msw.h,v 1.3 2006-05-06 16:05:12 bacon Exp $
|
* $Id: conf_msw.h,v 1.4 2006-10-22 11:46:18 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -17,34 +17,34 @@ _M_IX86 x86 platform
|
|||||||
_M_X64 x64 platform
|
_M_X64 x64 platform
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define XP_ENDIAN_LITTLE
|
#define SSE_ENDIAN_LITTLE
|
||||||
|
|
||||||
#define XP_SIZEOF_CHAR 1
|
#define SSE_SIZEOF_CHAR 1
|
||||||
#define XP_SIZEOF_SHORT 2
|
#define SSE_SIZEOF_SHORT 2
|
||||||
#define XP_SIZEOF_INT 4
|
#define SSE_SIZEOF_INT 4
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
#define XP_SIZEOF_LONG 8
|
#define SSE_SIZEOF_LONG 8
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_LONG 4
|
#define SSE_SIZEOF_LONG 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF_LONG_LONG 0
|
#define SSE_SIZEOF_LONG_LONG 0
|
||||||
|
|
||||||
#define XP_SIZEOF___INT8 1
|
#define SSE_SIZEOF___INT8 1
|
||||||
#define XP_SIZEOF___INT16 2
|
#define SSE_SIZEOF___INT16 2
|
||||||
#define XP_SIZEOF___INT32 4
|
#define SSE_SIZEOF___INT32 4
|
||||||
#define XP_SIZEOF___INT64 8
|
#define SSE_SIZEOF___INT64 8
|
||||||
#define XP_SIZEOF___INT96 0
|
#define SSE_SIZEOF___INT96 0
|
||||||
#define XP_SIZEOF___INT128 0
|
#define SSE_SIZEOF___INT128 0
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
#define XP_SIZEOF_VOID_P 8
|
#define SSE_SIZEOF_VOID_P 8
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_VOID_P 4
|
#define SSE_SIZEOF_VOID_P 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF_FLOAT 4
|
#define SSE_SIZEOF_FLOAT 4
|
||||||
#define XP_SIZEOF_DOUBLE 8
|
#define SSE_SIZEOF_DOUBLE 8
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 16
|
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||||
#define XP_SIZEOF_WCHAR_T 2
|
#define SSE_SIZEOF_WCHAR_T 2
|
||||||
|
@ -1,71 +1,71 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: conf_vms.h,v 1.5 2006-05-06 16:05:12 bacon Exp $
|
* $Id: conf_vms.h,v 1.6 2006-10-22 11:46:18 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* TODO: please complete the itanium portion */
|
/* TODO: please complete the itanium portion */
|
||||||
|
|
||||||
/* both vax and alpha are in the little endian. */
|
/* both vax and alpha are in the little endian. */
|
||||||
#define XP_ENDIAN_LITTLE
|
#define SSE_ENDIAN_LITTLE
|
||||||
|
|
||||||
#define XP_SIZEOF_CHAR 1
|
#define SSE_SIZEOF_CHAR 1
|
||||||
#define XP_SIZEOF_SHORT 2
|
#define SSE_SIZEOF_SHORT 2
|
||||||
#define XP_SIZEOF_INT 4
|
#define SSE_SIZEOF_INT 4
|
||||||
#define XP_SIZEOF_LONG 4
|
#define SSE_SIZEOF_LONG 4
|
||||||
|
|
||||||
#if defined(vax) || defined(__vax)
|
#if defined(vax) || defined(__vax)
|
||||||
#define XP_SIZEOF_LONG_LONG 0
|
#define SSE_SIZEOF_LONG_LONG 0
|
||||||
#elif defined(alpha) || defined(__alpha)
|
#elif defined(alpha) || defined(__alpha)
|
||||||
#define XP_SIZEOF_LONG_LONG 8
|
#define SSE_SIZEOF_LONG_LONG 8
|
||||||
#elif defined(itanium) || defined(__itanium)
|
#elif defined(itanium) || defined(__itanium)
|
||||||
#define XP_SIZEOF_LONG_LONG 8
|
#define SSE_SIZEOF_LONG_LONG 8
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_LONG_LONG 0
|
#define SSE_SIZEOF_LONG_LONG 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF___INT8 1
|
#define SSE_SIZEOF___INT8 1
|
||||||
#define XP_SIZEOF___INT16 2
|
#define SSE_SIZEOF___INT16 2
|
||||||
#define XP_SIZEOF___INT32 4
|
#define SSE_SIZEOF___INT32 4
|
||||||
|
|
||||||
#if defined(vax) || defined(__vax)
|
#if defined(vax) || defined(__vax)
|
||||||
#define XP_SIZEOF___INT64 0
|
#define SSE_SIZEOF___INT64 0
|
||||||
#elif defined(alpha) || defined(__alpha)
|
#elif defined(alpha) || defined(__alpha)
|
||||||
#define XP_SIZEOF___INT64 8
|
#define SSE_SIZEOF___INT64 8
|
||||||
#elif defined(itanium) || defined(__itanium)
|
#elif defined(itanium) || defined(__itanium)
|
||||||
#define XP_SIZEOF___INT64 8
|
#define SSE_SIZEOF___INT64 8
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF___INT64 0
|
#define SSE_SIZEOF___INT64 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF___INT96 0
|
#define SSE_SIZEOF___INT96 0
|
||||||
#define XP_SIZEOF___INT128 0
|
#define SSE_SIZEOF___INT128 0
|
||||||
|
|
||||||
#if defined(vax) || defined(__vax)
|
#if defined(vax) || defined(__vax)
|
||||||
#define XP_SIZEOF_VOID_P 4
|
#define SSE_SIZEOF_VOID_P 4
|
||||||
#elif defined(alpha) || defined(__alpha)
|
#elif defined(alpha) || defined(__alpha)
|
||||||
/*#pragma pointer_size 32
|
/*#pragma pointer_size 32
|
||||||
#define XP_SIZEOF_VOID_P 4*/
|
#define SSE_SIZEOF_VOID_P 4*/
|
||||||
#pragma pointer_size 64
|
#pragma pointer_size 64
|
||||||
#define XP_SIZEOF_VOID_P 8
|
#define SSE_SIZEOF_VOID_P 8
|
||||||
#elif defined(itanium) || defined(__itanium)
|
#elif defined(itanium) || defined(__itanium)
|
||||||
/*#pragma pointer_size 32
|
/*#pragma pointer_size 32
|
||||||
#define XP_SIZEOF_VOID_P 4*/
|
#define SSE_SIZEOF_VOID_P 4*/
|
||||||
#pragma pointer_size 64
|
#pragma pointer_size 64
|
||||||
#define XP_SIZEOF_VOID_P 8
|
#define SSE_SIZEOF_VOID_P 8
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_VOID_P 0
|
#define SSE_SIZEOF_VOID_P 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF_FLOAT 4
|
#define SSE_SIZEOF_FLOAT 4
|
||||||
#define XP_SIZEOF_DOUBLE 8
|
#define SSE_SIZEOF_DOUBLE 8
|
||||||
|
|
||||||
#if defined(vax) || defined(__vax)
|
#if defined(vax) || defined(__vax)
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 8
|
#define SSE_SIZEOF_LONG_DOUBLE 8
|
||||||
#elif defined(alpha) || defined(__alpha)
|
#elif defined(alpha) || defined(__alpha)
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 16
|
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||||
#elif defined(itanium) || defined(__itanium)
|
#elif defined(itanium) || defined(__itanium)
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 16
|
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 0
|
#define SSE_SIZEOF_LONG_DOUBLE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_SIZEOF_WCHAR_T 4
|
#define SSE_SIZEOF_WCHAR_T 4
|
||||||
|
@ -1,78 +1,78 @@
|
|||||||
/* Big Endian */
|
/* Big Endian */
|
||||||
#undef XP_ENDIAN_BIG
|
#undef SSE_ENDIAN_BIG
|
||||||
|
|
||||||
/* Little Endian */
|
/* Little Endian */
|
||||||
#undef XP_ENDIAN_LITTLE
|
#undef SSE_ENDIAN_LITTLE
|
||||||
|
|
||||||
/* Unknown Endian */
|
/* Unknown Endian */
|
||||||
#undef XP_ENDIAN_UNKNOWN
|
#undef SSE_ENDIAN_UNKNOWN
|
||||||
|
|
||||||
/* long long */
|
/* long long */
|
||||||
#undef XP_HAVE_LONG_LONG
|
#undef SSE_HAVE_LONG_LONG
|
||||||
|
|
||||||
/* long double */
|
/* long double */
|
||||||
#undef XP_HAVE_LONG_DOUBLE
|
#undef SSE_HAVE_LONG_DOUBLE
|
||||||
|
|
||||||
/* data type size */
|
/* data type size */
|
||||||
#define XP_SIZEOF_CHAR 0
|
#define SSE_SIZEOF_CHAR 0
|
||||||
#define XP_SIZEOF_SHORT 0
|
#define SSE_SIZEOF_SHORT 0
|
||||||
#define XP_SIZEOF_INT 0
|
#define SSE_SIZEOF_INT 0
|
||||||
#define XP_SIZEOF_LONG 0
|
#define SSE_SIZEOF_LONG 0
|
||||||
#define XP_SIZEOF_LONG_LONG 0
|
#define SSE_SIZEOF_LONG_LONG 0
|
||||||
#define XP_SIZEOF___INT8 0
|
#define SSE_SIZEOF___INT8 0
|
||||||
#define XP_SIZEOF___INT16 0
|
#define SSE_SIZEOF___INT16 0
|
||||||
#define XP_SIZEOF___INT32 0
|
#define SSE_SIZEOF___INT32 0
|
||||||
#define XP_SIZEOF___INT64 0
|
#define SSE_SIZEOF___INT64 0
|
||||||
#define XP_SIZEOF___INT128 0
|
#define SSE_SIZEOF___INT128 0
|
||||||
#define XP_SIZEOF_VOID_P 0
|
#define SSE_SIZEOF_VOID_P 0
|
||||||
#define XP_SIZEOF_FLOAT 0
|
#define SSE_SIZEOF_FLOAT 0
|
||||||
#define XP_SIZEOF_DOUBLE 0
|
#define SSE_SIZEOF_DOUBLE 0
|
||||||
#define XP_SIZEOF_LONG_DOUBLE 0
|
#define SSE_SIZEOF_LONG_DOUBLE 0
|
||||||
#define XP_SIZEOF_PID_T 0
|
#define SSE_SIZEOF_PID_T 0
|
||||||
#define XP_SIZEOF_WCHAR_T 0
|
#define SSE_SIZEOF_WCHAR_T 0
|
||||||
|
|
||||||
/* fcntl.h */
|
/* fcntl.h */
|
||||||
#undef XP_HAVE_FCNTL_H
|
#undef SSE_HAVE_FCNTL_H
|
||||||
|
|
||||||
/* limits.h */
|
/* limits.h */
|
||||||
#undef XP_HAVE_LIMITS_H
|
#undef SSE_HAVE_LIMITS_H
|
||||||
|
|
||||||
/* stdarg.h */
|
/* stdarg.h */
|
||||||
#undef XP_HAVE_STDARG_H
|
#undef SSE_HAVE_STDARG_H
|
||||||
|
|
||||||
/* stddef.h */
|
/* stddef.h */
|
||||||
#undef XP_HAVE_STDDEF_H
|
#undef SSE_HAVE_STDDEF_H
|
||||||
|
|
||||||
/* unistd.h */
|
/* unistd.h */
|
||||||
#undef XP_HAVE_UNISTD_H
|
#undef SSE_HAVE_UNISTD_H
|
||||||
|
|
||||||
/* wchar.h */
|
/* wchar.h */
|
||||||
#undef XP_HAVE_WCHAR_H
|
#undef SSE_HAVE_WCHAR_H
|
||||||
|
|
||||||
/* poll.h */
|
/* poll.h */
|
||||||
#undef XP_HAVE_POLL_H
|
#undef SSE_HAVE_POLL_H
|
||||||
|
|
||||||
/* sys/poll.h */
|
/* sys/poll.h */
|
||||||
#undef XP_HAVE_SYS_EPOLL_H
|
#undef SSE_HAVE_SYS_EPOLL_H
|
||||||
|
|
||||||
/* pthread.h */
|
/* pthread.h */
|
||||||
#undef XP_HAVE_PTHREAD_H
|
#undef SSE_HAVE_PTHREAD_H
|
||||||
|
|
||||||
/* sys/sysinfo.h */
|
/* sys/sysinfo.h */
|
||||||
#undef XP_HAVE_SYS_SYSINFO_H
|
#undef SSE_HAVE_SYS_SYSINFO_H
|
||||||
|
|
||||||
/* sys/sysinfo.mem_unit */
|
/* sys/sysinfo.mem_unit */
|
||||||
#undef XP_HAVE_SYS_SYSINFO_MEM_UNIT
|
#undef SSE_HAVE_SYS_SYSINFO_MEM_UNIT
|
||||||
|
|
||||||
/* in6.scope_id */
|
/* in6.scope_id */
|
||||||
#undef XP_HAVE_IN6_SCOPE_ID
|
#undef SSE_HAVE_IN6_SCOPE_ID
|
||||||
|
|
||||||
/* sockaddr_storage.ss_family */
|
/* sockaddr_storage.ss_family */
|
||||||
#undef XP_HAVE_SS_FAMILY
|
#undef SSE_HAVE_SS_FAMILY
|
||||||
|
|
||||||
/* char is wchar */
|
/* char is wchar */
|
||||||
#undef XP_CHAR_IS_WCHAR
|
#undef SSE_CHAR_IS_WCHAR
|
||||||
|
|
||||||
/* char is mchar */
|
/* char is mchar */
|
||||||
#undef XP_CHAR_IS_MCHAR
|
#undef SSE_CHAR_IS_MCHAR
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
AC_PREREQ(2.53)
|
AC_PREREQ(2.53)
|
||||||
AC_INIT([xpkit], [deb-0.1.0])
|
AC_INIT([xpkit], [deb-0.1.0])
|
||||||
AC_REVISION([$Revision: 1.65 $])
|
AC_REVISION([$Revision: 1.66 $])
|
||||||
AC_CONFIG_HEADER([xp/config.h])
|
AC_CONFIG_HEADER([xp/config.h])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
@ -123,20 +123,5 @@ then
|
|||||||
[CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"]
|
[CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([makefile awk/makefile])
|
||||||
Makefile xp/Makefile xpp/Makefile
|
|
||||||
xp/bas/Makefile xp/sys/Makefile
|
|
||||||
xp/net/Makefile xp/utl/Makefile
|
|
||||||
xp/stx/Makefile xp/awk/Makefile
|
|
||||||
xp/lsp/Makefile xp/lnx/Makefile
|
|
||||||
xp/test/bas/Makefile xp/test/sys/Makefile
|
|
||||||
xp/test/net/Makefile xp/test/utl/Makefile
|
|
||||||
xp/test/stx/Makefile xp/test/awk/Makefile
|
|
||||||
xp/test/lsp/Makefile xp/test/lnx/Makefile
|
|
||||||
xpp/bas/Makefile xpp/net/Makefile xpp/sys/Makefile
|
|
||||||
xpp/utl/Makefile xpp/xli/Makefile
|
|
||||||
xpp/test/bas/Makefile xpp/test/net/Makefile
|
|
||||||
xpp/test/sys/Makefile xpp/test/utl/Makefile xpp/test/xli/Makefile
|
|
||||||
xpo/bas/Makefile xpo/net/Makefile
|
|
||||||
xpo/test/bas/Makefile xpo/test/net/Makefile])
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
140
ase/macros.h
140
ase/macros.h
@ -1,118 +1,118 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: macros.h,v 1.35 2006-07-17 04:17:39 bacon Exp $
|
* $Id: macros.h,v 1.36 2006-10-22 11:44:46 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _XP_MACROS_H_
|
#ifndef _SSE_MACROS_H_
|
||||||
#define _XP_MACROS_H_
|
#define _SSE_MACROS_H_
|
||||||
|
|
||||||
#include <xp/types.h>
|
#include <sse/types.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
/*#define XP_NULL ((xp_uint_t)0)*/
|
/*#define SSE_NULL ((sse_uint_t)0)*/
|
||||||
#define XP_NULL (0)
|
#define SSE_NULL (0)
|
||||||
#else
|
#else
|
||||||
#define XP_NULL ((void*)0)
|
#define SSE_NULL ((void*)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_CHAR_EOF ((xp_cint_t)-1)
|
#define SSE_CHAR_EOF ((sse_cint_t)-1)
|
||||||
|
|
||||||
#define xp_sizeof(n) (sizeof(n))
|
#define sse_sizeof(n) (sizeof(n))
|
||||||
#define xp_countof(n) (sizeof(n) / sizeof(n[0]))
|
#define sse_countof(n) (sizeof(n) / sizeof(n[0]))
|
||||||
#define xp_offsetof(type,member) ((xp_size_t)&((type*)0)->member)
|
#define sse_offsetof(type,member) ((sse_size_t)&((type*)0)->member)
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(XP_CHAR_IS_WCHAR) && !defined(__LCC__)
|
#if defined(_WIN32) && defined(SSE_CHAR_IS_WCHAR) && !defined(__LCC__)
|
||||||
#define xp_main wmain
|
#define sse_main wmain
|
||||||
#elif defined(XP_CHAR_IS_MCHAR)
|
#elif defined(SSE_CHAR_IS_MCHAR)
|
||||||
#define xp_main main
|
#define sse_main main
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_TYPE_IS_SIGNED(type) (((type)0) > ((type)-1))
|
#define SSE_TYPE_IS_SIGNED(type) (((type)0) > ((type)-1))
|
||||||
#define XP_TYPE_IS_UNSIGNED(type) (((type)0) < ((type)-1))
|
#define SSE_TYPE_IS_UNSIGNED(type) (((type)0) < ((type)-1))
|
||||||
#define XP_TYPE_MAX(type) \
|
#define SSE_TYPE_MAX(type) \
|
||||||
((XP_TYPE_IS_SIGNED(type)? (type)~((type)1 << (xp_sizeof(type) * 8 - 1)): (type)(~(type)0)))
|
((SSE_TYPE_IS_SIGNED(type)? (type)~((type)1 << (sse_sizeof(type) * 8 - 1)): (type)(~(type)0)))
|
||||||
#define XP_TYPE_MIN(type) \
|
#define SSE_TYPE_MIN(type) \
|
||||||
((XP_TYPE_IS_SIGNED(type)? (type)((type)1 << (xp_sizeof(type) * 8 - 1)): (type)0))
|
((SSE_TYPE_IS_SIGNED(type)? (type)((type)1 << (sse_sizeof(type) * 8 - 1)): (type)0))
|
||||||
|
|
||||||
#define XP_NUM_IS_POWOF2(x) (((x) & ((x) - 1)) == 0)
|
#define SSE_NUM_IS_POWOF2(x) (((x) & ((x) - 1)) == 0)
|
||||||
#define XP_SWAP(x,y,original_type,casting_type) \
|
#define SSE_SWAP(x,y,original_type,casting_type) \
|
||||||
do { \
|
do { \
|
||||||
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
||||||
y = (original_type)((casting_type)(y) ^ (casting_type)(x)); \
|
y = (original_type)((casting_type)(y) ^ (casting_type)(x)); \
|
||||||
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define XP_ABS(x) ((x) < 0? -(x): (x))
|
#define SSE_ABS(x) ((x) < 0? -(x): (x))
|
||||||
|
|
||||||
#define XP_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__;
|
#define SSE_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__;
|
||||||
#define XP_LOOP_BREAK(id) goto __loop_ ## id ## _end__;
|
#define SSE_LOOP_BREAK(id) goto __loop_ ## id ## _end__;
|
||||||
#define XP_LOOP_BEGIN(id) __loop_ ## id ## _begin__: {
|
#define SSE_LOOP_BEGIN(id) __loop_ ## id ## _begin__: {
|
||||||
#define XP_LOOP_END(id) XP_LOOP_CONTINUE(id) } __loop_ ## id ## _end__:;
|
#define SSE_LOOP_END(id) SSE_LOOP_CONTINUE(id) } __loop_ ## id ## _end__:;
|
||||||
|
|
||||||
#define XP_REPEAT(n,blk) \
|
#define SSE_REPEAT(n,blk) \
|
||||||
do { \
|
do { \
|
||||||
xp_size_t __xp_repeat_x1 = (xp_size_t)(n); \
|
sse_size_t __sse_repeat_x1 = (sse_size_t)(n); \
|
||||||
xp_size_t __xp_repeat_x2 = __xp_repeat_x1 >> 4; \
|
sse_size_t __sse_repeat_x2 = __sse_repeat_x1 >> 4; \
|
||||||
__xp_repeat_x1 &= 15; \
|
__sse_repeat_x1 &= 15; \
|
||||||
while (__xp_repeat_x1-- > 0) { blk; } \
|
while (__sse_repeat_x1-- > 0) { blk; } \
|
||||||
while (__xp_repeat_x2-- > 0) { \
|
while (__sse_repeat_x2-- > 0) { \
|
||||||
blk; blk; blk; blk; blk; blk; blk; blk; \
|
blk; blk; blk; blk; blk; blk; blk; blk; \
|
||||||
blk; blk; blk; blk; blk; blk; blk; blk; \
|
blk; blk; blk; blk; blk; blk; blk; blk; \
|
||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
/* obsolete */
|
/* obsolete */
|
||||||
#define XP_MQUOTE_I(val) #val
|
#define SSE_MQUOTE_I(val) #val
|
||||||
#define XP_MQUOTE(val) XP_MQUOTE_I(val)
|
#define SSE_MQUOTE(val) SSE_MQUOTE_I(val)
|
||||||
#define XP_MCHAR(ch) ((xp_mchar_t)ch)
|
#define SSE_MCHAR(ch) ((sse_mchar_t)ch)
|
||||||
#define XP_MTEXT(txt) ((const xp_mchar_t*)txt)
|
#define SSE_MTEXT(txt) ((const sse_mchar_t*)txt)
|
||||||
|
|
||||||
/* new short form */
|
/* new short form */
|
||||||
#define XP_MQ_I(val) #val
|
#define SSE_MQ_I(val) #val
|
||||||
#define XP_MQ(val) XP_MQ_I(val)
|
#define SSE_MQ(val) SSE_MQ_I(val)
|
||||||
#define XP_MC(ch) ((xp_mchar_t)ch)
|
#define SSE_MC(ch) ((sse_mchar_t)ch)
|
||||||
#define XP_MS(str) ((const xp_mchar_t*)str)
|
#define SSE_MS(str) ((const sse_mchar_t*)str)
|
||||||
#define XP_MT(txt) (txt)
|
#define SSE_MT(txt) (txt)
|
||||||
|
|
||||||
/* TODO: if the compiler doesn't have the built-in wchar_t support
|
/* TODO: if the compiler doesn't have the built-in wchar_t support
|
||||||
* XP_WCHAR & XP_WTEXT must be defined differently.
|
* SSE_WCHAR & SSE_WTEXT must be defined differently.
|
||||||
#define XP_WCHAR(ch) ((xp_wchar_t)ch)
|
#define SSE_WCHAR(ch) ((sse_wchar_t)ch)
|
||||||
#define XP_WTEXT(txt) don't know yet... may have to call a function?
|
#define SSE_WTEXT(txt) don't know yet... may have to call a function?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* obsolete */
|
/* obsolete */
|
||||||
#define XP_WQUOTE_I(val) (L###val)
|
#define SSE_WQUOTE_I(val) (L###val)
|
||||||
#define XP_WQUOTE(val) XP_WQUOTE_I(val)
|
#define SSE_WQUOTE(val) SSE_WQUOTE_I(val)
|
||||||
#define XP_WCHAR(ch) ((xp_wchar_t)L##ch)
|
#define SSE_WCHAR(ch) ((sse_wchar_t)L##ch)
|
||||||
#define XP_WTEXT(txt) ((const xp_wchar_t*)L##txt)
|
#define SSE_WTEXT(txt) ((const sse_wchar_t*)L##txt)
|
||||||
|
|
||||||
/* new short form */
|
/* new short form */
|
||||||
#define XP_WQ_I(val) (L###val)
|
#define SSE_WQ_I(val) (L###val)
|
||||||
#define XP_WQ(val) XP_WQ_I(val)
|
#define SSE_WQ(val) SSE_WQ_I(val)
|
||||||
#define XP_WC(ch) ((xp_wchar_t)L##ch)
|
#define SSE_WC(ch) ((sse_wchar_t)L##ch)
|
||||||
#define XP_WS(str) ((const xp_wchar_t*)L##str)
|
#define SSE_WS(str) ((const sse_wchar_t*)L##str)
|
||||||
#define XP_WT(txt) (L##txt)
|
#define SSE_WT(txt) (L##txt)
|
||||||
|
|
||||||
#if defined(XP_CHAR_IS_MCHAR)
|
#if defined(SSE_CHAR_IS_MCHAR)
|
||||||
/* obsolete */
|
/* obsolete */
|
||||||
#define XP_CHAR(ch) XP_MCHAR(ch)
|
#define SSE_CHAR(ch) SSE_MCHAR(ch)
|
||||||
#define XP_TEXT(txt) XP_MTEXT(txt)
|
#define SSE_TEXT(txt) SSE_MTEXT(txt)
|
||||||
#define XP_QUOTE(val) XP_MQUOTE(val)
|
#define SSE_QUOTE(val) SSE_MQUOTE(val)
|
||||||
|
|
||||||
/* new short form */
|
/* new short form */
|
||||||
#define XP_C(ch) XP_MC(ch)
|
#define SSE_C(ch) SSE_MC(ch)
|
||||||
#define XP_S(str) XP_MS(str)
|
#define SSE_S(str) SSE_MS(str)
|
||||||
#define XP_T(txt) XP_MT(txt)
|
#define SSE_T(txt) SSE_MT(txt)
|
||||||
#define XP_Q(val) XP_MQ(val)
|
#define SSE_Q(val) SSE_MQ(val)
|
||||||
#else
|
#else
|
||||||
/* obsolete */
|
/* obsolete */
|
||||||
#define XP_CHAR(ch) XP_WCHAR(ch)
|
#define SSE_CHAR(ch) SSE_WCHAR(ch)
|
||||||
#define XP_TEXT(txt) XP_WTEXT(txt)
|
#define SSE_TEXT(txt) SSE_WTEXT(txt)
|
||||||
#define XP_QUOTE(val) XP_WQUOTE(val)
|
#define SSE_QUOTE(val) SSE_WQUOTE(val)
|
||||||
|
|
||||||
/* new short form */
|
/* new short form */
|
||||||
#define XP_C(ch) XP_WC(ch)
|
#define SSE_C(ch) SSE_WC(ch)
|
||||||
#define XP_S(str) XP_WS(str)
|
#define SSE_S(str) SSE_WS(str)
|
||||||
#define XP_T(txt) XP_WT(txt)
|
#define SSE_T(txt) SSE_WT(txt)
|
||||||
#define XP_Q(val) XP_WQ(val)
|
#define SSE_Q(val) SSE_WQ(val)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
SUBDIRS=bas sys net utl stx lsp
|
SUBDIRS=awk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@for i in $(SUBDIRS); \
|
@for i in $(SUBDIRS); \
|
||||||
|
316
ase/types.h
316
ase/types.h
@ -1,18 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: types.h,v 1.56 2006-09-27 14:14:29 bacon Exp $
|
* $Id: types.h,v 1.57 2006-10-22 11:44:46 bacon Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _XP_TYPES_H_
|
#ifndef _SSE_TYPES_H_
|
||||||
#define _XP_TYPES_H_
|
#define _SSE_TYPES_H_
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <xp/conf_msw.h>
|
#include <sse/conf_msw.h>
|
||||||
#elif defined(vms) || defined(__vms)
|
#elif defined(vms) || defined(__vms)
|
||||||
#include <xp/conf_vms.h>
|
#include <sse/conf_vms.h>
|
||||||
#elif defined(dos) || defined(__dos)
|
#elif defined(dos) || defined(__dos)
|
||||||
#include <xp/conf_dos.h>
|
#include <sse/conf_dos.h>
|
||||||
#else
|
#else
|
||||||
#include <xp/config.h>
|
#include <sse/config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -28,241 +28,241 @@
|
|||||||
*
|
*
|
||||||
* GROUP: State Types
|
* GROUP: State Types
|
||||||
*
|
*
|
||||||
* TYPE: xp_bool_t
|
* TYPE: sse_bool_t
|
||||||
* Boolean type
|
* Boolean type
|
||||||
*
|
*
|
||||||
* TYPE: xp_tri_t
|
* TYPE: sse_tri_t
|
||||||
* Tri-State type
|
* Tri-State type
|
||||||
*
|
*
|
||||||
* GROUP: Integral Types
|
* GROUP: Integral Types
|
||||||
*
|
*
|
||||||
* TYPE: xp_byte_t
|
* TYPE: sse_byte_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_word_t
|
* TYPE: sse_word_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_int_t
|
* TYPE: sse_int_t
|
||||||
* Signed integer whose size equals the size of a pointer
|
* Signed integer whose size equals the size of a pointer
|
||||||
*
|
*
|
||||||
* TYPE: xp_uint_t
|
* TYPE: sse_uint_t
|
||||||
* Unsigned integer whose size equals the size of a pointer
|
* Unsigned integer whose size equals the size of a pointer
|
||||||
*
|
*
|
||||||
* TYPE: xp_long_t
|
* TYPE: sse_long_t
|
||||||
* The largest signed integer available
|
* The largest signed integer available
|
||||||
*
|
*
|
||||||
* TYPE: xp_ulong_t
|
* TYPE: sse_ulong_t
|
||||||
* The largest unsigned integer available
|
* The largest unsigned integer available
|
||||||
*
|
*
|
||||||
* TYPE: xp_size_t
|
* TYPE: sse_size_t
|
||||||
* Unsigned integer which can represent the size of the largest
|
* Unsigned integer which can represent the size of the largest
|
||||||
* in-memory data
|
* in-memory data
|
||||||
*
|
*
|
||||||
* TYPE: xp_ssize_t
|
* TYPE: sse_ssize_t
|
||||||
* Signed version of xp_size_t
|
* Signed version of sse_size_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_int8_t
|
* TYPE: sse_int8_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_uint8_t
|
* TYPE: sse_uint8_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_int16_t
|
* TYPE: sse_int16_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_uint16_t
|
* TYPE: sse_uint16_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_int32_t
|
* TYPE: sse_int32_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_uint32_t
|
* TYPE: sse_uint32_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_int64_t
|
* TYPE: sse_int64_t
|
||||||
*
|
*
|
||||||
* TYPE: xp_uint64_t
|
* TYPE: sse_uint64_t
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* boolean type */
|
/* boolean type */
|
||||||
typedef int xp_bool_t;
|
typedef int sse_bool_t;
|
||||||
#define xp_true (0 == 0)
|
#define sse_true (0 == 0)
|
||||||
#define xp_false (0 != 0)
|
#define sse_false (0 != 0)
|
||||||
|
|
||||||
/* tri-state type */
|
/* tri-state type */
|
||||||
typedef int xp_tri_t;
|
typedef int sse_tri_t;
|
||||||
#define xp_alive 1
|
#define sse_alive 1
|
||||||
#define xp_zombie 0
|
#define sse_zombie 0
|
||||||
#define xp_dead -1
|
#define sse_dead -1
|
||||||
|
|
||||||
/* integer that can hold a pointer */
|
/* integer that can hold a pointer */
|
||||||
#if XP_SIZEOF_VOID_P == XP_SIZEOF_INT
|
#if SSE_SIZEOF_VOID_P == SSE_SIZEOF_INT
|
||||||
typedef int xp_int_t;
|
typedef int sse_int_t;
|
||||||
typedef unsigned int xp_uint_t;
|
typedef unsigned int sse_uint_t;
|
||||||
#elif XP_SIZEOF_VOID_P == XP_SIZEOF_LONG
|
#elif SSE_SIZEOF_VOID_P == SSE_SIZEOF_LONG
|
||||||
typedef long xp_int_t;
|
typedef long sse_int_t;
|
||||||
typedef unsigned long xp_uint_t;
|
typedef unsigned long sse_uint_t;
|
||||||
#elif XP_SIZEOF_VOID_P == XP_SIZEOF_LONG_LONG
|
#elif SSE_SIZEOF_VOID_P == SSE_SIZEOF_LONG_LONG
|
||||||
typedef long long xp_int_t;
|
typedef long long sse_int_t;
|
||||||
typedef unsigned long long xp_uint_t;
|
typedef unsigned long long sse_uint_t;
|
||||||
#else
|
#else
|
||||||
#error Unsupported pointer size
|
#error Unsupported pointer size
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* the largest integer supported by the system */
|
/* the largest integer supported by the system */
|
||||||
#if XP_SIZEOF_LONG_LONG != 0
|
#if SSE_SIZEOF_LONG_LONG != 0
|
||||||
typedef long long xp_long_t;
|
typedef long long sse_long_t;
|
||||||
typedef unsigned long long xp_ulong_t;
|
typedef unsigned long long sse_ulong_t;
|
||||||
#elif XP_SIZEOF___INT64 != 0
|
#elif SSE_SIZEOF___INT64 != 0
|
||||||
typedef __int64 xp_long_t;
|
typedef __int64 sse_long_t;
|
||||||
typedef unsigned __int64 xp_ulong_t;
|
typedef unsigned __int64 sse_ulong_t;
|
||||||
#else
|
#else
|
||||||
typedef long xp_long_t;
|
typedef long sse_long_t;
|
||||||
typedef unsigned long xp_ulong_t;
|
typedef unsigned long sse_ulong_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* integers of specific size */
|
/* integers of specific size */
|
||||||
#if XP_SIZEOF_CHAR == 1
|
#if SSE_SIZEOF_CHAR == 1
|
||||||
typedef char xp_int8_t;
|
typedef char sse_int8_t;
|
||||||
typedef unsigned char xp_uint8_t;
|
typedef unsigned char sse_uint8_t;
|
||||||
#elif XP_SIZEOF___INT8 == 1
|
#elif SSE_SIZEOF___INT8 == 1
|
||||||
typedef __int8 xp_int8_t;
|
typedef __int8 sse_int8_t;
|
||||||
typedef unsigned __int8 xp_uint8_t;
|
typedef unsigned __int8 sse_uint8_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XP_SIZEOF_SHORT == 2
|
#if SSE_SIZEOF_SHORT == 2
|
||||||
typedef short xp_int16_t;
|
typedef short sse_int16_t;
|
||||||
typedef unsigned short xp_uint16_t;
|
typedef unsigned short sse_uint16_t;
|
||||||
#elif XP_SIZEOF___INT16 == 2
|
#elif SSE_SIZEOF___INT16 == 2
|
||||||
typedef __int16 xp_int16_t;
|
typedef __int16 sse_int16_t;
|
||||||
typedef unsigned __int16 xp_uint16_t;
|
typedef unsigned __int16 sse_uint16_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XP_SIZEOF_INT == 4
|
#if SSE_SIZEOF_INT == 4
|
||||||
typedef int xp_int32_t;
|
typedef int sse_int32_t;
|
||||||
typedef unsigned int xp_uint32_t;
|
typedef unsigned int sse_uint32_t;
|
||||||
#elif XP_SIZEOF_LONG == 4
|
#elif SSE_SIZEOF_LONG == 4
|
||||||
typedef long xp_int32_t;
|
typedef long sse_int32_t;
|
||||||
typedef unsigned long xp_uint32_t;
|
typedef unsigned long sse_uint32_t;
|
||||||
#elif XP_SIZEOF___INT32 == 4
|
#elif SSE_SIZEOF___INT32 == 4
|
||||||
typedef __int32 xp_int32_t;
|
typedef __int32 sse_int32_t;
|
||||||
typedef unsigned __int32 xp_uint32_t;
|
typedef unsigned __int32 sse_uint32_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XP_SIZEOF_INT == 8
|
#if SSE_SIZEOF_INT == 8
|
||||||
#define XP_HAVE_INT64_T
|
#define SSE_HAVE_INT64_T
|
||||||
#define XP_HAVE_UINT64_T
|
#define SSE_HAVE_UINT64_T
|
||||||
typedef int xp_int64_t;
|
typedef int sse_int64_t;
|
||||||
typedef unsigned int xp_uint64_t;
|
typedef unsigned int sse_uint64_t;
|
||||||
#elif XP_SIZEOF_LONG == 8
|
#elif SSE_SIZEOF_LONG == 8
|
||||||
#define XP_HAVE_INT64_T
|
#define SSE_HAVE_INT64_T
|
||||||
#define XP_HAVE_UINT64_T
|
#define SSE_HAVE_UINT64_T
|
||||||
typedef long xp_int64_t;
|
typedef long sse_int64_t;
|
||||||
typedef unsigned long xp_uint64_t;
|
typedef unsigned long sse_uint64_t;
|
||||||
#elif XP_SIZEOF_LONG_LONG == 8
|
#elif SSE_SIZEOF_LONG_LONG == 8
|
||||||
#define XP_HAVE_INT64_T
|
#define SSE_HAVE_INT64_T
|
||||||
#define XP_HAVE_UINT64_T
|
#define SSE_HAVE_UINT64_T
|
||||||
typedef long long xp_int64_t;
|
typedef long long sse_int64_t;
|
||||||
typedef unsigned long long xp_uint64_t;
|
typedef unsigned long long sse_uint64_t;
|
||||||
#elif XP_SIZEOF___INT64 == 8
|
#elif SSE_SIZEOF___INT64 == 8
|
||||||
#define XP_HAVE_INT64_T
|
#define SSE_HAVE_INT64_T
|
||||||
#define XP_HAVE_UINT64_T
|
#define SSE_HAVE_UINT64_T
|
||||||
typedef __int64 xp_int64_t;
|
typedef __int64 sse_int64_t;
|
||||||
typedef unsigned __int64 xp_uint64_t;
|
typedef unsigned __int64 sse_uint64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if XP_SIZEOF_INT == 16
|
#if SSE_SIZEOF_INT == 16
|
||||||
#define XP_HAVE_INT128_T
|
#define SSE_HAVE_INT128_T
|
||||||
#define XP_HAVE_UINT128_T
|
#define SSE_HAVE_UINT128_T
|
||||||
typedef int xp_int128_t;
|
typedef int sse_int128_t;
|
||||||
typedef unsigned int xp_uint128_t;
|
typedef unsigned int sse_uint128_t;
|
||||||
#elif XP_SIZEOF_LONG == 16
|
#elif SSE_SIZEOF_LONG == 16
|
||||||
#define XP_HAVE_INT128_T
|
#define SSE_HAVE_INT128_T
|
||||||
#define XP_HAVE_UINT128_T
|
#define SSE_HAVE_UINT128_T
|
||||||
typedef long xp_int128_t;
|
typedef long sse_int128_t;
|
||||||
typedef unsigned long xp_uint128_t;
|
typedef unsigned long sse_uint128_t;
|
||||||
#elif XP_SIZEOF_LONG_LONG == 16
|
#elif SSE_SIZEOF_LONG_LONG == 16
|
||||||
#define XP_HAVE_INT128_T
|
#define SSE_HAVE_INT128_T
|
||||||
#define XP_HAVE_UINT128_T
|
#define SSE_HAVE_UINT128_T
|
||||||
typedef long long xp_int128_t;
|
typedef long long sse_int128_t;
|
||||||
typedef unsigned long long xp_uint128_t;
|
typedef unsigned long long sse_uint128_t;
|
||||||
#elif XP_SIZEOF___INT128 == 16
|
#elif SSE_SIZEOF___INT128 == 16
|
||||||
#define XP_HAVE_INT128_T
|
#define SSE_HAVE_INT128_T
|
||||||
#define XP_HAVE_UINT128_T
|
#define SSE_HAVE_UINT128_T
|
||||||
typedef __int128 xp_int128_t;
|
typedef __int128 sse_int128_t;
|
||||||
typedef unsigned __int128 xp_uint128_t;
|
typedef unsigned __int128 sse_uint128_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* miscellaneous integral types */
|
/* miscellaneous integral types */
|
||||||
typedef xp_uint8_t xp_byte_t;
|
typedef sse_uint8_t sse_byte_t;
|
||||||
typedef xp_uint_t xp_size_t;
|
typedef sse_uint_t sse_size_t;
|
||||||
typedef xp_int_t xp_ssize_t;
|
typedef sse_int_t sse_ssize_t;
|
||||||
typedef xp_uint_t xp_word_t;
|
typedef sse_uint_t sse_word_t;
|
||||||
|
|
||||||
/* floating-point number */
|
/* floating-point number */
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
/* TODO: check if the support for long double is complete.
|
/* TODO: check if the support for long double is complete.
|
||||||
* if so, use long double for xp_real_t */
|
* if so, use long double for sse_real_t */
|
||||||
#define XP_SIZEOF_REAL XP_SIZEOF_DOUBLE
|
#define SSE_SIZEOF_REAL SSE_SIZEOF_DOUBLE
|
||||||
typedef double xp_real_t;
|
typedef double sse_real_t;
|
||||||
#elif XP_SIZEOF_LONG_DOUBLE > XP_SIZEOF_DOUBLE
|
#elif SSE_SIZEOF_LONG_DOUBLE > SSE_SIZEOF_DOUBLE
|
||||||
#define XP_SIZEOF_REAL XP_SIZEOF_LONG_DOUBLE
|
#define SSE_SIZEOF_REAL SSE_SIZEOF_LONG_DOUBLE
|
||||||
typedef long double xp_real_t;
|
typedef long double sse_real_t;
|
||||||
#else
|
#else
|
||||||
#define XP_SIZEOF_REAL XP_SIZEOF_DOUBLE
|
#define SSE_SIZEOF_REAL SSE_SIZEOF_DOUBLE
|
||||||
typedef double xp_real_t;
|
typedef double sse_real_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* character types */
|
/* character types */
|
||||||
typedef char xp_mchar_t;
|
typedef char sse_mchar_t;
|
||||||
typedef int xp_mcint_t;
|
typedef int sse_mcint_t;
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
/* C++ */
|
/* C++ */
|
||||||
typedef wchar_t xp_wchar_t;
|
typedef wchar_t sse_wchar_t;
|
||||||
typedef wchar_t xp_wcint_t;
|
typedef wchar_t sse_wcint_t;
|
||||||
|
|
||||||
/* all the way down from here for C */
|
/* all the way down from here for C */
|
||||||
#elif (XP_SIZEOF_WCHAR_T == 2) || (XP_SIZEOF_WCHAR_T == 0)
|
#elif (SSE_SIZEOF_WCHAR_T == 2) || (SSE_SIZEOF_WCHAR_T == 0)
|
||||||
typedef unsigned short xp_wchar_t;
|
typedef unsigned short sse_wchar_t;
|
||||||
typedef unsigned short xp_wcint_t;
|
typedef unsigned short sse_wcint_t;
|
||||||
#elif (XP_SIZEOF_WCHAR_T == 4)
|
#elif (SSE_SIZEOF_WCHAR_T == 4)
|
||||||
#if defined(vms) || defined(__vms)
|
#if defined(vms) || defined(__vms)
|
||||||
typedef unsigned int xp_wchar_t;
|
typedef unsigned int sse_wchar_t;
|
||||||
typedef int xp_wcint_t;
|
typedef int sse_wcint_t;
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
typedef int xp_wchar_t;
|
typedef int sse_wchar_t;
|
||||||
typedef int xp_wcint_t;
|
typedef int sse_wcint_t;
|
||||||
#elif (defined(sun) || defined(__sun)) && defined(_LP64)
|
#elif (defined(sun) || defined(__sun)) && defined(_LP64)
|
||||||
typedef int xp_wchar_t;
|
typedef int sse_wchar_t;
|
||||||
typedef int xp_wcint_t;
|
typedef int sse_wcint_t;
|
||||||
#elif XP_SIZEOF_LONG == 4
|
#elif SSE_SIZEOF_LONG == 4
|
||||||
typedef long xp_wchar_t;
|
typedef long sse_wchar_t;
|
||||||
typedef long xp_wcint_t;
|
typedef long sse_wcint_t;
|
||||||
#else
|
#else
|
||||||
typedef int xp_wchar_t;
|
typedef int sse_wchar_t;
|
||||||
typedef int xp_wcint_t;
|
typedef int sse_wcint_t;
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#error unsupported size of wchar_t
|
#error unsupported size of wchar_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) && (defined(UNICODE)||defined(_UNICODE))
|
#if defined(_WIN32) && (defined(UNICODE)||defined(_UNICODE))
|
||||||
#define XP_CHAR_IS_WCHAR
|
#define SSE_CHAR_IS_WCHAR
|
||||||
typedef xp_wchar_t xp_char_t;
|
typedef sse_wchar_t sse_char_t;
|
||||||
typedef xp_wcint_t xp_cint_t;
|
typedef sse_wcint_t sse_cint_t;
|
||||||
#else
|
#else
|
||||||
#if defined(XP_CHAR_IS_MCHAR)
|
#if defined(SSE_CHAR_IS_MCHAR)
|
||||||
typedef xp_mchar_t xp_char_t;
|
typedef sse_mchar_t sse_char_t;
|
||||||
typedef xp_mcint_t xp_cint_t;
|
typedef sse_mcint_t sse_cint_t;
|
||||||
#elif defined(XP_CHAR_IS_WCHAR)
|
#elif defined(SSE_CHAR_IS_WCHAR)
|
||||||
typedef xp_wchar_t xp_char_t;
|
typedef sse_wchar_t sse_char_t;
|
||||||
typedef xp_wcint_t xp_cint_t;
|
typedef sse_wcint_t sse_cint_t;
|
||||||
#elif defined(_MBCS)
|
#elif defined(_MBCS)
|
||||||
#define XP_CHAR_IS_MCHAR
|
#define SSE_CHAR_IS_MCHAR
|
||||||
typedef xp_mchar_t xp_char_t;
|
typedef sse_mchar_t sse_char_t;
|
||||||
typedef xp_mcint_t xp_cint_t;
|
typedef sse_mcint_t sse_cint_t;
|
||||||
#else
|
#else
|
||||||
#define XP_CHAR_IS_WCHAR
|
#define SSE_CHAR_IS_WCHAR
|
||||||
typedef xp_wchar_t xp_char_t;
|
typedef sse_wchar_t sse_char_t;
|
||||||
typedef xp_wcint_t xp_cint_t;
|
typedef sse_wcint_t sse_cint_t;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(XP_CHAR_IS_WCHAR) && defined(_WIN32)
|
#if defined(SSE_CHAR_IS_WCHAR) && defined(_WIN32)
|
||||||
#ifndef UNICODE
|
#ifndef UNICODE
|
||||||
#define UNICODE
|
#define UNICODE
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user