version 1.1.1.1, 2000/01/09 17:00:55 |
version 1.1.1.3, 2003/09/15 07:09:26 |
Line 52 static char *RCSid = "$Id$"; |
|
Line 52 static char *RCSid = "$Id$"; |
|
/* get prototype for alloc and gpfaralloc */ |
/* get prototype for alloc and gpfaralloc */ |
#include "plot.h" |
#include "plot.h" |
|
|
#if defined(READLINE) && !defined(GNU_READLINE) |
#if defined(READLINE) && !defined(HAVE_LIBREADLINE) |
|
|
/* a small portable version of GNU's readline |
/* a small portable version of GNU's readline |
* this is not the BASH or GNU EMACS version of READLINE due to Copyleft |
* this is not the BASH or GNU EMACS version of READLINE due to Copyleft |
|
|
free(cur_line); |
free(cur_line); |
line_len = 0; |
line_len = 0; |
} |
} |
cur_line = gp_alloc((unsigned long) MAXBUF, "readline"); |
cur_line = gp_alloc(MAXBUF, "readline"); |
line_len = MAXBUF; |
line_len = MAXBUF; |
|
|
/* set the termio so we can do our own input processing */ |
/* set the termio so we can do our own input processing */ |
|
|
entry = entry->prev; |
entry = entry->prev; |
} /* end of not-storing duplicated entries */ |
} /* end of not-storing duplicated entries */ |
|
|
entry = (struct hist *) gp_alloc((unsigned long) sizeof(struct hist), "history"); |
entry = (struct hist *) gp_alloc(sizeof(struct hist), "history"); |
entry->line = gp_alloc((unsigned long) (strlen(line) + 1), "history"); |
entry->line = gp_alloc((strlen(line) + 1), "history"); |
strcpy(entry->line, line); |
strcpy(entry->line, line); |
|
|
entry->prev = history; |
entry->prev = history; |
Line 1101 static void reset_termio() |
|
Line 1101 static void reset_termio() |
|
} |
} |
|
|
|
|
#endif /* READLINE && not GNU_READLINE */ |
#endif /* READLINE && not HAVE_LIBREADLINE */ |