*** empty log message ***

This commit is contained in:
hyung-hwan 2006-04-19 02:52:53 +00:00
parent ec8c5a53de
commit 4a6dcb79f2
4 changed files with 52 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.c,v 1.24 2006-04-18 16:27:29 bacon Exp $
* $Id: awk.c,v 1.25 2006-04-19 02:52:53 bacon Exp $
*/
#include <xp/awk/awk.h>
@ -58,10 +58,6 @@ static xp_ssize_t process_source (
#include <mcheck.h>
#endif
#if defined(__STAND_ALONE) && defined(_WIN32)
#define xp_main _tmain
#endif
#if defined(__STAND_ALONE) && !defined(_WIN32)
int main (int argc, char* argv[])
#else
@ -83,7 +79,7 @@ int xp_main (int argc, xp_char_t* argv[])
if (xp_awk_attsrc(awk, process_source, XP_NULL) == -1)
{
xp_awk_close (awk);
xp_printf (XP_TEXT("error: cannot attach source\n"));
xp_printf (XP_TEXT("Error: cannot attach source\n"));
return -1;
}

View File

@ -2,8 +2,7 @@ CC = cl
#CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I..\..\..
CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I..\..\.. -D__STAND_ALONE
LDFLAGS = /libpath:..\..\bas /libpath:..\..\awk
LIBS = xpbas.lib xpawk.lib
#LIBS = xpawk.lib
LIBS = xpawk.lib
all: awk

25
ase/test/awk/t2.awk Normal file
View File

@ -0,0 +1,25 @@
global z, x;
function sum (i)
{
local k, y;
y = 0;
for (k = i; k; k = k - 1)
{
y = y + k;
}
return y;
y = 10;
return y;
}
BEGIN
{
x = sum (10000000);
//s = sum (100);
s = x;
ss = z;
}

24
ase/test/awk/t3.awk Normal file
View File

@ -0,0 +1,24 @@
global x, j;
func func1 (x)
{
c = x["abc"];
x["abc"] = 123;
}
BEGIN
{
idx="abc";
x[idx] = 12345;
i = x[idx];
func1 (x);
k = x[idx];
return j;
/*
x["abc"] = 12345;
i = x["abc"];
return j;
*/
}