options.c, cleanup inp_getoptsc()
This commit is contained in:
parent
6a0a6071a0
commit
ac336c9920
|
|
@ -161,27 +161,25 @@ inp_getopts(struct line *deck)
|
|||
}
|
||||
|
||||
|
||||
/* Extract the option lines from a comfile (spinit, .spiceinit) */
|
||||
/* copy the given option line,
|
||||
* (presumably from a comfile, e.g. spinit or .spiceinit)
|
||||
* substitute '.options' for 'option'
|
||||
* then put it in front of the given 'options' list */
|
||||
|
||||
struct line *
|
||||
inp_getoptsc(char *in_line, struct line *com_options)
|
||||
inp_getoptsc(char *line, struct line *options)
|
||||
{
|
||||
struct line *next = NULL;
|
||||
char *line;
|
||||
gettok_nc(&line); /* skip option */
|
||||
|
||||
/* option -> .options */
|
||||
/* skip option */
|
||||
gettok_nc(&in_line);
|
||||
line = tprintf(".options %s", in_line);
|
||||
struct line *next = TMALLOC(struct line, 1);
|
||||
|
||||
next = TMALLOC(struct line, 1);
|
||||
next->li_line = line;
|
||||
next->li_line = tprintf(".options %s", line);
|
||||
next->li_linenum = 0;
|
||||
next->li_error = NULL;
|
||||
next->li_actual = NULL;
|
||||
|
||||
/* put new line in front */
|
||||
if (com_options)
|
||||
next->li_next = com_options;
|
||||
next->li_next = options;
|
||||
|
||||
return next;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ extern bool ft_controldb;
|
|||
extern bool ft_asyncdb;
|
||||
extern char *ft_setkwords[];
|
||||
extern struct line *inp_getopts(struct line *deck);
|
||||
extern struct line *inp_getoptsc(char *in_line, struct line *com_options);
|
||||
extern struct line *inp_getoptsc(char *line, struct line *options);
|
||||
extern bool ft_ngdebug;
|
||||
extern bool ft_stricterror;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue