projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed minor typo in man page.
[mmh]
/
sbr
/
m_convert.c
diff --git
a/sbr/m_convert.c
b/sbr/m_convert.c
index
89da537
..
05533f6
100644
(file)
--- a/
sbr/m_convert.c
+++ b/
sbr/m_convert.c
@@
-185,7
+185,7
@@
single:
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);
@@
-231,9
+231,7
@@
single:
** first
** last
** cur
** first
** last
** cur
-** . (same as cur)
*/
*/
-
static int
m_conv(struct msgs *mp, char *str, int call)
{
static int
m_conv(struct msgs *mp, char *str, int call)
{
@@
-261,11
+259,9
@@
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); )
#else
#else
- 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++;
@@
-282,7
+278,7
@@
m_conv(struct msgs *mp, char *str, int call)
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")) {
@@
-335,11
+331,12
@@
attr(struct msgs *mp, char *cp)
/* hack for "cur-name", "cur-n", etc. */
if (!strcmp(cp, "cur"))
return 0;
/* hack for "cur-name", "cur-n", etc. */
if (!strcmp(cp, "cur"))
return 0;
- if (ssequal("cur:", cp)) /* this code need to be rewritten... */
+ if (isprefix("cur:", cp)) /* this code need to be rewritten... */
return 0;
/* Check for sequence negation */
return 0;
/* Check for sequence negation */
- if ((dp = context_find(nsequence)) && *dp != '\0' && ssequal(dp, cp)) {
+ if ((dp = context_find(nsequence)) && *dp != '\0' &&
+ isprefix(dp, cp)) {
inverted = 1;
cp += strlen(dp);
}
inverted = 1;
cp += strlen(dp);
}