]> jfr.im git - solanum.git/commitdiff
Convert 2.8 style ToUpper/ToLower names to irctoupper/irctolower
authorElizabeth Myers <redacted>
Tue, 8 Mar 2016 01:04:24 +0000 (19:04 -0600)
committerElizabeth Myers <redacted>
Tue, 8 Mar 2016 01:04:24 +0000 (19:04 -0600)
include/match.h
ircd/chmode.c
ircd/extban.c
ircd/hash.c
ircd/hostmask.c
ircd/match.c

index 85e8f1cce571f8bfd2a93cd70ae4d8c95bc01f55..c49e12e9fc55460206843e7e231a2400dc110bab 100644 (file)
@@ -81,11 +81,11 @@ extern char *canonize(char *);
 /*
  * character macros
  */
-extern const unsigned char ToLowerTab[];
-#define ToLower(c) (ToLowerTab[(unsigned char)(c)])
+extern const unsigned char irctolower_tab[];
+#define irctolower(c) (irctolower_tab[(unsigned char)(c)])
 
-extern const unsigned char ToUpperTab[];
-#define ToUpper(c) (ToUpperTab[(unsigned char)(c)])
+extern const unsigned char irctoupper_tab[];
+#define irctoupper(c) (irctoupper_tab[(unsigned char)(c)])
 
 extern const unsigned int CharAttrs[];
 
@@ -143,7 +143,7 @@ static inline void irccasecanon(char *str)
 {
         while (*str)
         {
-                *str = ToUpper(*str);
+                *str = irctoupper(*str);
                 str++;
         }
         return;
index 99afb90d45ff4d1cb08312cac2348d7a18fd3a7b..3e0d41f3a647fd131ff62d2b562bddcda78f1620 100644 (file)
@@ -401,7 +401,7 @@ pretty_mask(const char *idmask)
                        *t = '~';
                if (*t == '~')
                        t++;
-               *t = ToLower(*t);
+               *t = irctolower(*t);
                return mask_buf + old_mask_pos;
        }
 
index 40c6dd7d6885fa3be12e06cde269198904218082..037dfdb5273f66ee1b7a0b7f40e1b0361772d73c 100644 (file)
@@ -42,7 +42,7 @@ match_extban(const char *banstr, struct Client *client_p, struct Channel *chptr,
                invert = 1;
                p++;
        }
