diff --git a/utils/strdup.c b/utils/strdup.c index e1087081..b8736c61 100644 --- a/utils/strdup.c +++ b/utils/strdup.c @@ -53,7 +53,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ char * StrDup(oldstr, str) char **oldstr; - char *str; + const char *str; { char *newstr; @@ -90,7 +90,7 @@ StrDup(oldstr, str) bool StrIsWhite(line, commentok) - char *line; + const char *line; bool commentok; /* TRUE means # comments are considered all-white */ { if ( (*line == '#') && commentok) @@ -123,7 +123,7 @@ StrIsWhite(line, commentok) bool StrIsInt(s) - char *s; + const char *s; { if (*s == '-' || *s == '+') s++; while (*s) @@ -152,7 +152,7 @@ StrIsInt(s) bool StrIsNumeric(s) - char *s; + const char *s; { double result; char *endptr; diff --git a/utils/utils.h b/utils/utils.h index 8aa92967..18af461f 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -50,12 +50,12 @@ extern int PaExpand(char **, char **, int); extern char *nextName(); extern FILE *PaOpen(char *, char *, char *, char *, char *, char **); extern FILE *PaLockOpen(char *, char *, char *, char *, char *, char **, bool *, int *); -extern char *StrDup(char **, char *); +extern char *StrDup(char **, const char *); extern int Match(); extern char *ArgStr(); -extern bool StrIsWhite(char *, bool); -extern bool StrIsInt(char *); -extern bool StrIsNumeric(char *); +extern bool StrIsWhite(const char *, bool); +extern bool StrIsInt(const char *); +extern bool StrIsNumeric(const char *); /* C99 compat */ extern void PaAppend(char **, char *);