Browse Source

cleanup usage of `prompt()'

rlar 15 years ago
parent
commit
3d2272c699
  1. 6
      ChangeLog
  2. 2
      src/frontend/arg.c
  3. 5
      src/frontend/com_hardcopy.c

6
ChangeLog

@ -1,3 +1,9 @@
2011-07-17 Robert Larice
* src/frontend/arg.c ,
* src/frontend/com_hardcopy.c :
cleanup usage of `prompt()'
and get rid of an ancient hack
2011-07-17 Robert Larice
* src/frontend/com_fft.c ,
* src/frontend/inpcom.c :

2
src/frontend/arg.c

@ -28,7 +28,7 @@ char *prompt(FILE *fp)
size_t n;
if (!fgets(buf, sizeof(buf), fp))
return 0;
return NULL;
n = strlen(buf) - 1;
buf[n] = '\0'; /* fgets leaves the \n */
p = TMALLOC(char, n + 1);

5
src/frontend/com_hardcopy.c

@ -27,7 +27,6 @@
void
com_hardcopy(wordlist *wl)
{
char *buf2;
char *fname;
char buf[BSIZE_SP], device[BSIZE_SP];
bool tempf = FALSE;
@ -140,8 +139,10 @@ com_hardcopy(wordlist *wl)
if (!foundit) {
if (!wl) {
char *buf2;
outmenuprompt("which variable ? ");
if ((buf2 = prompt(cp_in)) == (char *) -1) /* XXXX Sick */
buf2 = prompt(cp_in);
if (!buf2)
return;
wl = TMALLOC(struct wordlist, 1);
wl->wl_word = buf2;

Loading…
Cancel
Save