version 1.1, 2000/01/09 17:00:55 |
version 1.1.1.3, 2003/09/15 07:09:26 |
Line 44 static char *RCSid = "$Id$"; |
|
Line 44 static char *RCSid = "$Id$"; |
|
#include "plot.h" |
#include "plot.h" |
#include "setshow.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 */ |
/* input data, parsing variables */ |
|
|
extern TBOOLEAN is_3d_plot; |
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 |
#ifndef TIMEFMT |
#define TIMEFMT "%d/%m/%y,%H:%M" |
#define TIMEFMT "%d/%m/%y,%H:%M" |
#endif |
#endif |
Line 141 do{if (datatype[axis]==TIME) { \ |
|
Line 127 do{if (datatype[axis]==TIME) { \ |
|
}\ |
}\ |
putc('"', stderr);\ |
putc('"', stderr);\ |
} else {\ |
} else {\ |
fprintf(stderr,"%g",x);\ |
fprintf(stderr,"%#g",x);\ |
}} while(0) |
}} while(0) |
|
|
|
|
|
|
c_token++; |
c_token++; |
} else if (almost_equals(c_token, "ve$rsion")) { |
} else if (almost_equals(c_token, "ve$rsion")) { |
show_version(stderr); |
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")) { |
} else if (almost_equals(c_token, "xr$ange")) { |
(void) putc('\n', stderr); |
(void) putc('\n', stderr); |
show_range(FIRST_X_AXIS, xmin, xmax, autoscale_x, "x"); |
show_range(FIRST_X_AXIS, xmin, xmax, autoscale_x, "x"); |
Line 1337 static void show_autoscale() |
|
Line 1318 static void show_autoscale() |
|
fprintf(stderr, "y: %s%s%s, ", (autoscale_y) ? "ON" : "OFF", |
fprintf(stderr, "y: %s%s%s, ", (autoscale_y) ? "ON" : "OFF", |
(autoscale_y == 1) ? " (min)" : "", |
(autoscale_y == 1) ? " (min)" : "", |
(autoscale_y == 2) ? " (max)" : ""); |
(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", |
fprintf(stderr, "z: %s%s%s\n", (autoscale_z) ? "ON" : "OFF", |
(autoscale_z == 1) ? " (min)" : "", |
(autoscale_z == 1) ? " (min)" : "", |
(autoscale_z == 2) ? " (max)" : ""); |
(autoscale_z == 2) ? " (max)" : ""); |
Line 1430 static void show_contour() |
|
Line 1417 static void show_contour() |
|
|
|
static void show_format() |
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\"\ |
fprintf(stderr, "\ttic format is x-axis: \"%s\"", conv_text(str, xformat)); |
, y-axis: \"%s\"\ |
fprintf(stderr, ", y-axis: \"%s\"", conv_text(str, yformat)); |
, z-axis: \"%s\"\ |
fprintf(stderr, ", z-axis: \"%s\"", conv_text(str, zformat)); |
, x2-axis: \"%s\"\ |
fprintf(stderr, ", x2-axis: \"%s\"", conv_text(str, x2format)); |
, y2-axis: \"%s\"\n", |
fprintf(stderr, ", y2-axis: \"%s\"\n", conv_text(str, y2format)); |
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)); |
|
} |
} |
|
|
#define SHOW_LOG(FLAG, BASE, TEXT) \ |
#define SHOW_LOG(FLAG, BASE, TEXT) \ |
|
|
} |
} |
fprintf(fp, "%s\n\ |
fprintf(fp, "%s\n\ |
%s\t%s\n\ |
%s\t%s\n\ |
%s\t%sversion %s\n\ |
%s\tVersion %s patchlevel %s\n\ |
%s\tpatchlevel %s\n\ |
|
%s\tlast modified %s\n\ |
%s\tlast modified %s\n\ |
|
%s\tSystem: %s %s\n\ |
%s\n\ |
%s\n\ |
%s\t%s\n\ |
%s\t%s\n\ |
%s\tThomas Williams, Colin Kelley and many others\n\ |
%s\tThomas Williams, Colin Kelley and many others\n\ |
%s\n\ |
%s\n\ |
%s\tType `help` to access the on-line reference manual\n\ |
%s\tType `help` to access the on-line reference manual\n\ |
%s\tThe gnuplot FAQ is available from\n\ |
%s\tThe gnuplot FAQ is available from\n\ |
%s\t\t<%s>\n\ |
%s\t%s\n\ |
%s\n\ |
%s\n\ |
%s\tSend comments and requests for help to <%s>\n\ |
%s\tSend comments and requests for help to <%s>\n\ |
%s\tSend bugs, suggestions and mods to <%s>\n\ |
%s\tSend bugs, suggestions and mods to <%s>\n\ |
%s\n", |
%s\n", |
p, /* empty line */ |
p, /* empty line */ |
p, PROGRAM, |
p, PROGRAM, |
p, OS, version, |
p, gnuplot_version, gnuplot_patchlevel, |
p, patchlevel, |
p, gnuplot_date, |
p, date, |
p, os_name, os_rel, |
p, /* empty line */ |
p, /* empty line */ |
p, gnuplot_copyright, |
p, gnuplot_copyright, |
p, /* authors */ |
p, /* authors */ |
|
|
p, help_email, |
p, help_email, |
p, bug_email, |
p, bug_email, |
p); /* empty line */ |
p); /* empty line */ |
|
|
|
c_token++; |
|
if (almost_equals(c_token, "l$ong")) { |
|
show_version_long(); |
|
c_token++; |
|
} |
} |
} |
|
|
void show_version_long() |
void show_version_long() |
{ |
{ |
char *helpfile = NULL; |
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); |
fputs("\nCompile options:\n", stderr); |
|
|
{ |
{ |
Line 1590 void show_version_long() |
|
Line 1557 void show_version_long() |
|
"-READLINE " |
"-READLINE " |
#endif |
#endif |
,gnu_rdline = |
,gnu_rdline = |
#ifdef GNU_READLINE |
#ifdef HAVE_LIBREADLINE |
"+GNU_READLINE " |
"+LIBREADLINE " |
#else |
#else |
"-GNU_READLINE " |
"-LIBREADLINE " |
#endif |
#endif |
,libgd = |
,libgd = |
#ifdef HAVE_LIBGD |
#ifdef HAVE_LIBGD |