-/* $OpenBSD: aux.c,v 1.23 2008/07/15 19:23:26 martynas Exp $ */
+/* $OpenBSD: aux.c,v 1.24 2008/07/16 14:53:41 martynas Exp $ */
/* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */
/*
#if 0
static const char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: aux.c,v 1.23 2008/07/15 19:23:26 martynas Exp $";
+static const char rcsid[] = "$OpenBSD: aux.c,v 1.24 2008/07/16 14:53:41 martynas Exp $";
#endif
#endif /* not lint */
/* Copy as many bytes as will fit */
if (n != 0 && --n != 0) {
do {
- if (isupper(*s))
- *d++ = tolower(*s++);
- else if ((*d++ = *s++) == 0)
+ if ((*d++ = tolower(*s++)) == 0)
break;
} while (--n != 0);
}
break;
case ' ':
- if (cp[0] == 'a' && cp[1] == 't' && cp[2] == ' ')
+ if (strncmp(cp, "at ", 3) == 0)
cp += 3, *cp2++ = '@';
else
- if (cp[0] == '@' && cp[1] == ' ')
+ if (strncmp(cp, "@ ", 2) == 0)
cp += 2, *cp2++ = '@';
else
lastsp = 1;
-/* $OpenBSD: cmd3.c,v 1.20 2003/06/03 02:56:11 millert Exp $ */
+/* $OpenBSD: cmd3.c,v 1.21 2008/07/16 14:53:41 martynas Exp $ */
/* $NetBSD: cmd3.c,v 1.8 1997/07/09 05:29:49 mikel Exp $ */
/*
#if 0
static const char sccsid[] = "@(#)cmd3.c 8.2 (Berkeley) 4/20/95";
#else
-static const char rcsid[] = "$OpenBSD: cmd3.c,v 1.20 2003/06/03 02:56:11 millert Exp $";
+static const char rcsid[] = "$OpenBSD: cmd3.c,v 1.21 2008/07/16 14:53:41 martynas Exp $";
#endif
#endif /* not lint */
if (subj == NULL)
return(NULL);
- if ((subj[0] == 'r' || subj[0] == 'R') &&
- (subj[1] == 'e' || subj[1] == 'E') &&
- subj[2] == ':')
+ if (strncasecmp(subj, "re:", 3) == 0)
return(subj);
len = strlen(subj) + 5;
newsubj = salloc(len);
-/* $OpenBSD: collect.c,v 1.28 2007/09/10 14:29:53 tobias Exp $ */
+/* $OpenBSD: collect.c,v 1.29 2008/07/16 14:53:41 martynas Exp $ */
/* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */
/*
#if 0
static const char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94";
#else
-static const char rcsid[] = "$OpenBSD: collect.c,v 1.28 2007/09/10 14:29:53 tobias Exp $";
+static const char rcsid[] = "$OpenBSD: collect.c,v 1.29 2008/07/16 14:53:41 martynas Exp $";
#endif
#endif /* not lint */
}
msgvec[1] = NULL;
}
- if (f == 'f' || f == 'F')
+ if (tolower(f) == 'f')
tabst = NULL;
else if ((tabst = value("indentprefix")) == NULL)
tabst = "\t";
-/* $OpenBSD: head.c,v 1.9 2003/06/03 02:56:11 millert Exp $ */
+/* $OpenBSD: head.c,v 1.10 2008/07/16 14:53:41 martynas Exp $ */
/* $NetBSD: head.c,v 1.6 1996/12/28 07:11:03 tls Exp $ */
/*
#if 0
static const char sccsid[] = "@(#)head.c 8.2 (Berkeley) 4/20/95";
#else
-static const char rcsid[] = "$OpenBSD: head.c,v 1.9 2003/06/03 02:56:11 millert Exp $";
+static const char rcsid[] = "$OpenBSD: head.c,v 1.10 2008/07/16 14:53:41 martynas Exp $";
#endif
#endif /* not lint */
cp = nextword(cp, word);
if (*word)
hl->l_from = copyin(word, &sp);
- if (cp != NULL && cp[0] == 't' && cp[1] == 't' && cp[2] == 'y') {
+ if (cp != NULL && strncmp(cp, "tty", 3) == 0) {
cp = nextword(cp, word);
hl->l_tty = copyin(word, &sp);
}
-/* $OpenBSD: send.c,v 1.18 2007/03/20 21:01:08 millert Exp $ */
+/* $OpenBSD: send.c,v 1.19 2008/07/16 14:53:41 martynas Exp $ */
/* $NetBSD: send.c,v 1.6 1996/06/08 19:48:39 christos Exp $ */
/*
#if 0
static const char sccsid[] = "@(#)send.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: send.c,v 1.18 2007/03/20 21:01:08 millert Exp $";
+static const char rcsid[] = "$OpenBSD: send.c,v 1.19 2008/07/16 14:53:41 martynas Exp $";
#endif
#endif /* not lint */
*cp2 = 0; /* temporarily null terminate */
if (doign && isign(line, doign))
ignoring = 1;
- else if ((line[0] == 's' || line[0] == 'S') &&
- strcasecmp(line, "status") == 0) {
+ else if (strcasecmp(line, "status") == 0) {
/*
* If the field is "status," go compute
* and print the real Status: field