-       f = extban_table[(unsigned char) ToLower(*p)];
+       f = extban_table[(unsigned char) irctolower(*p)];
        if (*p != '\0')
        {
                p++;
@@ -74,7 +74,7 @@ valid_extban(const char *banstr, struct Client *client_p, struct Channel *chptr,
        p = banstr + 1;
        if (*p == '~')
                p++;
-       f = extban_table[(unsigned char) ToLower(*p)];
+       f = extban_table[(unsigned char) irctolower(*p)];
        if (*p != '\0')
        {
                p++;
@@ -99,7 +99,7 @@ get_extban_string(void)
 
        j = 0;
        for (i = 1; i < 256; i++)
-               if (i == ToLower(i) && extban_table[i])
+               if (i == irctolower(i) && extban_table[i])
                        e[j++] = i;
        e[j] = 0;
        return e;
index c0d48c59f6420904b1a957a386ff026558e8f694..894fe3251d7c83f005f90839641d5a086e33eccc 100644 (file)
@@ -78,7 +78,7 @@ fnv_hash_upper(const unsigned char *s, int bits)
 
        while (*s)
        {
-               h ^= ToUpper(*s++);
+               h ^= irctoupper(*s++);
                h += (h<<1) + (h<<4) + (h<<7) + (h << 8) + (h << 24);
        }
        if (bits < 32)
@@ -123,7 +123,7 @@ fnv_hash_upper_len(const unsigned char *s, int bits, int len)
        const unsigned char *x = s + len;
        while (*s && s < x)
        {
-               h ^= ToUpper(*s++);
+               h ^= irctoupper(*s++);
                h += (h<<1) + (h<<4) + (h<<7) + (h << 8) + (h << 24);
        }
        if (bits < 32)
index 5fcbe3fe800cb19337968dd5c74f975aa5f04018..49f357cad338b6bce16b55c91c79a5b19dccb5b6 100644 (file)
@@ -178,7 +178,7 @@ hash_text(const char *start)
 
        while(*p)
        {
-               h = (h << 4) - (h + (unsigned char) ToLower(*p++));
+               h = (h << 4) - (h + (unsigned char) irctolower(*p++));
        }
 
        return (h & (ATABLE_SIZE - 1));
index 63a025ea549f25ce3db50aa087fc3d848cd54f49..dc4d0f881439aa57b99ba01a255cc499dfa19635 100644 (file)
@@ -88,14 +88,14 @@ int match(const char *mask, const char *name)
                                  else
                                  {
                                          m_tmp = m;
-                                         for (n_tmp = n; *n && ToLower(*n) != ToLower(*m); n++);
+                                         for (n_tmp = n; *n && irctolower(*n) != irctolower(*m); n++);
                                  }
                          }
                          /* and fall through */
                  default:
                          if (!*n)
                                  return (*m != '\0' ? 0 : 1);
-                         if (ToLower(*m) != ToLower(*n))
+                         if (irctolower(*m) != irctolower(*n))
                                  goto backtrack;
                          m++;
                          n++;
@@ -160,14 +160,14 @@ int mask_match(const char *mask, const char *name)
                                  else
                                  {
                                          m_tmp = m;
-                                         for (n_tmp = n; *n && ToLower(*n) != ToLower(*m); n++);
+                                         for (n_tmp = n; *n && irctolower(*n) != irctolower(*m); n++);
                                  }
                          }
                          /* and fall through */
                  default:
                          if (!*n)
                                  return (*m != '\0' ? 0 : 1);
-                         if (ToLower(*m) != ToLower(*n))
+                         if (irctolower(*m) != irctolower(*n))
                                  goto backtrack;
                          m++;
                          n++;
@@ -281,7 +281,7 @@ match_esc(const char *mask, const char *name)
                }
 
                if(quote)
-                       match1 = *m == 's' ? *n == ' ' : ToLower(*m) == ToLower(*n);
+                       match1 = *m == 's' ? *n == ' ' : irctolower(*m) == irctolower(*n);
                else if(*m == '?')
                        match1 = 1;
                else if(*m == '@')
@@ -289,7 +289,7 @@ match_esc(const char *mask, const char *name)
                else if(*m == '#')
                        match1 = IsDigit(*n);
                else
-                       match1 = ToLower(*m) == ToLower(*n);
+                       match1 = irctolower(*m) == irctolower(*n);
                if(match1)
                {
                        if(*m)
@@ -565,7 +565,7 @@ int irccmp(const char *s1, const char *s2)
        s_assert(s1 != NULL);
        s_assert(s2 != NULL);
 
-       while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0)
+       while ((res = irctoupper(*str1) - irctoupper(*str2)) == 0)
        {
                if (*str1 == '\0')
                        return 0;
@@ -583,7 +583,7 @@ int ircncmp(const char *s1, const char *s2, int n)
        s_assert(s1 != NULL);
        s_assert(s2 != NULL);
 
-       while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0)
+       while ((res = irctoupper(*str1) - irctoupper(*str2)) == 0)
        {
                str1++;
                str2++;
@@ -594,7 +594,7 @@ int ircncmp(const char *s1, const char *s2, int n)
        return (res);
 }
 
-const unsigned char ToLowerTab[] = {
+const unsigned char irctolower_tab[] = {
        0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa,
        0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14,
        0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,
@@ -629,7 +629,7 @@ const unsigned char ToLowerTab[] = {
        0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
 };
 
-const unsigned char ToUpperTab[] = {
+const unsigned char irctoupper_tab[] = {
        0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa,
        0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14,
        0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d,