=================================================================== RCS file: /home/cvs/OpenXM_contrib/gnuplot/Attic/show.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.1 -r1.1.1.3 --- OpenXM_contrib/gnuplot/Attic/show.c 2000/01/09 17:00:55 1.1.1.1 +++ OpenXM_contrib/gnuplot/Attic/show.c 2003/09/15 07:09:26 1.1.1.3 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: show.c,v 1.1.1.1 2000/01/09 17:00:55 maekawa Exp $"; +static char *RCSid = "$Id: show.c,v 1.1.1.3 2003/09/15 07:09:26 ohara Exp $"; #endif /* GNUPLOT - show.c */ @@ -44,24 +44,10 @@ static char *RCSid = "$Id: show.c,v 1.1.1.1 2000/01/09 #include "plot.h" #include "setshow.h" -#define DEF_FORMAT "%g" /* default format for tic mark labels */ -#define SIGNIF (0.01) /* less than one hundredth of a tic mark */ - - /* input data, parsing variables */ extern TBOOLEAN is_3d_plot; -/* From version.c, used in show_version () */ -extern char version[]; -extern char patchlevel[]; -extern char date[]; -extern char gnuplot_copyright[]; -extern char faq_location[]; -extern char bug_email[]; -extern char help_email[]; - - #ifndef TIMEFMT #define TIMEFMT "%d/%m/%y,%H:%M" #endif @@ -141,7 +127,7 @@ do{if (datatype[axis]==TIME) { \ }\ putc('"', stderr);\ } else {\ - fprintf(stderr,"%g",x);\ + fprintf(stderr,"%#g",x);\ }} while(0) @@ -536,11 +522,6 @@ static TBOOLEAN c_token++; } else if (almost_equals(c_token, "ve$rsion")) { show_version(stderr); - c_token++; - if (almost_equals(c_token, "l$ong")) { - show_version_long(); - c_token++; - } } else if (almost_equals(c_token, "xr$ange")) { (void) putc('\n', stderr); show_range(FIRST_X_AXIS, xmin, xmax, autoscale_x, "x"); @@ -1337,6 +1318,12 @@ static void show_autoscale() fprintf(stderr, "y: %s%s%s, ", (autoscale_y) ? "ON" : "OFF", (autoscale_y == 1) ? " (min)" : "", (autoscale_y == 2) ? " (max)" : ""); + fprintf(stderr, "x2: %s%s%s, ", (autoscale_x2) ? "ON" : "OFF", + (autoscale_x2 == 1) ? " (min)" : "", + (autoscale_x2 == 2) ? " (max)" : ""); + fprintf(stderr, "y2: %s%s%s, ", (autoscale_y2) ? "ON" : "OFF", + (autoscale_y2 == 1) ? " (min)" : "", + (autoscale_y2 == 2) ? " (max)" : ""); fprintf(stderr, "z: %s%s%s\n", (autoscale_z) ? "ON" : "OFF", (autoscale_z == 1) ? " (min)" : "", (autoscale_z == 2) ? " (max)" : ""); @@ -1430,18 +1417,13 @@ static void show_contour() static void show_format() { - char str[5][MAX_LINE_LEN + 1]; + char str[MAX_LINE_LEN+1]; - fprintf(stderr, "\ttic format is x-axis: \"%s\"\ -, y-axis: \"%s\"\ -, z-axis: \"%s\"\ -, x2-axis: \"%s\"\ -, y2-axis: \"%s\"\n", - conv_text(str[0], xformat), - conv_text(str[1], yformat), - conv_text(str[2], zformat), - conv_text(str[3], x2format), - conv_text(str[4], y2format)); + fprintf(stderr, "\ttic format is x-axis: \"%s\"", conv_text(str, xformat)); + fprintf(stderr, ", y-axis: \"%s\"", conv_text(str, yformat)); + fprintf(stderr, ", z-axis: \"%s\"", conv_text(str, zformat)); + fprintf(stderr, ", x2-axis: \"%s\"", conv_text(str, x2format)); + fprintf(stderr, ", y2-axis: \"%s\"\n", conv_text(str, y2format)); } #define SHOW_LOG(FLAG, BASE, TEXT) \ @@ -1517,25 +1499,25 @@ FILE *fp; } fprintf(fp, "%s\n\ %s\t%s\n\ -%s\t%sversion %s\n\ -%s\tpatchlevel %s\n\ +%s\tVersion %s patchlevel %s\n\ %s\tlast modified %s\n\ +%s\tSystem: %s %s\n\ %s\n\ %s\t%s\n\ %s\tThomas Williams, Colin Kelley and many others\n\ %s\n\ %s\tType `help` to access the on-line reference manual\n\ %s\tThe gnuplot FAQ is available from\n\ -%s\t\t<%s>\n\ +%s\t%s\n\ %s\n\ %s\tSend comments and requests for help to <%s>\n\ %s\tSend bugs, suggestions and mods to <%s>\n\ %s\n", p, /* empty line */ p, PROGRAM, - p, OS, version, - p, patchlevel, - p, date, + p, gnuplot_version, gnuplot_patchlevel, + p, gnuplot_date, + p, os_name, os_rel, p, /* empty line */ p, gnuplot_copyright, p, /* authors */ @@ -1547,33 +1529,18 @@ FILE *fp; p, help_email, p, bug_email, p); /* empty line */ + + c_token++; + if (almost_equals(c_token, "l$ong")) { + show_version_long(); + c_token++; + } } void show_version_long() { char *helpfile = NULL; -#ifdef HAVE_SYS_UTSNAME_H - struct utsname uts; - /* something is fundamentally wrong if this fails ... */ - if (uname(&uts) > -1) { -# ifdef _AIX - fprintf(stderr, "\nSystem: %s %s.%s", uts.sysname, uts.version, uts.release); -# elif defined (SCO) - fprintf(stderr, "\nSystem: SCO %s", uts.release); -# else - fprintf(stderr, "\nSystem: %s %s", uts.sysname, uts.release); -# endif - } else { - fprintf(stderr, "\n%s\n", OS); - } - -#else /* ! HAVE_SYS_UTSNAME_H */ - - fprintf(stderr, "\n%s\n", OS); - -#endif /* HAVE_SYS_UTSNAME_H */ - fputs("\nCompile options:\n", stderr); { @@ -1590,10 +1557,10 @@ void show_version_long() "-READLINE " #endif ,gnu_rdline = -#ifdef GNU_READLINE - "+GNU_READLINE " +#ifdef HAVE_LIBREADLINE + "+LIBREADLINE " #else - "-GNU_READLINE " + "-LIBREADLINE " #endif ,libgd = #ifdef HAVE_LIBGD