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

This commit is contained in:
rlar 2017-03-31 19:03:40 +02:00
parent 4c44027cd2
commit 5238f0b1cb
2 changed files with 5 additions and 4 deletions

View File

@ -409,10 +409,10 @@ inp_stitch_continuation_lines(struct line *working)
* 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) {
@ -429,7 +429,7 @@ find_assignment(char *str)
continue;
}
return p;
return (char *) p;
}
return NULL;

View File

@ -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 FILE *inp_pathopen(char *name, char *mode);
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_reverse(struct line *head);