misccoms.c, use strncasecmp()

This commit is contained in:
rlar 2012-05-17 19:16:30 +02:00
parent 5f3b453a30
commit 11878ee4ad
3 changed files with 3 additions and 6 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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 */