X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dd3c39a7552f923174b524e7146e10ca7adf4cab..bf4e14adcab829c23f134253dea686789eb21d6a:/uip/aliasbr.c diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 069e4546..ab2130ef 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -1,6 +1,4 @@ - -/* - * aliasbr.c -- new aliasing mechanism +/* aliasbr.c -- new aliasing mechanism * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -132,6 +130,8 @@ akval (struct aka *ak, char *s) if (mp && mp->m_ingrp) { char *gname = add (mp->m_gname, NULL); + /* FIXME: gname must be true; add() never returns NULL. + * Is some other test required? */ if (gname && aleq (name, ak->ak_name)) { /* Will leak cp. */ cp = concat (gname, akresult (ak), NULL); @@ -163,7 +163,7 @@ aleq (char *string, char *aliasent) while ((c = *string++)) { if (*aliasent == '*') return 1; - if ((c | 040) != (*aliasent | 040)) + if (tolower((unsigned char)c) != tolower((unsigned char)*aliasent)) return 0; aliasent++; } @@ -182,7 +182,7 @@ alias (char *file) FILE *fp; if (*file != '/' - && !HasPrefix(file, "./") && !HasPrefix(file, "../")) + && !has_prefix(file, "./") && !has_prefix(file, "../")) file = etcpath (file); if ((fp = fopen (file, "r")) == NULL) { akerrst = file; @@ -202,7 +202,7 @@ alias (char *file) fclose (fp); return i; } - + /* FALLTHRU */ case ':': /* comment */ case ';': case '#':