Browse Source

inpcom.c, find_assignment(), const'ify and declare extern

pre-master-46
rlar 9 years ago
parent
commit
5238f0b1cb
  1. 8
      src/frontend/inpcom.c
  2. 1
      src/include/ngspice/fteext.h

8
src/frontend/inpcom.c

@ -409,10 +409,10 @@ inp_stitch_continuation_lines(struct line *working)
* take care of `!=' `<=' `==' and `>=' * take care of `!=' `<=' `==' and `>='
*/ */
static char *
find_assignment(char *str)
char *
find_assignment(const char *str)
{ {
char *p = str;
const char *p = str;
while ((p = strchr(p, '=')) != NULL) { while ((p = strchr(p, '=')) != NULL) {
@ -429,7 +429,7 @@ find_assignment(char *str)
continue; continue;
} }
return p;
return (char *) p;
} }
return NULL; return NULL;

1
src/include/ngspice/fteext.h

@ -215,6 +215,7 @@ extern void inp_list(FILE *file, struct line *deck, struct line *extras, int typ
extern struct line *inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile, bool *expr_w_temper); extern struct line *inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile, bool *expr_w_temper);
extern FILE *inp_pathopen(char *name, char *mode); extern FILE *inp_pathopen(char *name, char *mode);
extern char *search_identifier(char *str, const char *identifier, char *str_begin); extern char *search_identifier(char *str, const char *identifier, char *str_begin);
extern char *find_assignment(const char *s);
extern struct line *line_nconc(struct line *head, struct line *rest); extern struct line *line_nconc(struct line *head, struct line *rest);
extern struct line *line_reverse(struct line *head); extern struct line *line_reverse(struct line *head);

Loading…
Cancel
Save