#include "main.h"
Go to the source code of this file.
Functions | |
int | _rfc_casecmp (const char *s1, const char *s2) |
int | _rfc_ncasecmp (const char *str1, const char *str2, int n) |
int | _rfc_tolower (int c) |
int | _rfc_toupper (int c) |
Variables | |
unsigned char | rfc_tolowertab [] |
unsigned char | rfc_touppertab [] |
int _rfc_casecmp | ( | const char * | s1, | |
const char * | s2 | |||
) | [read] |
Definition at line 30 of file rfc1459.c.
References rfc_toupper.
00031 { 00032 register unsigned char *str1 = (unsigned char *) s1; 00033 register unsigned char *str2 = (unsigned char *) s2; 00034 register int res; 00035 00036 while (!(res = rfc_toupper(*str1) - rfc_toupper(*str2))) { 00037 if (*str1 == '\0') 00038 return 0; 00039 str1++; 00040 str2++; 00041 } 00042 return res; 00043 }
int _rfc_ncasecmp | ( | const char * | str1, | |
const char * | str2, | |||
int | n | |||
) |
Definition at line 45 of file rfc1459.c.
References rfc_toupper.
00046 { 00047 register unsigned char *s1 = (unsigned char *) str1; 00048 register unsigned char *s2 = (unsigned char *) str2; 00049 register int res; 00050 00051 while (!(res = rfc_toupper(*s1) - rfc_toupper(*s2))) { 00052 s1++; 00053 s2++; 00054 n--; 00055 if (!n || (*s1 == '\0' && *s2 == '\0')) 00056 return 0; 00057 } 00058 return res; 00059 }
int _rfc_tolower | ( | int | c | ) |
Definition at line 64 of file rfc1459.c.
References char, and rfc_tolowertab.
00065 { 00066 return rfc_tolowertab[(unsigned char) (c)]; 00067 }
int _rfc_toupper | ( | int | c | ) |
Definition at line 69 of file rfc1459.c.
References char, and rfc_touppertab.
00070 { 00071 return rfc_touppertab[(unsigned char) (c)]; 00072 }
unsigned char rfc_tolowertab |
Definition at line 61 of file rfc1459.c.
Referenced by _rfc_tolower().
unsigned char rfc_touppertab |
Definition at line 62 of file rfc1459.c.
Referenced by _rfc_toupper().