*** empty log message ***
This commit is contained in:
parent
16f5c251c5
commit
ef845392e4
@ -100,7 +100,7 @@
|
||||
<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="C:\projects\sse\.."/>
|
||||
<property category="win32.*.win32b.bcc32" name="option.I.arg.1" value="C:\projects\ase\.."/>
|
||||
<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"/>
|
||||
@ -137,23 +137,23 @@
|
||||
<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\sse\awk"/>
|
||||
<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\sse\awk"/>
|
||||
<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\sse\awk"/>
|
||||
<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\sse\awk"/>
|
||||
<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\sse\awk"/>
|
||||
<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"/>
|
||||
|
@ -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
|
||||
LIBRFLAGS =
|
||||
|
||||
sseawk.olb : $(objects)
|
||||
aseawk.olb : $(objects)
|
||||
$(LIBR)/create $(MMS$TARGET)
|
||||
$(LIBR)/replace $(LIBRFLAGS) $(MMS$TARGET) $(objects)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
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 = sseawk.lib
|
||||
OUT = aseawk.lib
|
||||
|
||||
CC = bcc32
|
||||
CFLAGS = -O2 -WM -w -w-inl -w-sig -w-spa -w-hid -RT- -I../..
|
||||
|
@ -2,7 +2,7 @@ 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 = sseawk
|
||||
OUT = aseawk
|
||||
|
||||
JAVA_INC = \
|
||||
/I"C:\Program Files\IBM\Java141\Include" \
|
||||
|
@ -1,7 +1,7 @@
|
||||
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=.o)
|
||||
OUT = libsseawk.a
|
||||
OUT = libaseawk.a
|
||||
|
||||
CC = cc
|
||||
CFLAGS = -Wall -I../..
|
||||
|
@ -1,7 +1,7 @@
|
||||
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=.o)
|
||||
OUT = libsseawk.a
|
||||
OUT = libaseawk.a
|
||||
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
OUT = sseawk.lib
|
||||
OUT = aseawk.lib
|
||||
|
||||
CC = lcc
|
||||
CFLAGS = -I../.. -A -ansic -libcdll
|
||||
|
@ -1,7 +1,7 @@
|
||||
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
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
OUT = libsseawk.a
|
||||
OUT = libaseawk.a
|
||||
|
||||
CC = cc
|
||||
CFLAGS = -Xc -a ansi -w3 -O2 -I../..
|
||||
|
@ -2,7 +2,7 @@ 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=.o)
|
||||
OUT = libsseawk.a
|
||||
OUT = libaseawk.a
|
||||
|
||||
CC = gcc
|
||||
#CFLAGS = -m64 -O2 -Wall -std=c89 -pedantic -I../..
|
||||
|
@ -6,7 +6,7 @@ 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
|
||||
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
|
||||
OUT = sseawk.lib
|
||||
OUT = aseawk.lib
|
||||
|
||||
CC = tcc
|
||||
AR = tlib
|
||||
|
@ -1,31 +1,31 @@
|
||||
/*
|
||||
* $Id: conf_dos.h,v 1.6 2006-10-22 11:46:18 bacon Exp $
|
||||
* $Id: conf_dos.h,v 1.7 2006-10-24 04:30:13 bacon Exp $
|
||||
*/
|
||||
|
||||
#if !defined(__LARGE__) && !defined(__HUGE__)
|
||||
#error this library supports the large and the huge memory models only
|
||||
#endif
|
||||
|
||||
#define SSE_ENDIAN_LITTLE
|
||||
#define ASE_ENDIAN_LITTLE
|
||||
|
||||
#define SSE_SIZEOF_CHAR 1
|
||||
#define SSE_SIZEOF_SHORT 2
|
||||
#define SSE_SIZEOF_INT 2
|
||||
#define SSE_SIZEOF_LONG 4
|
||||
#define SSE_SIZEOF_LONG_LONG 0
|
||||
#define ASE_SIZEOF_CHAR 1
|
||||
#define ASE_SIZEOF_SHORT 2
|
||||
#define ASE_SIZEOF_INT 2
|
||||
#define ASE_SIZEOF_LONG 4
|
||||
#define ASE_SIZEOF_LONG_LONG 0
|
||||
|
||||
#define SSE_SIZEOF___INT8 0
|
||||
#define SSE_SIZEOF___INT16 0
|
||||
#define SSE_SIZEOF___INT32 0
|
||||
#define SSE_SIZEOF___INT64 0
|
||||
#define SSE_SIZEOF___INT96 0
|
||||
#define SSE_SIZEOF___INT128 0
|
||||
#define ASE_SIZEOF___INT8 0
|
||||
#define ASE_SIZEOF___INT16 0
|
||||
#define ASE_SIZEOF___INT32 0
|
||||
#define ASE_SIZEOF___INT64 0
|
||||
#define ASE_SIZEOF___INT96 0
|
||||
#define ASE_SIZEOF___INT128 0
|
||||
|
||||
#define SSE_SIZEOF_VOID_P 4
|
||||
#define ASE_SIZEOF_VOID_P 4
|
||||
|
||||
#define SSE_SIZEOF_FLOAT 4
|
||||
#define SSE_SIZEOF_DOUBLE 8
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 10 /* turbo c 2.01 */
|
||||
#define SSE_SIZEOF_WCHAR_T 0
|
||||
#define ASE_SIZEOF_FLOAT 4
|
||||
#define ASE_SIZEOF_DOUBLE 8
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 10 /* turbo c 2.01 */
|
||||
#define ASE_SIZEOF_WCHAR_T 0
|
||||
|
||||
#define SSE_CHAR_IS_MCHAR
|
||||
#define ASE_CHAR_IS_MCHAR
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: conf_msw.h,v 1.4 2006-10-22 11:46:18 bacon Exp $
|
||||
* $Id: conf_msw.h,v 1.5 2006-10-24 04:30:13 bacon Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -17,34 +17,34 @@ _M_IX86 x86 platform
|
||||
_M_X64 x64 platform
|
||||
*/
|
||||
|
||||
#define SSE_ENDIAN_LITTLE
|
||||
#define ASE_ENDIAN_LITTLE
|
||||
|
||||
#define SSE_SIZEOF_CHAR 1
|
||||
#define SSE_SIZEOF_SHORT 2
|
||||
#define SSE_SIZEOF_INT 4
|
||||
#define ASE_SIZEOF_CHAR 1
|
||||
#define ASE_SIZEOF_SHORT 2
|
||||
#define ASE_SIZEOF_INT 4
|
||||
|
||||
#ifdef _WIN64
|
||||
#define SSE_SIZEOF_LONG 8
|
||||
#define ASE_SIZEOF_LONG 8
|
||||
#else
|
||||
#define SSE_SIZEOF_LONG 4
|
||||
#define ASE_SIZEOF_LONG 4
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF_LONG_LONG 0
|
||||
#define ASE_SIZEOF_LONG_LONG 0
|
||||
|
||||
#define SSE_SIZEOF___INT8 1
|
||||
#define SSE_SIZEOF___INT16 2
|
||||
#define SSE_SIZEOF___INT32 4
|
||||
#define SSE_SIZEOF___INT64 8
|
||||
#define SSE_SIZEOF___INT96 0
|
||||
#define SSE_SIZEOF___INT128 0
|
||||
#define ASE_SIZEOF___INT8 1
|
||||
#define ASE_SIZEOF___INT16 2
|
||||
#define ASE_SIZEOF___INT32 4
|
||||
#define ASE_SIZEOF___INT64 8
|
||||
#define ASE_SIZEOF___INT96 0
|
||||
#define ASE_SIZEOF___INT128 0
|
||||
|
||||
#ifdef _WIN64
|
||||
#define SSE_SIZEOF_VOID_P 8
|
||||
#define ASE_SIZEOF_VOID_P 8
|
||||
#else
|
||||
#define SSE_SIZEOF_VOID_P 4
|
||||
#define ASE_SIZEOF_VOID_P 4
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF_FLOAT 4
|
||||
#define SSE_SIZEOF_DOUBLE 8
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||
#define SSE_SIZEOF_WCHAR_T 2
|
||||
#define ASE_SIZEOF_FLOAT 4
|
||||
#define ASE_SIZEOF_DOUBLE 8
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 16
|
||||
#define ASE_SIZEOF_WCHAR_T 2
|
||||
|
@ -1,71 +1,71 @@
|
||||
/*
|
||||
* $Id: conf_vms.h,v 1.6 2006-10-22 11:46:18 bacon Exp $
|
||||
* $Id: conf_vms.h,v 1.7 2006-10-24 04:30:13 bacon Exp $
|
||||
*/
|
||||
|
||||
/* TODO: please complete the itanium portion */
|
||||
|
||||
/* both vax and alpha are in the little endian. */
|
||||
#define SSE_ENDIAN_LITTLE
|
||||
#define ASE_ENDIAN_LITTLE
|
||||
|
||||
#define SSE_SIZEOF_CHAR 1
|
||||
#define SSE_SIZEOF_SHORT 2
|
||||
#define SSE_SIZEOF_INT 4
|
||||
#define SSE_SIZEOF_LONG 4
|
||||
#define ASE_SIZEOF_CHAR 1
|
||||
#define ASE_SIZEOF_SHORT 2
|
||||
#define ASE_SIZEOF_INT 4
|
||||
#define ASE_SIZEOF_LONG 4
|
||||
|
||||
#if defined(vax) || defined(__vax)
|
||||
#define SSE_SIZEOF_LONG_LONG 0
|
||||
#define ASE_SIZEOF_LONG_LONG 0
|
||||
#elif defined(alpha) || defined(__alpha)
|
||||
#define SSE_SIZEOF_LONG_LONG 8
|
||||
#define ASE_SIZEOF_LONG_LONG 8
|
||||
#elif defined(itanium) || defined(__itanium)
|
||||
#define SSE_SIZEOF_LONG_LONG 8
|
||||
#define ASE_SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#define SSE_SIZEOF_LONG_LONG 0
|
||||
#define ASE_SIZEOF_LONG_LONG 0
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF___INT8 1
|
||||
#define SSE_SIZEOF___INT16 2
|
||||
#define SSE_SIZEOF___INT32 4
|
||||
#define ASE_SIZEOF___INT8 1
|
||||
#define ASE_SIZEOF___INT16 2
|
||||
#define ASE_SIZEOF___INT32 4
|
||||
|
||||
#if defined(vax) || defined(__vax)
|
||||
#define SSE_SIZEOF___INT64 0
|
||||
#define ASE_SIZEOF___INT64 0
|
||||
#elif defined(alpha) || defined(__alpha)
|
||||
#define SSE_SIZEOF___INT64 8
|
||||
#define ASE_SIZEOF___INT64 8
|
||||
#elif defined(itanium) || defined(__itanium)
|
||||
#define SSE_SIZEOF___INT64 8
|
||||
#define ASE_SIZEOF___INT64 8
|
||||
#else
|
||||
#define SSE_SIZEOF___INT64 0
|
||||
#define ASE_SIZEOF___INT64 0
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF___INT96 0
|
||||
#define SSE_SIZEOF___INT128 0
|
||||
#define ASE_SIZEOF___INT96 0
|
||||
#define ASE_SIZEOF___INT128 0
|
||||
|
||||
#if defined(vax) || defined(__vax)
|
||||
#define SSE_SIZEOF_VOID_P 4
|
||||
#define ASE_SIZEOF_VOID_P 4
|
||||
#elif defined(alpha) || defined(__alpha)
|
||||
/*#pragma pointer_size 32
|
||||
#define SSE_SIZEOF_VOID_P 4*/
|
||||
#define ASE_SIZEOF_VOID_P 4*/
|
||||
#pragma pointer_size 64
|
||||
#define SSE_SIZEOF_VOID_P 8
|
||||
#define ASE_SIZEOF_VOID_P 8
|
||||
#elif defined(itanium) || defined(__itanium)
|
||||
/*#pragma pointer_size 32
|
||||
#define SSE_SIZEOF_VOID_P 4*/
|
||||
#define ASE_SIZEOF_VOID_P 4*/
|
||||
#pragma pointer_size 64
|
||||
#define SSE_SIZEOF_VOID_P 8
|
||||
#define ASE_SIZEOF_VOID_P 8
|
||||
#else
|
||||
#define SSE_SIZEOF_VOID_P 0
|
||||
#define ASE_SIZEOF_VOID_P 0
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF_FLOAT 4
|
||||
#define SSE_SIZEOF_DOUBLE 8
|
||||
#define ASE_SIZEOF_FLOAT 4
|
||||
#define ASE_SIZEOF_DOUBLE 8
|
||||
|
||||
#if defined(vax) || defined(__vax)
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 8
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 8
|
||||
#elif defined(alpha) || defined(__alpha)
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 16
|
||||
#elif defined(itanium) || defined(__itanium)
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 16
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 16
|
||||
#else
|
||||
#define SSE_SIZEOF_LONG_DOUBLE 0
|
||||
#define ASE_SIZEOF_LONG_DOUBLE 0
|
||||
#endif
|
||||
|
||||
#define SSE_SIZEOF_WCHAR_T 4
|
||||
#define ASE_SIZEOF_WCHAR_T 4
|
||||
|
@ -2,7 +2,7 @@ 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 = sselsp.lib
|
||||
OUT = aselsp.lib
|
||||
|
||||
CC = bcc32
|
||||
CFLAGS = -O2 -WM -w -w-inl -w-sig -w-spa -w-hid -RT- -I../..
|
||||
|
@ -2,7 +2,7 @@ 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 = sselsp.lib
|
||||
OUT = aselsp.lib
|
||||
|
||||
CC = cl
|
||||
LD = link
|
||||
|
@ -2,7 +2,7 @@ SRCS = name.c token.c array.c mem.c env.c error.c \
|
||||
init.c read.c eval.c print.c \
|
||||
prim.c prim_prog.c prim_let.c prim_compar.c prim_math.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
OUT = libxplsp.a
|
||||
OUT = libaselsp.a
|
||||
|
||||
CC = @CC@
|
||||
RANLIB = @RANLIB@
|
||||
|
@ -1,6 +1,6 @@
|
||||
SRCS = name.c token.c array.c prim.c mem.c env.c init.c read.c eval.c print.c
|
||||
OBJS = name.obj token.obj array.obj prim.obj mem.obj env.obj init.obj read.obj eval.obj print.obj
|
||||
OUT = sselsp.lib
|
||||
OUT = aselsp.lib
|
||||
|
||||
CC = lcc
|
||||
CFLAGS = -I../.. -A -ansic -libcdll
|
||||
|
140
ase/macros.h
140
ase/macros.h
@ -1,118 +1,118 @@
|
||||
/*
|
||||
* $Id: macros.h,v 1.36 2006-10-22 11:44:46 bacon Exp $
|
||||
* $Id: macros.h,v 1.37 2006-10-24 04:30:13 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SSE_MACROS_H_
|
||||
#define _SSE_MACROS_H_
|
||||
#ifndef _ASE_MACROS_H_
|
||||
#define _ASE_MACROS_H_
|
||||
|
||||
#include <sse/types.h>
|
||||
#include <ase/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
/*#define SSE_NULL ((sse_uint_t)0)*/
|
||||
#define SSE_NULL (0)
|
||||
/*#define ASE_NULL ((ase_uint_t)0)*/
|
||||
#define ASE_NULL (0)
|
||||
#else
|
||||
#define SSE_NULL ((void*)0)
|
||||
#define ASE_NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
#define SSE_CHAR_EOF ((sse_cint_t)-1)
|
||||
#define ASE_CHAR_EOF ((ase_cint_t)-1)
|
||||
|
||||
#define sse_sizeof(n) (sizeof(n))
|
||||
#define sse_countof(n) (sizeof(n) / sizeof(n[0]))
|
||||
#define sse_offsetof(type,member) ((sse_size_t)&((type*)0)->member)
|
||||
#define ase_sizeof(n) (sizeof(n))
|
||||
#define ase_countof(n) (sizeof(n) / sizeof(n[0]))
|
||||
#define ase_offsetof(type,member) ((ase_size_t)&((type*)0)->member)
|
||||
|
||||
#if defined(_WIN32) && defined(SSE_CHAR_IS_WCHAR) && !defined(__LCC__)
|
||||
#define sse_main wmain
|
||||
#elif defined(SSE_CHAR_IS_MCHAR)
|
||||
#define sse_main main
|
||||
#if defined(_WIN32) && defined(ASE_CHAR_IS_WCHAR) && !defined(__LCC__)
|
||||
#define ase_main wmain
|
||||
#elif defined(ASE_CHAR_IS_MCHAR)
|
||||
#define ase_main main
|
||||
#endif
|
||||
|
||||
#define SSE_TYPE_IS_SIGNED(type) (((type)0) > ((type)-1))
|
||||
#define SSE_TYPE_IS_UNSIGNED(type) (((type)0) < ((type)-1))
|
||||
#define SSE_TYPE_MAX(type) \
|
||||
((SSE_TYPE_IS_SIGNED(type)? (type)~((type)1 << (sse_sizeof(type) * 8 - 1)): (type)(~(type)0)))
|
||||
#define SSE_TYPE_MIN(type) \
|
||||
((SSE_TYPE_IS_SIGNED(type)? (type)((type)1 << (sse_sizeof(type) * 8 - 1)): (type)0))
|
||||
#define ASE_TYPE_IS_SIGNED(type) (((type)0) > ((type)-1))
|
||||
#define ASE_TYPE_IS_UNSIGNED(type) (((type)0) < ((type)-1))
|
||||
#define ASE_TYPE_MAX(type) \
|
||||
((ASE_TYPE_IS_SIGNED(type)? (type)~((type)1 << (ase_sizeof(type) * 8 - 1)): (type)(~(type)0)))
|
||||
#define ASE_TYPE_MIN(type) \
|
||||
((ASE_TYPE_IS_SIGNED(type)? (type)((type)1 << (ase_sizeof(type) * 8 - 1)): (type)0))
|
||||
|
||||
#define SSE_NUM_IS_POWOF2(x) (((x) & ((x) - 1)) == 0)
|
||||
#define SSE_SWAP(x,y,original_type,casting_type) \
|
||||
#define ASE_NUM_IS_POWOF2(x) (((x) & ((x) - 1)) == 0)
|
||||
#define ASE_SWAP(x,y,original_type,casting_type) \
|
||||
do { \
|
||||
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
||||
y = (original_type)((casting_type)(y) ^ (casting_type)(x)); \
|
||||
x = (original_type)((casting_type)(x) ^ (casting_type)(y)); \
|
||||
} while (0)
|
||||
#define SSE_ABS(x) ((x) < 0? -(x): (x))
|
||||
#define ASE_ABS(x) ((x) < 0? -(x): (x))
|
||||
|
||||
#define SSE_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__;
|
||||
#define SSE_LOOP_BREAK(id) goto __loop_ ## id ## _end__;
|
||||
#define SSE_LOOP_BEGIN(id) __loop_ ## id ## _begin__: {
|
||||
#define SSE_LOOP_END(id) SSE_LOOP_CONTINUE(id) } __loop_ ## id ## _end__:;
|
||||
#define ASE_LOOP_CONTINUE(id) goto __loop_ ## id ## _begin__;
|
||||
#define ASE_LOOP_BREAK(id) goto __loop_ ## id ## _end__;
|
||||
#define ASE_LOOP_BEGIN(id) __loop_ ## id ## _begin__: {
|
||||
#define ASE_LOOP_END(id) ASE_LOOP_CONTINUE(id) } __loop_ ## id ## _end__:;
|
||||
|
||||
#define SSE_REPEAT(n,blk) \
|
||||
#define ASE_REPEAT(n,blk) \
|
||||
do { \
|
||||
sse_size_t __sse_repeat_x1 = (sse_size_t)(n); \
|
||||
sse_size_t __sse_repeat_x2 = __sse_repeat_x1 >> 4; \
|
||||
__sse_repeat_x1 &= 15; \
|
||||
while (__sse_repeat_x1-- > 0) { blk; } \
|
||||
while (__sse_repeat_x2-- > 0) { \
|
||||
ase_size_t __ase_repeat_x1 = (ase_size_t)(n); \
|
||||
ase_size_t __ase_repeat_x2 = __ase_repeat_x1 >> 4; \
|
||||
__ase_repeat_x1 &= 15; \
|
||||
while (__ase_repeat_x1-- > 0) { blk; } \
|
||||
while (__ase_repeat_x2-- > 0) { \
|
||||
blk; blk; blk; blk; blk; blk; blk; blk; \
|
||||
blk; blk; blk; blk; blk; blk; blk; blk; \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
/* obsolete */
|
||||
#define SSE_MQUOTE_I(val) #val
|
||||
#define SSE_MQUOTE(val) SSE_MQUOTE_I(val)
|
||||
#define SSE_MCHAR(ch) ((sse_mchar_t)ch)
|
||||
#define SSE_MTEXT(txt) ((const sse_mchar_t*)txt)
|
||||
#define ASE_MQUOTE_I(val) #val
|
||||
#define ASE_MQUOTE(val) ASE_MQUOTE_I(val)
|
||||
#define ASE_MCHAR(ch) ((ase_mchar_t)ch)
|
||||
#define ASE_MTEXT(txt) ((const ase_mchar_t*)txt)
|
||||
|
||||
/* new short form */
|
||||
#define SSE_MQ_I(val) #val
|
||||
#define SSE_MQ(val) SSE_MQ_I(val)
|
||||
#define SSE_MC(ch) ((sse_mchar_t)ch)
|
||||
#define SSE_MS(str) ((const sse_mchar_t*)str)
|
||||
#define SSE_MT(txt) (txt)
|
||||
#define ASE_MQ_I(val) #val
|
||||
#define ASE_MQ(val) ASE_MQ_I(val)
|
||||
#define ASE_MC(ch) ((ase_mchar_t)ch)
|
||||
#define ASE_MS(str) ((const ase_mchar_t*)str)
|
||||
#define ASE_MT(txt) (txt)
|
||||
|
||||
/* TODO: if the compiler doesn't have the built-in wchar_t support
|
||||
* SSE_WCHAR & SSE_WTEXT must be defined differently.
|
||||
#define SSE_WCHAR(ch) ((sse_wchar_t)ch)
|
||||
#define SSE_WTEXT(txt) don't know yet... may have to call a function?
|
||||
* ASE_WCHAR & ASE_WTEXT must be defined differently.
|
||||
#define ASE_WCHAR(ch) ((ase_wchar_t)ch)
|
||||
#define ASE_WTEXT(txt) don't know yet... may have to call a function?
|
||||
*/
|
||||
|
||||
/* obsolete */
|
||||
#define SSE_WQUOTE_I(val) (L###val)
|
||||
#define SSE_WQUOTE(val) SSE_WQUOTE_I(val)
|
||||
#define SSE_WCHAR(ch) ((sse_wchar_t)L##ch)
|
||||
#define SSE_WTEXT(txt) ((const sse_wchar_t*)L##txt)
|
||||
#define ASE_WQUOTE_I(val) (L###val)
|
||||
#define ASE_WQUOTE(val) ASE_WQUOTE_I(val)
|
||||
#define ASE_WCHAR(ch) ((ase_wchar_t)L##ch)
|
||||
#define ASE_WTEXT(txt) ((const ase_wchar_t*)L##txt)
|
||||
|
||||
/* new short form */
|
||||
#define SSE_WQ_I(val) (L###val)
|
||||
#define SSE_WQ(val) SSE_WQ_I(val)
|
||||
#define SSE_WC(ch) ((sse_wchar_t)L##ch)
|
||||
#define SSE_WS(str) ((const sse_wchar_t*)L##str)
|
||||
#define SSE_WT(txt) (L##txt)
|
||||
#define ASE_WQ_I(val) (L###val)
|
||||
#define ASE_WQ(val) ASE_WQ_I(val)
|
||||
#define ASE_WC(ch) ((ase_wchar_t)L##ch)
|
||||
#define ASE_WS(str) ((const ase_wchar_t*)L##str)
|
||||
#define ASE_WT(txt) (L##txt)
|
||||
|
||||
#if defined(SSE_CHAR_IS_MCHAR)
|
||||
#if defined(ASE_CHAR_IS_MCHAR)
|
||||
/* obsolete */
|
||||
#define SSE_CHAR(ch) SSE_MCHAR(ch)
|
||||
#define SSE_TEXT(txt) SSE_MTEXT(txt)
|
||||
#define SSE_QUOTE(val) SSE_MQUOTE(val)
|
||||
#define ASE_CHAR(ch) ASE_MCHAR(ch)
|
||||
#define ASE_TEXT(txt) ASE_MTEXT(txt)
|
||||
#define ASE_QUOTE(val) ASE_MQUOTE(val)
|
||||
|
||||
/* new short form */
|
||||
#define SSE_C(ch) SSE_MC(ch)
|
||||
#define SSE_S(str) SSE_MS(str)
|
||||
#define SSE_T(txt) SSE_MT(txt)
|
||||
#define SSE_Q(val) SSE_MQ(val)
|
||||
#define ASE_C(ch) ASE_MC(ch)
|
||||
#define ASE_S(str) ASE_MS(str)
|
||||
#define ASE_T(txt) ASE_MT(txt)
|
||||
#define ASE_Q(val) ASE_MQ(val)
|
||||
#else
|
||||
/* obsolete */
|
||||
#define SSE_CHAR(ch) SSE_WCHAR(ch)
|
||||
#define SSE_TEXT(txt) SSE_WTEXT(txt)
|
||||
#define SSE_QUOTE(val) SSE_WQUOTE(val)
|
||||
#define ASE_CHAR(ch) ASE_WCHAR(ch)
|
||||
#define ASE_TEXT(txt) ASE_WTEXT(txt)
|
||||
#define ASE_QUOTE(val) ASE_WQUOTE(val)
|
||||
|
||||
/* new short form */
|
||||
#define SSE_C(ch) SSE_WC(ch)
|
||||
#define SSE_S(str) SSE_WS(str)
|
||||
#define SSE_T(txt) SSE_WT(txt)
|
||||
#define SSE_Q(val) SSE_WQ(val)
|
||||
#define ASE_C(ch) ASE_WC(ch)
|
||||
#define ASE_S(str) ASE_WS(str)
|
||||
#define ASE_T(txt) ASE_WT(txt)
|
||||
#define ASE_Q(val) ASE_WQ(val)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
339
ase/types.h
339
ase/types.h
@ -1,268 +1,207 @@
|
||||
/*
|
||||
* $Id: types.h,v 1.57 2006-10-22 11:44:46 bacon Exp $
|
||||
* $Id: types.h,v 1.58 2006-10-24 04:30:13 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SSE_TYPES_H_
|
||||
#define _SSE_TYPES_H_
|
||||
#ifndef _ASE_TYPES_H_
|
||||
#define _ASE_TYPES_H_
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <sse/conf_msw.h>
|
||||
#include <ase/conf_msw.h>
|
||||
#elif defined(vms) || defined(__vms)
|
||||
#include <sse/conf_vms.h>
|
||||
#include <ase/conf_vms.h>
|
||||
#elif defined(dos) || defined(__dos)
|
||||
#include <sse/conf_dos.h>
|
||||
#include <ase/conf_dos.h>
|
||||
#else
|
||||
#include <sse/config.h>
|
||||
#include <ase/config.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: Data Types
|
||||
* Various basic data types are predefined for convenience sake and used
|
||||
* constantly thoughout the entire toolkit. The developers are strongly
|
||||
* encouraged to use these data types rather than built-in data types
|
||||
* supported by compilers.
|
||||
*
|
||||
* NOTE: Availabilty
|
||||
* Some of the data types may or may not be available depending on
|
||||
* the capability of the compiler.
|
||||
*
|
||||
* GROUP: State Types
|
||||
*
|
||||
* TYPE: sse_bool_t
|
||||
* Boolean type
|
||||
*
|
||||
* TYPE: sse_tri_t
|
||||
* Tri-State type
|
||||
*
|
||||
* GROUP: Integral Types
|
||||
*
|
||||
* TYPE: sse_byte_t
|
||||
*
|
||||
* TYPE: sse_word_t
|
||||
*
|
||||
* TYPE: sse_int_t
|
||||
* Signed integer whose size equals the size of a pointer
|
||||
*
|
||||
* TYPE: sse_uint_t
|
||||
* Unsigned integer whose size equals the size of a pointer
|
||||
*
|
||||
* TYPE: sse_long_t
|
||||
* The largest signed integer available
|
||||
*
|
||||
* TYPE: sse_ulong_t
|
||||
* The largest unsigned integer available
|
||||
*
|
||||
* TYPE: sse_size_t
|
||||
* Unsigned integer which can represent the size of the largest
|
||||
* in-memory data
|
||||
*
|
||||
* TYPE: sse_ssize_t
|
||||
* Signed version of sse_size_t
|
||||
*
|
||||
* TYPE: sse_int8_t
|
||||
*
|
||||
* TYPE: sse_uint8_t
|
||||
*
|
||||
* TYPE: sse_int16_t
|
||||
*
|
||||
* TYPE: sse_uint16_t
|
||||
*
|
||||
* TYPE: sse_int32_t
|
||||
*
|
||||
* TYPE: sse_uint32_t
|
||||
*
|
||||
* TYPE: sse_int64_t
|
||||
*
|
||||
* TYPE: sse_uint64_t
|
||||
*/
|
||||
|
||||
/* boolean type */
|
||||
typedef int sse_bool_t;
|
||||
#define sse_true (0 == 0)
|
||||
#define sse_false (0 != 0)
|
||||
typedef int ase_bool_t;
|
||||
#define ase_true (0 == 0)
|
||||
#define ase_false (0 != 0)
|
||||
|
||||
/* tri-state type */
|
||||
typedef int sse_tri_t;
|
||||
#define sse_alive 1
|
||||
#define sse_zombie 0
|
||||
#define sse_dead -1
|
||||
typedef int ase_tri_t;
|
||||
#define ase_alive 1
|
||||
#define ase_zombie 0
|
||||
#define ase_dead -1
|
||||
|
||||
/* integer that can hold a pointer */
|
||||
#if SSE_SIZEOF_VOID_P == SSE_SIZEOF_INT
|
||||
typedef int sse_int_t;
|
||||
typedef unsigned int sse_uint_t;
|
||||
#elif SSE_SIZEOF_VOID_P == SSE_SIZEOF_LONG
|
||||
typedef long sse_int_t;
|
||||
typedef unsigned long sse_uint_t;
|
||||
#elif SSE_SIZEOF_VOID_P == SSE_SIZEOF_LONG_LONG
|
||||
typedef long long sse_int_t;
|
||||
typedef unsigned long long sse_uint_t;
|
||||
#if ASE_SIZEOF_VOID_P == ASE_SIZEOF_INT
|
||||
typedef int ase_int_t;
|
||||
typedef unsigned int ase_uint_t;
|
||||
#elif ASE_SIZEOF_VOID_P == ASE_SIZEOF_LONG
|
||||
typedef long ase_int_t;
|
||||
typedef unsigned long ase_uint_t;
|
||||
#elif ASE_SIZEOF_VOID_P == ASE_SIZEOF_LONG_LONG
|
||||
typedef long long ase_int_t;
|
||||
typedef unsigned long long ase_uint_t;
|
||||
#else
|
||||
#error Unsupported pointer size
|
||||
#endif
|
||||
|
||||
|
||||
/* the largest integer supported by the system */
|
||||
#if SSE_SIZEOF_LONG_LONG != 0
|
||||
typedef long long sse_long_t;
|
||||
typedef unsigned long long sse_ulong_t;
|
||||
#elif SSE_SIZEOF___INT64 != 0
|
||||
typedef __int64 sse_long_t;
|
||||
typedef unsigned __int64 sse_ulong_t;
|
||||
#if ASE_SIZEOF_LONG_LONG != 0
|
||||
typedef long long ase_long_t;
|
||||
typedef unsigned long long ase_ulong_t;
|
||||
#elif ASE_SIZEOF___INT64 != 0
|
||||
typedef __int64 ase_long_t;
|
||||
typedef unsigned __int64 ase_ulong_t;
|
||||
#else
|
||||
typedef long sse_long_t;
|
||||
typedef unsigned long sse_ulong_t;
|
||||
typedef long ase_long_t;
|
||||
typedef unsigned long ase_ulong_t;
|
||||
#endif
|
||||
|
||||
/* integers of specific size */
|
||||
#if SSE_SIZEOF_CHAR == 1
|
||||
typedef char sse_int8_t;
|
||||
typedef unsigned char sse_uint8_t;
|
||||
#elif SSE_SIZEOF___INT8 == 1
|
||||
typedef __int8 sse_int8_t;
|
||||
typedef unsigned __int8 sse_uint8_t;
|
||||
#if ASE_SIZEOF_CHAR == 1
|
||||
typedef char ase_int8_t;
|
||||
typedef unsigned char ase_uint8_t;
|
||||
#elif ASE_SIZEOF___INT8 == 1
|
||||
typedef __int8 ase_int8_t;
|
||||
typedef unsigned __int8 ase_uint8_t;
|
||||
#endif
|
||||
|
||||
#if SSE_SIZEOF_SHORT == 2
|
||||
typedef short sse_int16_t;
|
||||
typedef unsigned short sse_uint16_t;
|
||||
#elif SSE_SIZEOF___INT16 == 2
|
||||
typedef __int16 sse_int16_t;
|
||||
typedef unsigned __int16 sse_uint16_t;
|
||||
#if ASE_SIZEOF_SHORT == 2
|
||||
typedef short ase_int16_t;
|
||||
typedef unsigned short ase_uint16_t;
|
||||
#elif ASE_SIZEOF___INT16 == 2
|
||||
typedef __int16 ase_int16_t;
|
||||
typedef unsigned __int16 ase_uint16_t;
|
||||
#endif
|
||||
|
||||
#if SSE_SIZEOF_INT == 4
|
||||
typedef int sse_int32_t;
|
||||
typedef unsigned int sse_uint32_t;
|
||||
#elif SSE_SIZEOF_LONG == 4
|
||||
typedef long sse_int32_t;
|
||||
typedef unsigned long sse_uint32_t;
|
||||
#elif SSE_SIZEOF___INT32 == 4
|
||||
typedef __int32 sse_int32_t;
|
||||
typedef unsigned __int32 sse_uint32_t;
|
||||
#if ASE_SIZEOF_INT == 4
|
||||
typedef int ase_int32_t;
|
||||
typedef unsigned int ase_uint32_t;
|
||||
#elif ASE_SIZEOF_LONG == 4
|
||||
typedef long ase_int32_t;
|
||||
typedef unsigned long ase_uint32_t;
|
||||
#elif ASE_SIZEOF___INT32 == 4
|
||||
typedef __int32 ase_int32_t;
|
||||
typedef unsigned __int32 ase_uint32_t;
|
||||
#endif
|
||||
|
||||
#if SSE_SIZEOF_INT == 8
|
||||
#define SSE_HAVE_INT64_T
|
||||
#define SSE_HAVE_UINT64_T
|
||||
typedef int sse_int64_t;
|
||||
typedef unsigned int sse_uint64_t;
|
||||
#elif SSE_SIZEOF_LONG == 8
|
||||
#define SSE_HAVE_INT64_T
|
||||
#define SSE_HAVE_UINT64_T
|
||||
typedef long sse_int64_t;
|
||||
typedef unsigned long sse_uint64_t;
|
||||
#elif SSE_SIZEOF_LONG_LONG == 8
|
||||
#define SSE_HAVE_INT64_T
|
||||
#define SSE_HAVE_UINT64_T
|
||||
typedef long long sse_int64_t;
|
||||
typedef unsigned long long sse_uint64_t;
|
||||
#elif SSE_SIZEOF___INT64 == 8
|
||||
#define SSE_HAVE_INT64_T
|
||||
#define SSE_HAVE_UINT64_T
|
||||
typedef __int64 sse_int64_t;
|
||||
typedef unsigned __int64 sse_uint64_t;
|
||||
#if ASE_SIZEOF_INT == 8
|
||||
#define ASE_HAVE_INT64_T
|
||||
#define ASE_HAVE_UINT64_T
|
||||
typedef int ase_int64_t;
|
||||
typedef unsigned int ase_uint64_t;
|
||||
#elif ASE_SIZEOF_LONG == 8
|
||||
#define ASE_HAVE_INT64_T
|
||||
#define ASE_HAVE_UINT64_T
|
||||
typedef long ase_int64_t;
|
||||
typedef unsigned long ase_uint64_t;
|
||||
#elif ASE_SIZEOF_LONG_LONG == 8
|
||||
#define ASE_HAVE_INT64_T
|
||||
#define ASE_HAVE_UINT64_T
|
||||
typedef long long ase_int64_t;
|
||||
typedef unsigned long long ase_uint64_t;
|
||||
#elif ASE_SIZEOF___INT64 == 8
|
||||
#define ASE_HAVE_INT64_T
|
||||
#define ASE_HAVE_UINT64_T
|
||||
typedef __int64 ase_int64_t;
|
||||
typedef unsigned __int64 ase_uint64_t;
|
||||
#endif
|
||||
|
||||
#if SSE_SIZEOF_INT == 16
|
||||
#define SSE_HAVE_INT128_T
|
||||
#define SSE_HAVE_UINT128_T
|
||||
typedef int sse_int128_t;
|
||||
typedef unsigned int sse_uint128_t;
|
||||
#elif SSE_SIZEOF_LONG == 16
|
||||
#define SSE_HAVE_INT128_T
|
||||
#define SSE_HAVE_UINT128_T
|
||||
typedef long sse_int128_t;
|
||||
typedef unsigned long sse_uint128_t;
|
||||
#elif SSE_SIZEOF_LONG_LONG == 16
|
||||
#define SSE_HAVE_INT128_T
|
||||
#define SSE_HAVE_UINT128_T
|
||||
typedef long long sse_int128_t;
|
||||
typedef unsigned long long sse_uint128_t;
|
||||
#elif SSE_SIZEOF___INT128 == 16
|
||||
#define SSE_HAVE_INT128_T
|
||||
#define SSE_HAVE_UINT128_T
|
||||
typedef __int128 sse_int128_t;
|
||||
typedef unsigned __int128 sse_uint128_t;
|
||||
#if ASE_SIZEOF_INT == 16
|
||||
#define ASE_HAVE_INT128_T
|
||||
#define ASE_HAVE_UINT128_T
|
||||
typedef int ase_int128_t;
|
||||
typedef unsigned int ase_uint128_t;
|
||||
#elif ASE_SIZEOF_LONG == 16
|
||||
#define ASE_HAVE_INT128_T
|
||||
#define ASE_HAVE_UINT128_T
|
||||
typedef long ase_int128_t;
|
||||
typedef unsigned long ase_uint128_t;
|
||||
#elif ASE_SIZEOF_LONG_LONG == 16
|
||||
#define ASE_HAVE_INT128_T
|
||||
#define ASE_HAVE_UINT128_T
|
||||
typedef long long ase_int128_t;
|
||||
typedef unsigned long long ase_uint128_t;
|
||||
#elif ASE_SIZEOF___INT128 == 16
|
||||
#define ASE_HAVE_INT128_T
|
||||
#define ASE_HAVE_UINT128_T
|
||||
typedef __int128 ase_int128_t;
|
||||
typedef unsigned __int128 ase_uint128_t;
|
||||
#endif
|
||||
|
||||
/* miscellaneous integral types */
|
||||
typedef sse_uint8_t sse_byte_t;
|
||||
typedef sse_uint_t sse_size_t;
|
||||
typedef sse_int_t sse_ssize_t;
|
||||
typedef sse_uint_t sse_word_t;
|
||||
typedef ase_uint8_t ase_byte_t;
|
||||
typedef ase_uint_t ase_size_t;
|
||||
typedef ase_int_t ase_ssize_t;
|
||||
typedef ase_uint_t ase_word_t;
|
||||
|
||||
/* floating-point number */
|
||||
#if defined(__FreeBSD__)
|
||||
/* TODO: check if the support for long double is complete.
|
||||
* if so, use long double for sse_real_t */
|
||||
#define SSE_SIZEOF_REAL SSE_SIZEOF_DOUBLE
|
||||
typedef double sse_real_t;
|
||||
#elif SSE_SIZEOF_LONG_DOUBLE > SSE_SIZEOF_DOUBLE
|
||||
#define SSE_SIZEOF_REAL SSE_SIZEOF_LONG_DOUBLE
|
||||
typedef long double sse_real_t;
|
||||
* if so, use long double for ase_real_t */
|
||||
#define ASE_SIZEOF_REAL ASE_SIZEOF_DOUBLE
|
||||
typedef double ase_real_t;
|
||||
#elif ASE_SIZEOF_LONG_DOUBLE > ASE_SIZEOF_DOUBLE
|
||||
#define ASE_SIZEOF_REAL ASE_SIZEOF_LONG_DOUBLE
|
||||
typedef long double ase_real_t;
|
||||
#else
|
||||
#define SSE_SIZEOF_REAL SSE_SIZEOF_DOUBLE
|
||||
typedef double sse_real_t;
|
||||
#define ASE_SIZEOF_REAL ASE_SIZEOF_DOUBLE
|
||||
typedef double ase_real_t;
|
||||
#endif
|
||||
|
||||
/* character types */
|
||||
typedef char sse_mchar_t;
|
||||
typedef int sse_mcint_t;
|
||||
typedef char ase_mchar_t;
|
||||
typedef int ase_mcint_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
/* C++ */
|
||||
typedef wchar_t sse_wchar_t;
|
||||
typedef wchar_t sse_wcint_t;
|
||||
typedef wchar_t ase_wchar_t;
|
||||
typedef wchar_t ase_wcint_t;
|
||||
|
||||
/* all the way down from here for C */
|
||||
#elif (SSE_SIZEOF_WCHAR_T == 2) || (SSE_SIZEOF_WCHAR_T == 0)
|
||||
typedef unsigned short sse_wchar_t;
|
||||
typedef unsigned short sse_wcint_t;
|
||||
#elif (SSE_SIZEOF_WCHAR_T == 4)
|
||||
#elif (ASE_SIZEOF_WCHAR_T == 2) || (ASE_SIZEOF_WCHAR_T == 0)
|
||||
typedef unsigned short ase_wchar_t;
|
||||
typedef unsigned short ase_wcint_t;
|
||||
#elif (ASE_SIZEOF_WCHAR_T == 4)
|
||||
#if defined(vms) || defined(__vms)
|
||||
typedef unsigned int sse_wchar_t;
|
||||
typedef int sse_wcint_t;
|
||||
typedef unsigned int ase_wchar_t;
|
||||
typedef int ase_wcint_t;
|
||||
#elif defined(__FreeBSD__)
|
||||
typedef int sse_wchar_t;
|
||||
typedef int sse_wcint_t;
|
||||
typedef int ase_wchar_t;
|
||||
typedef int ase_wcint_t;
|
||||
#elif (defined(sun) || defined(__sun)) && defined(_LP64)
|
||||
typedef int sse_wchar_t;
|
||||
typedef int sse_wcint_t;
|
||||
#elif SSE_SIZEOF_LONG == 4
|
||||
typedef long sse_wchar_t;
|
||||
typedef long sse_wcint_t;
|
||||
typedef int ase_wchar_t;
|
||||
typedef int ase_wcint_t;
|
||||
#elif ASE_SIZEOF_LONG == 4
|
||||
typedef long ase_wchar_t;
|
||||
typedef long ase_wcint_t;
|
||||
#else
|
||||
typedef int sse_wchar_t;
|
||||
typedef int sse_wcint_t;
|
||||
typedef int ase_wchar_t;
|
||||
typedef int ase_wcint_t;
|
||||
#endif
|
||||
#else
|
||||
#error unsupported size of wchar_t
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && (defined(UNICODE)||defined(_UNICODE))
|
||||
#define SSE_CHAR_IS_WCHAR
|
||||
typedef sse_wchar_t sse_char_t;
|
||||
typedef sse_wcint_t sse_cint_t;
|
||||
#define ASE_CHAR_IS_WCHAR
|
||||
typedef ase_wchar_t ase_char_t;
|
||||
typedef ase_wcint_t ase_cint_t;
|
||||
#else
|
||||
#if defined(SSE_CHAR_IS_MCHAR)
|
||||
typedef sse_mchar_t sse_char_t;
|
||||
typedef sse_mcint_t sse_cint_t;
|
||||
#elif defined(SSE_CHAR_IS_WCHAR)
|
||||
typedef sse_wchar_t sse_char_t;
|
||||
typedef sse_wcint_t sse_cint_t;
|
||||
#if defined(ASE_CHAR_IS_MCHAR)
|
||||
typedef ase_mchar_t ase_char_t;
|
||||
typedef ase_mcint_t ase_cint_t;
|
||||
#elif defined(ASE_CHAR_IS_WCHAR)
|
||||
typedef ase_wchar_t ase_char_t;
|
||||
typedef ase_wcint_t ase_cint_t;
|
||||
#elif defined(_MBCS)
|
||||
#define SSE_CHAR_IS_MCHAR
|
||||
typedef sse_mchar_t sse_char_t;
|
||||
typedef sse_mcint_t sse_cint_t;
|
||||
#define ASE_CHAR_IS_MCHAR
|
||||
typedef ase_mchar_t ase_char_t;
|
||||
typedef ase_mcint_t ase_cint_t;
|
||||
#else
|
||||
#define SSE_CHAR_IS_WCHAR
|
||||
typedef sse_wchar_t sse_char_t;
|
||||
typedef sse_wcint_t sse_cint_t;
|
||||
#define ASE_CHAR_IS_WCHAR
|
||||
typedef ase_wchar_t ase_char_t;
|
||||
typedef ase_wcint_t ase_cint_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SSE_CHAR_IS_WCHAR) && defined(_WIN32)
|
||||
#if defined(ASE_CHAR_IS_WCHAR) && defined(_WIN32)
|
||||
#ifndef UNICODE
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user