diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-10-14 22:48:31 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-10-14 22:48:31 -0700 |
commit | 1c2b70d13c42f5461a2d7c3cae7adf8d9b2e3cea (patch) | |
tree | 01419813ecf753f84b16b85d5a6844b2a45ea572 /atobm.c | |
parent | 3fc1a649f1e81c4d93c6e00119267208877a8f02 (diff) |
Constify strings in atobm
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'atobm.c')
-rw-r--r-- | atobm.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -38,8 +38,8 @@ from The Open Group. static char *ProgramName; -static void doit(FILE *fp, char *filename, char *chars, - int xhot, int yhot, char *name); +static void doit(FILE *fp, const char *filename, const char *chars, + int xhot, int yhot, const char *name); static void usage (void) @@ -96,8 +96,8 @@ main (int argc, char *argv[]) int i; int xhot = -1, yhot = -1; char *filename = NULL; - char *chars = "-#"; - char *name = NULL; + const char *chars = "-#"; + const char *name = NULL; FILE *fp; ProgramName = argv[0]; @@ -152,8 +152,8 @@ main (int argc, char *argv[]) fp = stdin; } - if (!name) name = filename ? StripName (filename) : ""; - cify_name (name); + if (!name) + name = filename ? cify_name (StripName (filename)) : ""; doit (fp, filename, chars, xhot, yhot, name); if (filename) (void) fclose (fp); @@ -163,10 +163,10 @@ main (int argc, char *argv[]) static void doit (FILE *fp, - char *filename, - char *chars, + const char *filename, + const char *chars, int xhot, int yhot, - char *name) + const char *name) { int i, j; int last_character; |