From db243a70d5dd5edd3d2e54c3a5eaf1436ffb8152 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 20 Feb 2007 14:50:35 +0000 Subject: [PATCH] *** empty log message *** --- ase/test/awk/awk.c | 4 +-- ase/utl/ctype.c | 27 ++++++++++++++++++ ase/utl/ctype.h | 60 ++++++++++++++++++++++++++++++---------- ase/utl/descrip.mms | 16 +++++++++++ ase/utl/makefile.in | 2 +- ase/utl/makefile.msw.bcc | 2 +- 6 files changed, 92 insertions(+), 19 deletions(-) create mode 100644 ase/utl/ctype.c create mode 100644 ase/utl/descrip.mms diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index af675c98..e928b6b1 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.170 2007-02-20 14:23:18 bacon Exp $ + * $Id: awk.c,v 1.171 2007-02-20 14:45:48 bacon Exp $ */ #include @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #if defined(_WIN32) diff --git a/ase/utl/ctype.c b/ase/utl/ctype.c new file mode 100644 index 00000000..da715aa4 --- /dev/null +++ b/ase/utl/ctype.c @@ -0,0 +1,27 @@ +/* + * $Id: ctype.c,v 1.1 2007-02-20 14:47:33 bacon Exp $ + */ + +#include + +#if defined(ASE_CHAR_IS_MCHAR) && defined(isupper) + + int ase_isupper (int c) { return isupper (c); } + int ase_islower (int c) { return islower (c); } + int ase_isalpha (int c) { return isalpha (c); } + int ase_isdigit (int c) { return isdigit (c); } + int ase_isxdigit (int c) { return isxdigit (c); } + int ase_isalnum (int c) { return isalnum (c); } + int ase_isspace (int c) { return isspace (c); } + int ase_isprint (int c) { return isprint (c); } + int ase_isgraph (int c) { return isgraph (c); } + int ase_iscntrl (int c) { return iscntrl (c); } + int ase_ispunct (int c) { return ispunct (c); } + +#endif + +#if defined(ASE_CHAR_IS_MCHAR) && defined(toupper) + int ase_toupper (int c) { return toupper (c); } + int ase_tolower (int c) { return tolower (c); } +#endif + diff --git a/ase/utl/ctype.h b/ase/utl/ctype.h index c24a4320..f382b705 100644 --- a/ase/utl/ctype.h +++ b/ase/utl/ctype.h @@ -10,21 +10,26 @@ #if defined(ASE_CHAR_IS_MCHAR) #include + + #if !defined(isupper) + #define ase_isupper isupper + #define ase_islower islower + #define ase_isalpha isalpha + #define ase_isdigit isdigit + #define ase_isxdigit isxdigit + #define ase_isalnum isalnum + #define ase_isspace isspace + #define ase_isprint isprint + #define ase_isgraph isgraph + #define ase_iscntrl iscntrl + #define ase_ispunct ispunct + #endif - #define ase_isupper isupper - #define ase_islower islower - #define ase_isalpha isalpha - #define ase_isdigit isdigit - #define ase_isxdigit isxdigit - #define ase_isalnum isalnum - #define ase_isspace isspace - #define ase_isprint isprint - #define ase_isgraph isgraph - #define ase_iscntrl iscntrl - #define ase_ispunct ispunct + #if !defined(toupper) + #define ase_toupper toupper + #define ase_tolower tolower + #endif - #define ase_toupper tolower - #define ase_tolower tolower #else #include @@ -40,8 +45,35 @@ #define ase_iscntrl iswcntrl #define ase_ispunct iswpunct - #define ase_toupper towlower + #define ase_toupper towupper #define ase_tolower towlower #endif +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(ASE_CHAR_IS_MCHAR) && defined(isupper) + int ase_isupper (int c); + int ase_islower (int c); + int ase_isalpha (int c); + int ase_isdigit (int c); + int ase_isxdigit (int c); + int ase_isalnum (int c); + int ase_isspace (int c); + int ase_isprint (int c); + int ase_isgraph (int c); + int ase_iscntrl (int c); + int ase_ispunct (int c); +#endif + +#if defined(ASE_CHAR_IS_MCHAR) && defined(toupper) + int ase_toupper (int c); + int ase_tolower (int c); +#endif + +#ifdef __cplusplus +} +#endif + #endif diff --git a/ase/utl/descrip.mms b/ase/utl/descrip.mms new file mode 100644 index 00000000..f1e565cc --- /dev/null +++ b/ase/utl/descrip.mms @@ -0,0 +1,16 @@ +# +# OpenVMS MMS/MMK +# + +objects = main.c ctype.c stdio.c + +CFLAGS = /include="../.." +#CFLAGS = /pointer_size=long /include="../.." +LIBRFLAGS = + +aseutl.olb : $(objects) + $(LIBR)/create $(MMS$TARGET) $(objects) + +main.obj depends_on main.c +ctype.obj depends_on ctype.c +stdio.obj depends_on stdio.c diff --git a/ase/utl/makefile.in b/ase/utl/makefile.in index 49ec2d42..9f2221d0 100644 --- a/ase/utl/makefile.in +++ b/ase/utl/makefile.in @@ -1,6 +1,6 @@ OUT = aseutl -C_SRCS = main.c stdio.c +C_SRCS = main.c ctype.c stdio.c C_OBJS = $(C_SRCS:.c=.o) CC = @CC@ diff --git a/ase/utl/makefile.msw.bcc b/ase/utl/makefile.msw.bcc index 5727ba7a..7b8b866d 100644 --- a/ase/utl/makefile.msw.bcc +++ b/ase/utl/makefile.msw.bcc @@ -1,6 +1,6 @@ OUT = aseutl -C_SRCS = main.c stdio.c +C_SRCS = main.c ctype.c stdio.c C_OBJS = $(C_SRCS:.c=.obj) CC = bcc32