version 1.3, 2014/07/19 23:50:38 |
version 1.4, 2014/07/20 06:39:41 |
|
|
#include <ctype.h> |
#include <ctype.h> |
#include "telnet_locl.h" |
#include "telnet_locl.h" |
|
|
#define LOWER(x) (isupper((int)x) ? tolower((int)x) : (x)) |
|
/* |
/* |
* The prefix function returns 0 if *s1 is not a prefix |
* The prefix function returns 0 if *s1 is not a prefix |
* of *s2. If *s1 exactly matches *s2, the negative of |
* of *s2. If *s1 exactly matches *s2, the negative of |
|
|
os1 = s1; |
os1 = s1; |
c1 = *s1; |
c1 = *s1; |
c2 = *s2; |
c2 = *s2; |
while (LOWER(c1) == LOWER(c2)) { |
while (tolower((unsigned char)c1) == tolower((unsigned char)c2)) { |
if (c1 == '\0') |
if (c1 == '\0') |
break; |
break; |
c1 = *++s1; |
c1 = *++s1; |