diff --git a/ChangeLog b/ChangeLog index b9fb39dc3..70ef98089 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2009-12-22 Holger Vogt +2009-12-29 Holger Vogt + * ngproc2mod.c: patch by R. Larice + gnuplot.c filename arrays enlarged + +2009-12-28 Holger Vogt * measure.c: comments, /examples/control_structs/repeat3.sp: new examples snippets included diff --git a/src/frontend/plotting/gnuplot.c b/src/frontend/plotting/gnuplot.c index b3ee771fe..8785b85fe 100644 --- a/src/frontend/plotting/gnuplot.c +++ b/src/frontend/plotting/gnuplot.c @@ -32,8 +32,8 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab bool xlog, ylog, nogrid, markers; char buf[BSIZE_SP], pointstyle[BSIZE_SP], *text; - char filename_data[15]; - char filename_plt[15]; + char filename_data[128]; + char filename_plt[128]; sprintf(filename_data, "%s.data", filename); sprintf(filename_plt, "%s.plt", filename); @@ -111,7 +111,7 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab fprintf( file, "set ylabel \"%s\"\n", text ); tfree(text); } - if (nogrid) { + if (!nogrid) { fprintf( file, "set grid\n" ); } if (xlog) { @@ -142,8 +142,9 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab fprintf( file, "#set ytics 1\n" ); fprintf( file, "#set y2tics 1\n" ); + fprintf( file, "set style line 1 lw %d\n", linewidth ); + /* TODO - fprintf( file, "LineWidth: %d\n", linewidth ); if (plottype == PLOT_COMB) { fprintf( file, "BarGraph: True\n" ); fprintf( file, "NoLines: True\n" ); @@ -198,7 +199,7 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab (void) fclose( file_data ); #if defined(__MINGW32__) || defined(_MSC_VER) - (void) sprintf( buf, "wgnuplot -persist %s", filename_plt ); + (void) sprintf( buf, "wgnuplot -persistent %s", filename_plt ); #else (void) sprintf( buf, "gnuplot %s &", filename ); #endif diff --git a/src/ngproc2mod.c b/src/ngproc2mod.c index a49992cc8..d50d6c6eb 100644 --- a/src/ngproc2mod.c +++ b/src/ngproc2mod.c @@ -110,7 +110,7 @@ main(void) { ncur = (nmod *)tmalloc(sizeof(nmod)); ncur->nnext = NULL; ncur->nname = typeline; - *(typeline+3) = (char)NULL; + *(typeline+3) = '\0'; typeline += 4; getdata(ncur->nparms,69,3); ncur->nnext = nlist; @@ -119,7 +119,7 @@ main(void) { pcur = (pmod *)tmalloc(sizeof(pmod)); pcur->pnext = NULL; pcur->pname = typeline; - *(typeline+3) = (char)NULL; + *(typeline+3) = '\0'; typeline += 4; getdata(pcur->pparms,69,3); pcur->pnext = plist; @@ -128,7 +128,7 @@ main(void) { ycur = (ymod *)tmalloc(sizeof(ymod)); ycur->ynext = NULL; ycur->yname = typeline; - *(typeline+3) = (char)NULL; + *(typeline+3) = '\0'; typeline += 4; getdata(ycur->yparms,10,5); ycur->ynext = ylist; @@ -137,7 +137,7 @@ main(void) { dcur = (dmod *)tmalloc(sizeof(dmod)); dcur->dnext = NULL; dcur->dname = typeline; - *(typeline+3) = (char)NULL; + *(typeline+3) = '\0'; typeline += 4; getdata(dcur->dparms,10,5); dcur->dnext = dlist; @@ -146,7 +146,7 @@ main(void) { mcur = (mmod *)tmalloc(sizeof(mmod)); mcur->mnext = NULL; mcur->mname = typeline; - *(typeline+3) = (char)NULL; + *(typeline+3) = '\0'; typeline += 4; getdata(mcur->mparms,10,5); mcur->mnext = mlist;