version 1.1.1.1, 2000/01/09 17:00:49 |
version 1.1.1.3, 2003/09/15 07:09:24 |
|
|
(void) fputs("!\n", stderr); /* why do we need this ? */ |
(void) fputs("!\n", stderr); /* why do we need this ? */ |
return (0); |
return (0); |
} |
} |
num_tokens = scanner(input_line); |
num_tokens = scanner(&input_line, &input_line_len); |
c_token = 0; |
c_token = 0; |
while (c_token < num_tokens) { |
while (c_token < num_tokens) { |
if (command()) |
if (command()) |
Line 334 static int command() |
|
Line 334 static int command() |
|
gstrptime(string, format, &tm); |
gstrptime(string, format, &tm); |
secs = gtimegm(&tm); |
secs = gtimegm(&tm); |
fprintf(stderr, "internal = %f - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", |
fprintf(stderr, "internal = %f - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", |
secs, tm.tm_mday, tm.tm_mon + 1, tm.tm_year, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); |
secs, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); |
memset(&tm, 0, sizeof(tm)); |
memset(&tm, 0, sizeof(tm)); |
ggmtime(&tm, secs); |
ggmtime(&tm, secs); |
gstrftime(string, 159, format, secs); |
gstrftime(string, 159, format, secs); |
fprintf(stderr, "convert back \"%s\" - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", |
fprintf(stderr, "convert back \"%s\" - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", |
string, tm.tm_mday, tm.tm_mon + 1, tm.tm_year, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); |
string, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); |
} |
} |
} |
} |
} else if (almost_equals(c_token, "test")) { |
} else if (almost_equals(c_token, "test")) { |
Line 728 void replotrequest() |
|
Line 728 void replotrequest() |
|
plot_token = 0; /* whole line to be saved as replot line */ |
plot_token = 0; /* whole line to be saved as replot line */ |
|
|
screen_ok = FALSE; |
screen_ok = FALSE; |
num_tokens = scanner(input_line); |
num_tokens = scanner(&input_line, &input_line_len); |
c_token = 1; /* skip the 'plot' part */ |
c_token = 1; /* skip the 'plot' part */ |
if (is_3d_plot) |
if (is_3d_plot) |
plot3drequest(); |
plot3drequest(); |
|
|
/* huge static variables (1k each). Instead we dynamically allocate them */ |
/* huge static variables (1k each). Instead we dynamically allocate them */ |
/* on the first call to this function... */ |
/* on the first call to this function... */ |
if (helpbuf == NULL) { |
if (helpbuf == NULL) { |
helpbuf = gp_alloc((unsigned long) MAX_LINE_LEN, "help buffer"); |
helpbuf = gp_alloc(MAX_LINE_LEN, "help buffer"); |
prompt = gp_alloc((unsigned long) MAX_LINE_LEN, "help prompt"); |
prompt = gp_alloc(MAX_LINE_LEN, "help prompt"); |
helpbuf[0] = prompt[0] = 0; |
helpbuf[0] = prompt[0] = 0; |
} |
} |
if (toplevel) |
if (toplevel) |
|
|
else |
else |
(void) strcpy(prompt, "Help topic: "); |
(void) strcpy(prompt, "Help topic: "); |
read_line(prompt); |
read_line(prompt); |
num_tokens = scanner(input_line); |
num_tokens = scanner(&input_line, &input_line_len); |
c_token = 0; |
c_token = 0; |
more_help = !(END_OF_COMMAND); |
more_help = !(END_OF_COMMAND); |
if (more_help) |
if (more_help) |
|
|
# endif /* AMIGA_AC_5 */ |
# endif /* AMIGA_AC_5 */ |
|
|
|
|
# if defined(READLINE) || defined(GNU_READLINE) |
# if defined(READLINE) || defined(HAVE_LIBREADLINE) |
/* keep some compilers happy */ |
/* keep some compilers happy */ |
static char *rlgets __PROTO((char *s, int n, char *prompt)); |
static char *rlgets __PROTO((char *s, int n, char *prompt)); |
|
|
|
|
} |
} |
return NULL; |
return NULL; |
} |
} |
# endif /* READLINE || GNU_READLINE */ |
# endif /* READLINE || HAVE_LIBREADLINE */ |
|
|
|
|
# if defined(MSDOS) || defined(_Windows) || defined(DOS386) |
# if defined(MSDOS) || defined(_Windows) || defined(DOS386) |
Line 1224 static void do_shell() |
|
Line 1224 static void do_shell() |
|
|
|
/* read from stdin, everything except VMS */ |
/* read from stdin, everything except VMS */ |
|
|
# if !defined(READLINE) && !defined(GNU_READLINE) |
# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) |
# if (defined(MSDOS) || defined(DOS386)) && !defined(_Windows) && !defined(__EMX__) && !defined(DJGPP) |
# if (defined(MSDOS) || defined(DOS386)) && !defined(_Windows) && !defined(__EMX__) && !defined(DJGPP) |
|
|
/* if interactive use console IO so CED will work */ |
/* if interactive use console IO so CED will work */ |
|
|
# define GET_STRING(s,l) fgets(s, l, stdin) |
# define GET_STRING(s,l) fgets(s, l, stdin) |
|
|
# endif /* !plain DOS */ |
# endif /* !plain DOS */ |
# endif /* !READLINE && !GNU_READLINE) */ |
# endif /* !READLINE && !HAVE_LIBREADLINE) */ |
|
|
/* Non-VMS version */ |
/* Non-VMS version */ |
static int read_line(prompt) |
static int read_line(prompt) |
|
|
TBOOLEAN more = FALSE; |
TBOOLEAN more = FALSE; |
int last = 0; |
int last = 0; |
|
|
# if !defined(READLINE) && !defined(GNU_READLINE) |
# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) |
if (interactive) |
if (interactive) |
PUT_STRING(prompt); |
PUT_STRING(prompt); |
# endif /* READLINE */ |
# endif /* READLINE */ |
do { |
do { |
/* grab some input */ |
/* grab some input */ |
# if defined(READLINE) || defined(GNU_READLINE) |
# if defined(READLINE) || defined(HAVE_LIBREADLINE) |
if (((interactive) |
if (((interactive) |
? rlgets(&(input_line[start]), input_line_len - start, |
? rlgets(&(input_line[start]), input_line_len - start, |
((more) ? "> " : prompt)) |
((more) ? "> " : prompt)) |
: fgets(&(input_line[start]), input_line_len - start, stdin)) |
: fgets(&(input_line[start]), input_line_len - start, stdin)) |
== (char *) NULL) { |
== (char *) NULL) { |
# else /* !(READLINE || GNU_READLINE) */ |
# else /* !(READLINE || HAVE_LIBREADLINE) */ |
if (GET_STRING(&(input_line[start]), input_line_len - start) |
if (GET_STRING(&(input_line[start]), input_line_len - start) |
== (char *) NULL) { |
== (char *) NULL) { |
# endif /* !(READLINE || GNU_READLINE) */ |
# endif /* !(READLINE || HAVE_LIBREADLINE) */ |
/* end-of-file */ |
/* end-of-file */ |
if (interactive) |
if (interactive) |
(void) putc('\n', stderr); |
(void) putc('\n', stderr); |
|
|
} else |
} else |
more = FALSE; |
more = FALSE; |
} |
} |
# if !defined(READLINE) && !defined(GNU_READLINE) |
# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) |
if (more && interactive) |
if (more && interactive) |
PUT_STRING("> "); |
PUT_STRING("> "); |
# endif |
# endif |