*** empty log message ***
This commit is contained in:
parent
670a7083d4
commit
8065824722
20
ase/awk/makefile.tcc
Normal file
20
ase/awk/makefile.tcc
Normal file
@ -0,0 +1,20 @@
|
||||
SRCS = awk.c err.c tree.c tab.c map.c parse.c run.c sa.c val.c misc.c
|
||||
OBJS = $(SRCS:.c=.obj)
|
||||
OUT = xpawk.lib
|
||||
|
||||
CC = tcc
|
||||
CFLAGS = -1 -O -mh -I..\.. -Ddos -DXP_AWK_STAND_ALONE
|
||||
|
||||
all: $(OBJS)
|
||||
tlib $(OUT) @&&!
|
||||
+-$(**: = &^
|
||||
+-)
|
||||
!
|
||||
|
||||
clean:
|
||||
del $(OBJS) $(OUT) *.obj
|
||||
|
||||
.SUFFIXES: .c .obj
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: sa.c,v 1.18 2006-04-21 16:21:27 bacon Exp $
|
||||
* $Id: sa.c,v 1.19 2006-04-30 18:05:07 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk_i.h>
|
||||
@ -133,7 +133,9 @@ int xp_vsprintf (xp_char_t* buf, xp_size_t size, const xp_char_t* fmt, xp_va_lis
|
||||
xp_char_t* nf = __adjust_format (fmt);
|
||||
if (nf == XP_NULL) return -1;
|
||||
|
||||
#if defined(XP_CHAR_IS_MCHAR)
|
||||
#if defined(dos) || defined(__dos)
|
||||
n = vsprintf (buf, nf, ap); /* TODO: write your own vsnprintf */
|
||||
#elif defined(XP_CHAR_IS_MCHAR)
|
||||
n = vsnprintf (buf, size, nf, ap);
|
||||
#elif defined(_WIN32)
|
||||
n = _vsnwprintf (buf, size, nf, ap);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: val.h,v 1.21 2006-04-26 15:53:17 bacon Exp $
|
||||
* $Id: val.h,v 1.22 2006-04-30 18:05:07 bacon Exp $
|
||||
*/
|
||||
|
||||
#ifndef _XP_AWK_VAL_H_
|
||||
@ -27,14 +27,15 @@ typedef struct xp_awk_val_str_t xp_awk_val_str_t;
|
||||
typedef struct xp_awk_val_rex_t xp_awk_val_rex_t;
|
||||
typedef struct xp_awk_val_map_t xp_awk_val_map_t;
|
||||
|
||||
#if XP_SIZEOF_INT == 2
|
||||
#define XP_AWK_VAL_HDR \
|
||||
unsigned int type: 3; \
|
||||
unsigned int ref: 28
|
||||
/*
|
||||
unsigned int ref: 13
|
||||
#else
|
||||
#define XP_AWK_VAL_HDR \
|
||||
int type: 4; \
|
||||
int ref: 27
|
||||
*/
|
||||
unsigned int type: 3; \
|
||||
unsigned int ref: 29
|
||||
#endif
|
||||
|
||||
struct xp_awk_val_t
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: conf_dos.h,v 1.3 2006-04-30 17:35:37 bacon Exp $
|
||||
* $Id: conf_dos.h,v 1.4 2006-04-30 18:05:07 bacon Exp $
|
||||
*/
|
||||
|
||||
#if !defined(__LARGE__) && !defined(__HUGE__)
|
||||
@ -26,3 +26,5 @@
|
||||
#define XP_SIZEOF_FLOAT 4
|
||||
#define XP_SIZEOF_DOUBLE 8
|
||||
#define XP_SIZEOF_LONG_DOUBLE 10 /* turbo c 2.01 */
|
||||
|
||||
#define XP_CHAR_IS_MCHAR
|
||||
|
@ -1,11 +1,13 @@
|
||||
/*
|
||||
* $Id: awk.c,v 1.26 2006-04-22 13:54:53 bacon Exp $
|
||||
* $Id: awk.c,v 1.27 2006-04-30 18:05:07 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk.h>
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifdef XP_CHAR_IS_CHAR
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
|
||||
#ifdef __STAND_ALONE
|
||||
#define xp_printf xp_awk_printf
|
||||
|
17
ase/test/awk/makefile.tcc
Normal file
17
ase/test/awk/makefile.tcc
Normal file
@ -0,0 +1,17 @@
|
||||
CC = tcc
|
||||
CFLAGS = -1 -O -mh -I..\..\.. -Ddos -D__STAND_ALONE
|
||||
LDFLAGS = -L..\..\awk
|
||||
LIBS = xpawk.lib
|
||||
|
||||
all: awk
|
||||
|
||||
awk: awk.obj
|
||||
tcc $(LDFLAGS) -eawk.exe awk.obj $(LIBS)
|
||||
|
||||
clean:
|
||||
del $(OBJS) *.obj $(OUT)
|
||||
|
||||
.SUFFIXES: .c .obj
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) -c $<
|
||||
|
Loading…
Reference in New Issue
Block a user