From da38175e21b41fc5d159ace6a21957eecff4bfdd Mon Sep 17 00:00:00 2001 From: h_vogt Date: Wed, 15 May 2013 21:10:39 +0200 Subject: [PATCH] defines.f, winmain.c, .h: enable --with-wingui for CYGWIN --- src/include/ngspice/defines.h | 2 +- src/winmain.c | 5 +++-- src/winmain.h | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/include/ngspice/defines.h b/src/include/ngspice/defines.h index 98663e245..99c28c302 100644 --- a/src/include/ngspice/defines.h +++ b/src/include/ngspice/defines.h @@ -74,7 +74,7 @@ /* Alternate initialisation file name */ #define ALT_INITSTR "spice.rc" -#if defined(__MINGW32__) || defined(_MSC_VER) +#if defined(__MINGW32__) || defined(_MSC_VER) || defined (HAS_WINGUI) #define DIR_PATHSEP "\\" #define DIR_TERM '\\' #define DIR_PATHSEP_LINUX "/" diff --git a/src/winmain.c b/src/winmain.c index cf36fdbf8..5fe1d01b9 100644 --- a/src/winmain.c +++ b/src/winmain.c @@ -1384,8 +1384,9 @@ int system( const char * command) } // system Windows95 #endif */ +#ifdef __CYGWIN__ /* Strip leading spaces, return a copy of s */ -/*static char* rlead(char *s) +static char* rlead(char *s) { int i,j=0; static char temp[512]; @@ -1406,7 +1407,7 @@ int system( const char * command) temp[j] = '\0'; return copy(temp); } -*/ +#endif void winmessage(char* new_msg) { diff --git a/src/winmain.h b/src/winmain.h index fc4944b7a..657a3c41d 100644 --- a/src/winmain.h +++ b/src/winmain.h @@ -5,7 +5,9 @@ /* Forward definition of main() */ int xmain( int argc, char * argv[]); /* forward of Update function */ -//static char* rlead(char*); +#ifdef __CYGWIN__ +static char* rlead(char*); +#endif void winmessage(char*); static void HistoryInit(void);