*** empty log message ***

This commit is contained in:
hyung-hwan 2006-06-30 06:09:38 +00:00
parent 375c3f19c3
commit 6aef20775a
2 changed files with 18 additions and 8 deletions

View File

@ -1,4 +1,4 @@
SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c misc.c SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c func.c misc.c extio.c
OBJS = $(SRCS:.c=.o) OBJS = $(SRCS:.c=.o)
OUT = libxpawk.a OUT = libxpawk.a
@ -15,3 +15,5 @@ clean:
.c.o: .c.o:
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<

View File

@ -1,18 +1,26 @@
/* /*
* $Id: awk.c,v 1.48 2006-06-30 04:25:53 bacon Exp $ * $Id: awk.c,v 1.49 2006-06-30 06:09:38 bacon Exp $
*/ */
#include <xp/awk/awk.h> #include <xp/awk/awk.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#ifdef XP_CHAR_IS_WCHAR #ifdef XP_CHAR_IS_WCHAR
#include <wchar.h> #include <wchar.h>
#endif #endif
#ifndef __STAND_ALONE #ifndef __STAND_ALONE
#include <xp/bas/stdio.h> #include <xp/bas/stdio.h>
#include <xp/bas/string.h> #include <xp/bas/string.h>
#include <xp/bas/sysapi.h> #include <xp/bas/sysapi.h>
#else
#include <limits.h>
#ifndef PATH_MAX
#define XP_PATH_MAX 4096
#else
#define XP_PATH_MAX PATH_MAX
#endif
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
@ -372,7 +380,7 @@ xp_printf (XP_TEXT("closing [%s] of type %d (console)\n"), epa->name, epa->type
case XP_AWK_IO_READ: case XP_AWK_IO_READ:
{ {
if (fgets_t (data, size, (FILE*)epa->handle) == XP_NULL) if (fgets_t (data, size, (FILE*)epa->handle) == XP_NULL)
//if (fgets_t (data, size, stdin) == XP_NULL) /*if (fgets_t (data, size, stdin) == XP_NULL)*/
{ {
return 0; return 0;
} }
@ -383,7 +391,7 @@ xp_printf (XP_TEXT("closing [%s] of type %d (console)\n"), epa->name, epa->type
{ {
/* TODO: how to return error or 0 */ /* TODO: how to return error or 0 */
fputs_t (data, /*size,*/ (FILE*)epa->handle); fputs_t (data, /*size,*/ (FILE*)epa->handle);
//fputs_t (data, /*size,*/ stdout); /*fputs_t (data, stdout);*/
return size; return size;
} }