Browse Source

add const declaration to newfopen

pre-master-46
Holger Vogt 6 years ago
parent
commit
4ddcff55e7
  1. 2
      src/include/ngspice/ngspice.h
  2. 2
      src/misc/util.c

2
src/include/ngspice/ngspice.h

@ -221,7 +221,7 @@ extern double x_atanh(double);
#ifndef EXT_ASC #ifndef EXT_ASC
#if defined(__MINGW__) || defined(_MSC_VER) #if defined(__MINGW__) || defined(_MSC_VER)
#define fopen newfopen #define fopen newfopen
extern FILE *newfopen(char *fn, char* md);
extern FILE *newfopen(const char *fn, const char* md);
#endif #endif
#endif #endif

2
src/misc/util.c

@ -264,7 +264,7 @@ ngdirname(const char *name)
#undef BOOLEAN #undef BOOLEAN
#include <windows.h> #include <windows.h>
FILE * FILE *
newfopen(char *fn, char* md)
newfopen(const char *fn, const char* md)
{ {
if (fn == NULL) if (fn == NULL)
return NULL; return NULL;

Loading…
Cancel
Save