From 883b323b80ff4b4a85aa69dd0191b4ea154dab59 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 6 Jun 2005 16:32:29 +0000 Subject: [PATCH] *** empty log message *** --- ase/macros.h | 3 +-- ase/stx/makefile.bcc | 3 ++- ase/test/stx/makefile.bcc | 13 +++++++------ ase/test/stx/parser.c | 13 ++++--------- ase/types.h | 5 +++-- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/ase/macros.h b/ase/macros.h index f922ea0b..4072c56b 100644 --- a/ase/macros.h +++ b/ase/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h,v 1.25 2005-05-28 13:34:26 bacon Exp $ + * $Id: macros.h,v 1.26 2005-06-06 16:32:29 bacon Exp $ */ #ifndef _XP_MACROS_H_ @@ -19,7 +19,6 @@ #define xp_countof(n) (sizeof(n) / sizeof(n[0])) #define xp_offsetof(type,member) ((xp_size_t)&((type*)0)->member) - #if defined(_WIN32) && defined(XP_CHAR_IS_WCHAR) && !defined(__LCC__) #define xp_main wmain #elif defined(XP_CHAR_IS_MCHAR) diff --git a/ase/stx/makefile.bcc b/ase/stx/makefile.bcc index 48082170..7eccecbe 100644 --- a/ase/stx/makefile.bcc +++ b/ase/stx/makefile.bcc @@ -1,5 +1,6 @@ SRCS = \ - stx.c memory.c object.c symbol.c hash.c misc.c context.c + stx.c memory.c object.c symbol.c class.c \ + hash.c misc.c context.c token.c parser.c bootstrp.c OBJS = $(SRCS:.c=.obj) OUT = xpstx.lib diff --git a/ase/test/stx/makefile.bcc b/ase/test/stx/makefile.bcc index 1e0b1c63..f4e2a7da 100644 --- a/ase/test/stx/makefile.bcc +++ b/ase/test/stx/makefile.bcc @@ -1,15 +1,16 @@ -SRCS = stx.c -OBJS = stx.obj -OUT = stx.exe - CC = bcc32 CFLAGS = -I..\..\.. LDFLAGS = -L..\..\..\xp\bas -L..\..\..\xp\stx LIBS = import32.lib cw32mt.lib xpbas.lib xpstx.lib STARTUP = c0x32w.obj -all: $(OBJS) - ilink32 $(LDFLAGS) $(STARTUP) $(OBJS),$(OUT),,$(LIBS),, +all: stx parser + +stx: stx.obj + ilink32 $(LDFLAGS) $(STARTUP) stx.obj,stx.exe,,$(LIBS),, + +parser: parser.obj + ilink32 $(LDFLAGS) $(STARTUP) parser.obj,parser.exe,,$(LIBS),, clean: del $(OBJS) *.obj $(OUT) diff --git a/ase/test/stx/parser.c b/ase/test/stx/parser.c index 668bd6f6..25e501bd 100644 --- a/ase/test/stx/parser.c +++ b/ase/test/stx/parser.c @@ -75,17 +75,12 @@ int stdio_func (int cmd, void* owner, void* arg) else if (cmd == XP_STX_PARSER_INPUT_CONSUME) { stdio_t* p = (stdio_t*)owner; xp_cint_t* c = (xp_cint_t*)arg; - if (xp_feof(p->stdio)) { + xp_cint_t t = xp_fgetc (p->stdio); + if (t == XP_CHAR_EOF) { + if (xp_ferror (p->stdio)) return -1; *c = XP_STX_CHAR_EOF; } - else { - xp_cint_t t = xp_fgetc (p->stdio); - if (t == XP_CHAR_EOF) { - if (xp_ferror (p->stdio)) return -1; - *c = XP_STX_CHAR_EOF; - } - else *c = t; - } + else *c = t; return 0; } else if (cmd == XP_STX_PARSER_INPUT_REWIND) { diff --git a/ase/types.h b/ase/types.h index e0ea556d..984183c2 100644 --- a/ase/types.h +++ b/ase/types.h @@ -1,5 +1,5 @@ /* - * $Id: types.h,v 1.26 2005-05-20 04:01:12 bacon Exp $ + * $Id: types.h,v 1.27 2005-06-06 16:32:29 bacon Exp $ */ #ifndef _XP_TYPES_H_ @@ -133,7 +133,8 @@ typedef int xp_mcint_t; #define XP_CHAR_IS_MCHAR #elif defined(_WIN32) typedef unsigned short xp_wchar_t; - typedef int xp_wcint_t; + /*typedef int xp_wcint_t;*/ + typedef unsigned short xp_wcint_t; #elif SIZEOF_LONG == 4 /*typedef unsigned short xp_wchar_t;*/ typedef long xp_wchar_t;