diff --git a/src/frontend/help/readhelp.c b/src/frontend/help/readhelp.c index c29ef7c9f..c9af59c91 100644 --- a/src/frontend/help/readhelp.c +++ b/src/frontend/help/readhelp.c @@ -17,10 +17,6 @@ Modified 1999 Emmanuel Rouat #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" -#if defined (_MSC_VER) -#define strncasecmp _strnicmp -#endif - static char *getsubject(fplace *place); static toplink *getsubtoplink(char **ss); diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index 992cee16e..ae962b4b7 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -183,7 +183,7 @@ com_version(wordlist *wl) s = wl_flatten(wl); - if (!strncmp(s, "-s", 2) || !strncmp(s, "-S", 2) ) { + if (!strncasecmp(s, "-s", 2)) { fprintf(cp_out, "******\n"); fprintf(cp_out, "** %s-%s\n", ft_sim->simulator, @@ -195,7 +195,7 @@ com_version(wordlist *wl) fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date); fprintf(cp_out, "******\n"); - } else if (!strncmp(s, "-f", 2) || !strncmp(s, "-F", 2) ) { + } else if (!strncasecmp(s, "-f", 2)) { fprintf(cp_out, "******\n"); diff --git a/src/include/ngspice/ngspice.h b/src/include/ngspice/ngspice.h index c51166f24..66060838d 100644 --- a/src/include/ngspice/ngspice.h +++ b/src/include/ngspice/ngspice.h @@ -171,6 +171,7 @@ #define open _open #define write _write #define strcasecmp _stricmp +#define strncasecmp _strnicmp #define snprintf _snprintf #define inline __inline /* NAN not available in MS VS 2008 */