X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ff2b7b715934b346b6121a2a434db116d3203663..4829d096feb337a55e2b866adb19acab9617b071:/uip/ali.c diff --git a/uip/ali.c b/uip/ali.c index 40ad1b8c..7a0106de 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -6,6 +6,14 @@ */ #include "h/mh.h" +#include "sbr/getarguments.h" +#include "sbr/smatch.h" +#include "sbr/getcpy.h" +#include "sbr/context_find.h" +#include "sbr/brkstring.h" +#include "sbr/ambigsw.h" +#include "sbr/print_version.h" +#include "sbr/print_help.h" #include "sbr/error.h" #include "h/addrsbr.h" #include "h/aliasbr.h" @@ -47,7 +55,7 @@ main (int argc, char **argv) { int i, vecp = 0; bool inverted, list, noalias; - char *cp, **ap, **argp, buf[BUFSIZ]; + char *cp, **argp, buf[BUFSIZ]; /* Really only need to allocate for argc-1, but must allocate at least 1, so go ahead and allocate for argc char pointers. */ char **vec = mh_xmalloc (argc * sizeof (char *)), **arguments; @@ -118,7 +126,7 @@ main (int argc, char **argv) if ((cp = context_find ("Aliasfile"))) { char *dp = NULL; - for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) + for (char *const *ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++) if ((i = alias (*ap)) != AK_OK) die("aliasing error in %s - %s", *ap, akerror (i)); free(dp);