diff --git a/.gitignore b/.gitignore index 1279d5b..033ebd0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ fcpp *.o *~ +*.obj +*.exe diff --git a/cpp1.c b/cpp1.c index 77556b0..7a51d11 100644 --- a/cpp1.c +++ b/cpp1.c @@ -37,8 +37,11 @@ void __stdargs _XCEXIT(long a) { return; } FILE_LOCAL ReturnCode output(struct Global *, int); /* Output one character */ FILE_LOCAL void sharp(struct Global *); INLINE FILE_LOCAL ReturnCode cppmain(struct Global *); - +#ifdef _MSC_VER +int fppPreProcess(struct fppTag *tags) +#else int PREFIX fppPreProcess(REG(a0) struct fppTag *tags) +#endif { int i=0; ReturnCode ret; /* cpp return code */ diff --git a/fpp.h b/fpp.h index f772996..264df7a 100644 --- a/fpp.h +++ b/fpp.h @@ -156,4 +156,8 @@ struct fppTag { /* Switch on WWW-mode */ #define FPPTAG_WEBMODE 33 +#ifdef _MSC_VER +int fppPreProcess(struct fppTag *tags); +#else int PREFIX fppPreProcess(REG(a0) struct fppTag *); +#endif \ No newline at end of file diff --git a/usecpp.c b/usecpp.c index 3611ed2..8be0d70 100644 --- a/usecpp.c +++ b/usecpp.c @@ -117,6 +117,11 @@ struct Library *FPPBase=NULL; #define DEFAULT_CPP_PREFS_FILE "$HOME/cpp.prefs" #endif +#ifdef _MSC_VER +#define FILE_LOCAL static +#define PREFIX +#endif + FILE_LOCAL char PREFIX *own_input(char *, int, void *); FILE_LOCAL void PREFIX own_output(int, void *); FILE_LOCAL void PREFIX own_error(void *, char *, va_list); @@ -276,7 +281,7 @@ char GetPrefs(struct fppTag **tagptr, char **string) unsigned Length_U; char *PrefsBuffer_PC; char ret= 0; - char *environ; + char *Environ; *string = NULL; @@ -301,8 +306,8 @@ char GetPrefs(struct fppTag **tagptr, char **string) } } - if(environ = getenv("CPP_PREFS")) { - ret= !DoString(tagptr, environ); + if(Environ = getenv("CPP_PREFS")) { + ret= !DoString(tagptr, Environ); if(ret && *string) free( *string ); } diff --git a/wMakefile b/wMakefile new file mode 100644 index 0000000..da60381 --- /dev/null +++ b/wMakefile @@ -0,0 +1,20 @@ +TARGET =fcpp.exe +FLAG= /WX /utf-8 /MP + +SOURCES = \ + cpp1.c \ + cpp2.c \ + cpp3.c \ + cpp4.c \ + cpp5.c \ + cpp6.c \ + usecpp.c + + +all: $(TARGET) + +$(TARGET):$(SOURCES) + cl $(FLAG) /Fe$(TARGET) $(SOURCES) + +clean: + del *.exe & del *.obj