#include "spice.h"
#include "ftedefs.h"
#include "fteinp.h"
Go to the source code of this file.
bool inp_edit |
( |
char * |
filename | ) |
|
Definition at line 47 of file nutinp.c.
58 if (!(editor =
getenv(
"EDITOR"))) {
62 editor =
"/usr/ucb/vi";
65 (void) sprintf(buf,
"%s %s", editor, filename);
static char buf[MAXPROMPT]
bool cp_getvar(char *n, int t, char *r)
void inp_nutsource |
( |
FILE * |
fp, |
|
|
bool |
comfile, |
|
|
char * |
filename |
|
) |
| |
Definition at line 138 of file nutinp.c.
144 struct line *deck, *dd;
146 FILE *lastin, *lastout, *lasterr;
154 fprintf(
cp_err,
"Warning: no cards in deck...\n");
174 (commands && (*dd->
li_line ==
'#' ||
186 "Warning: redundant .control card\n");
198 "Warning: misplaced .endc card\n");
static struct ccom * commands
Definition at line 17 of file nutinp.c.
bool inp_edit(char *filename)
struct wordlist * wl_next
void ShowPrompt(char *str)
Definition at line 223 of file nutinp.c.
231 char *tempfile =
NULL, *fname;
238 for (; wl; wl = wn) {
242 if (!strchr(wl->
wl_word,
'n') &&
271 while ((i = fread(buf, 1,
BSIZE_SP, tp)) > 0)
272 (void) fwrite(buf, 1, i, fp);
276 (void) fseek(fp, (
long) 0, 0);
static char buf[MAXPROMPT]
void inp_nutsource(FILE *fp, bool comfile, char *filename)
struct wordlist * wl_prev
struct wordlist * wl_next