Browse Source

prevent non-English characters (e.g. Umlaute),

which gtkwave does not understand
pre-master-46
Holger Vogt 6 years ago
parent
commit
96976ee49d
  1. 8
      src/xspice/evt/evtprint.c

8
src/xspice/evt/evtprint.c

@ -54,6 +54,7 @@ NON-STANDARD FEATURES
#include "ngspice/evtproto.h"
#include <time.h>
#include <locale.h>
static int get_index(char *node_name);
@ -573,6 +574,10 @@ EVTprintvcd(wordlist *wl)
out_init();
/* for gtkwave, avoid e.g. German Umlaute */
setlocale(LC_TIME, "en_US");
/* get actual time */
time_t ltime;
char datebuff[80];
@ -585,6 +590,9 @@ EVTprintvcd(wordlist *wl)
strftime(datebuff, sizeof(datebuff), "%B %d, %Y %H:%M:%S", my_time);
out_printf("$date %s $end\n", datebuff);
/* return to what it was before */
setlocale(LC_TIME, "");
out_printf("$version %s %s $end\n", ft_sim->simulator, ft_sim->version);
/* get the sim time resolution based on tstep */

Loading…
Cancel
Save