From 6dd18f6e075844ba203676ac77e0daf803fd81cb Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 14 Apr 2006 11:13:06 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/Makefile.sco | 2 +- ase/test/awk/Makefile.sco | 17 +++++++++++++++++ ase/test/awk/awk.c | 10 +++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 ase/test/awk/Makefile.sco diff --git a/ase/awk/Makefile.sco b/ase/awk/Makefile.sco index 0f419729..6729a81b 100644 --- a/ase/awk/Makefile.sco +++ b/ase/awk/Makefile.sco @@ -6,7 +6,7 @@ CC = cc CFLAGS = -Xc -a ansi -O2 -I../.. -D__STAND_ALONE all: $(OBJS) - + ar cr $(OUT) $(OBJS) clean: rm -rf $(OBJS) $(OUT) *.obj diff --git a/ase/test/awk/Makefile.sco b/ase/test/awk/Makefile.sco new file mode 100644 index 00000000..1f7fdc94 --- /dev/null +++ b/ase/test/awk/Makefile.sco @@ -0,0 +1,17 @@ +CC = cc +CFLAGS = -Xc -a ansi -O2 -I../../.. +LDFLAGS = -L../../bas -L../../awk +LIBS = -lxpawk -lm + +all: awk + +awk: awk.o + $(CC) -o awk awk.o $(LDFLAGS) $(LIBS) + +clean: + rm -f *.obj awk + +.SUFFIXES: .c .o +.c.o: + $(CC) -c $(CFLAGS) $< + diff --git a/ase/test/awk/awk.c b/ase/test/awk/awk.c index d0182d50..3753e2c4 100644 --- a/ase/test/awk/awk.c +++ b/ase/test/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.19 2006-04-10 09:26:17 bacon Exp $ + * $Id: awk.c,v 1.20 2006-04-14 11:13:06 bacon Exp $ */ #include @@ -47,7 +47,11 @@ static xp_ssize_t process_source (int cmd, void* arg, xp_char_t* data, xp_size_t #include #endif +#if defined(_SCO_DS) +int main (int argc, char* argv[]) +#else int xp_main (int argc, xp_char_t* argv[]) +#endif { xp_awk_t* awk; @@ -81,7 +85,11 @@ int xp_main (int argc, xp_char_t* argv[]) if (argc == 2) { +#if defined(_SCO_DS) + if (strcmp(argv[1], "-m") == 0) +#else if (xp_strcmp(argv[1], XP_TEXT("-m")) == 0) +#endif { xp_awk_setrunopt (awk, XP_AWK_RUNMAIN); }