Don't fear more typing, as "cur" will soon be cut down to "c",
likewise the other predefined sequences.
if (first > mp->hghmsg
|| first < mp->lowmsg
|| !(does_exist(mp, first))) {
if (first > mp->hghmsg
|| first < mp->lowmsg
|| !(does_exist(mp, first))) {
- if (!strcmp(name, "cur") || !strcmp(name, "."))
+ if (!strcmp(name, "cur"))
advise(NULL, "no %s message", name);
else
advise(NULL, "message %d doesn't exist", first);
advise(NULL, "no %s message", name);
else
advise(NULL, "message %d doesn't exist", first);
static int
m_conv(struct msgs *mp, char *str, int call)
{
static int
m_conv(struct msgs *mp, char *str, int call)
{
#ifdef LOCALE
/* doesn't enforce lower case */
#ifdef LOCALE
/* doesn't enforce lower case */
- for (bp = buf; (isalpha(*cp) || *cp == '.')
- && (bp - buf < sizeof(buf) - 1); )
+ for (bp = buf; isalpha(*cp) && (bp - buf < sizeof(buf) - 1); )
- for (bp = buf; ((*cp >= 'a' && *cp <= 'z') || *cp == '.')
- && (bp - buf < sizeof(buf) - 1); )
+ for (bp = buf; islower(*cp) && (bp - buf < sizeof(buf) - 1); )
#endif /* LOCALE */
{
*bp++ = *cp++;
#endif /* LOCALE */
{
*bp++ = *cp++;
return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ? mp->hghmsg : BADMSG);
}
return (mp->hghmsg || !(mp->msgflags & ALLOW_NEW) ? mp->hghmsg : BADMSG);
}
- if (!strcmp(buf, "cur") || !strcmp(buf, "."))
+ if (!strcmp(buf, "cur"))
return (mp->curmsg > 0 ? mp->curmsg : BADMSG);
if (!strcmp(buf, "prev")) {
return (mp->curmsg > 0 ? mp->curmsg : BADMSG);
if (!strcmp(buf, "prev")) {