X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/13f84dd50ca5754391dbd3296a5c7425f9363600..28ec221002d755d33c41fa4b5d9673eee0abef9d:/sbr/seq_nameok.c diff --git a/sbr/seq_nameok.c b/sbr/seq_nameok.c index 678ab5b5..6d219c52 100644 --- a/sbr/seq_nameok.c +++ b/sbr/seq_nameok.c @@ -1,8 +1,4 @@ - -/* - * seq_nameok.c -- check if a sequence name is ok - * - * $Id$ +/* seq_nameok.c -- check if a sequence name is ok * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -13,12 +9,12 @@ int -seq_nameok (unsigned char *s) +seq_nameok (char *s) { - unsigned char *pp; + char *pp; if (s == NULL || *s == '\0') { - advise (NULL, "empty sequence name"); + inform("empty sequence name"); return 0; } @@ -32,7 +28,7 @@ seq_nameok (unsigned char *s) strcmp (s, "last") && strcmp (s, "prev") && strcmp (s, "next"))) { - advise (NULL, "illegal sequence name: %s", s); + inform("illegal sequence name: %s", s); return 0; } @@ -40,8 +36,8 @@ seq_nameok (unsigned char *s) * First character in a sequence name must be * an alphabetic character ... */ - if (!isalpha (*s)) { - advise (NULL, "illegal sequence name: %s", s); + if (!isalpha ((unsigned char) *s)) { + inform("illegal sequence name: %s", s); return 0; } @@ -49,8 +45,8 @@ seq_nameok (unsigned char *s) * and can be followed by zero or more alphanumeric characters */ for (pp = s + 1; *pp; pp++) - if (!isalnum (*pp)) { - advise (NULL, "illegal sequence name: %s", s); + if (!isalnum ((unsigned char) *pp)) { + inform("illegal sequence name: %s", s); return 0; }