Browse Source

undo the previous commits dealing with snprintf,

use the C99 compliant function also with MS Visual Studio
pre-master-46
Holger Vogt 8 years ago
parent
commit
417dbfef72
  1. 2
      src/frontend/plotting/grid.c
  2. 2
      src/include/ngspice/graph.h
  3. 1
      src/include/ngspice/ngspice.h

2
src/frontend/plotting/grid.c

@ -527,7 +527,7 @@ drawlingrid(GRAPH *graph, char *units, int spacing, int nsp, double dst, double
if (j == 0)
SetLinestyle(1);
snprintf(buf, sizeof(buf) - 1, "%.*f", digits + 1, m * mag / 100.0);
snprintf(buf, sizeof(buf), "%.*f", digits + 1, m * mag / 100.0);
if (axis == x_axis)
DevDrawText(buf, graph->viewportxoff + i -

2
src/include/ngspice/graph.h

@ -17,7 +17,7 @@ Author: 1988 Jeffrey M. Hsu
struct _keyed;
#define GRAPH_UNITS_LENGTH 21
#define GRAPH_UNITS_LENGTH 20
/* Device-independent data structure for plots. */

1
src/include/ngspice/ngspice.h

@ -190,7 +190,6 @@ extern double x_atanh(double);
#define write _write
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define snprintf _snprintf
#define isatty _isatty
#define inline __inline
#define popen _popen

Loading…
Cancel
Save