*** empty log message ***

This commit is contained in:
2006-10-12 04:17:58 +00:00
parent 03e914fa01
commit e94b5729ef
20 changed files with 389 additions and 320 deletions

View File

@ -13,4 +13,6 @@ BEGIN {
print "ARGV[" i "]", ARGV[i];
}
if (ARGC >= 0) print "ARGC is positive";
}

View File

@ -1,11 +1,12 @@
/*
* $Id: awk.c,v 1.94 2006-10-11 03:19:08 bacon Exp $
* $Id: awk.c,v 1.95 2006-10-12 04:17:58 bacon Exp $
*/
#include <xp/awk/awk.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <stdarg.h>
#ifdef XP_CHAR_IS_WCHAR
#include <wchar.h>
@ -21,6 +22,7 @@
#include <xp/bas/assert.h>
#include <xp/bas/locale.h>
#else
#include <xp/bas/stdio.h>
#include <limits.h>
#ifndef PATH_MAX
#define XP_PATH_MAX 4096
@ -86,6 +88,25 @@ static FILE* fopen_t (const xp_char_t* path, const xp_char_t* mode)
#endif
}
static int __dprintf (const xp_char_t* fmt, ...)
{
int n;
va_list ap;
#ifdef _WIN32
xp_char_t buf[1024];
#endif
va_start (ap, fmt);
#ifdef _WIN32
n = xp_vsprintf (buf, xp_countof(buf), fmt, ap);
MessageBox (NULL, buf, XP_T("ASSERTION FAILURE"), MB_OK | MB_ICONERROR);
#else
n = xp_vprintf (fmt, ap);
#endif
va_end (ap);
return n;
}
static FILE* popen_t (const xp_char_t* cmd, const xp_char_t* mode)
{
#ifdef _WIN32
@ -679,6 +700,8 @@ static int __main (int argc, xp_char_t* argv[])
syscas.memcpy = memcpy;
syscas.memset = memset;
syscas.sprintf = xp_sprintf;
syscas.dprintf = __dprintf;
syscas.abort = abort;
#ifdef _WIN32
syscas_data.heap = HeapCreate (0, 1000000, 1000000);

View File

@ -6,4 +6,3 @@ BEGIN {
print "NF=" NF;
for (i = 0; i < NF; i++) print i " [" $(i+1) "]";
}