*** empty log message ***
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.c,v 1.29 2006-05-06 16:05:12 bacon Exp $
|
||||
* $Id: awk.c,v 1.30 2006-05-12 09:39:20 bacon Exp $
|
||||
*/
|
||||
|
||||
#include <xp/awk/awk.h>
|
||||
@ -21,6 +21,15 @@
|
||||
extern int xp_awk_strcmp (const xp_char_t* s1, const xp_char_t* s2);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && defined(__STAND_ALONE) && defined(_DEBUG)
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux) && !defined(NDEBUG)
|
||||
#include <mcheck.h>
|
||||
#endif
|
||||
|
||||
static xp_ssize_t process_source (
|
||||
int cmd, void* arg, xp_char_t* data, xp_size_t size)
|
||||
{
|
||||
@ -102,22 +111,15 @@ static xp_ssize_t process_data (
|
||||
|
||||
}
|
||||
|
||||
#ifdef __linux
|
||||
#include <mcheck.h>
|
||||
#endif
|
||||
|
||||
#if defined(__STAND_ALONE) && !defined(_WIN32)
|
||||
int main (int argc, char* argv[])
|
||||
static int __main (int argc, char* argv[])
|
||||
#else
|
||||
int xp_main (int argc, xp_char_t* argv[])
|
||||
static int __main (int argc, xp_char_t* argv[])
|
||||
#endif
|
||||
{
|
||||
xp_awk_t* awk;
|
||||
struct data_io data_io = { "awk.in", NULL };
|
||||
|
||||
#ifdef __linux
|
||||
mtrace ();
|
||||
#endif
|
||||
if ((awk = xp_awk_open()) == XP_NULL)
|
||||
{
|
||||
xp_printf (XP_T("Error: cannot open awk\n"));
|
||||
@ -178,9 +180,28 @@ int xp_main (int argc, xp_char_t* argv[])
|
||||
}
|
||||
|
||||
xp_awk_close (awk);
|
||||
|
||||
#ifdef __linux
|
||||
muntrace ();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__STAND_ALONE) && !defined(_WIN32)
|
||||
int main (int argc, char* argv[])
|
||||
#else
|
||||
int xp_main (int argc, xp_char_t* argv[])
|
||||
#endif
|
||||
{
|
||||
int n;
|
||||
#if defined(__linux) && !defined(NDEBUG)
|
||||
mtrace ();
|
||||
#endif
|
||||
|
||||
n = __main (argc, argv);
|
||||
|
||||
#if defined(__linux) && !defined(NDEBUG)
|
||||
muntrace ();
|
||||
#endif
|
||||
#if defined(_WIN32) && defined(__STAND_ALONE) && defined(_DEBUG)
|
||||
_CrtDumpMemoryLeaks ();
|
||||
#endif
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "__STAND_ALONE" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@ -50,7 +50,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 xpawk.lib /nologo /subsystem:console /machine:I386 /out:"Release/awk.exe" /libpath:"..\..\bas" /libpath:"..\..\awk\release"
|
||||
# ADD LINK32 xpawk.lib /nologo /subsystem:console /machine:I386 /out:"Release/awk.exe" /libpath:"..\..\awk\release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "xptestawk - Win32 Debug"
|
||||
|
||||
@ -66,7 +66,7 @@ LINK32=link.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "__STAND_ALONE" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@ -74,7 +74,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 xpawk.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/awk.exe" /pdbtype:sept /libpath:"..\..\bas" /libpath:"..\..\awk\debug"
|
||||
# ADD LINK32 xpawk.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/awk.exe" /pdbtype:sept /libpath:"..\..\awk\debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
Reference in New Issue
Block a user