lib/eggdrop/irccmp.c File Reference

#include "irccmp.h"

Go to the source code of this file.

Functions

int irccmp (const char *s1, const char *s2)
int ircncmp (const char *s1, const char *s2, int n)

Variables

static const char rcsid [] = "$Id: irccmp.c,v 1.4 2003-12-17 07:52:14 wcc Exp $"
static const unsigned char ToLowerTab []
static const unsigned char ToUpperTab []


Function Documentation

int irccmp ( const char *  s1,
const char *  s2 
)

Definition at line 105 of file irccmp.c.

References ToUpper.

Referenced by check_expired_bans(), check_expired_exempts(), check_expired_invites(), cmd_mns_chan(), cmd_mns_mask(), del_chanrec(), expired_mask(), get_chanrec(), got005(), got376(), on_putlog(), u_addmask(), u_delmask(), u_equals_mask(), u_setsticky_mask(), and u_sticky_mask().

00106 {
00107   const unsigned char *str1 = (const unsigned char *) s1, *str2 = (const unsigned char *) s2;
00108   int res;
00109 
00110   while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0) {
00111     if (*str1 == '\0') return(0);
00112     str1++;
00113     str2++;
00114   }
00115   return(res);
00116 }

int ircncmp ( const char *  s1,
const char *  s2,
int  n 
)

Definition at line 124 of file irccmp.c.

References ToUpper.

00125 {
00126   const unsigned char *str1 = (const unsigned char *) s1, *str2 = (const unsigned char *) s2;
00127   int res;
00128 
00129   while ((res = ToUpper(*str1) - ToUpper(*str2)) == 0) {
00130     str1++;
00131     str2++;
00132     n--;
00133     if (n == 0 || (*str1 == '\0' && *str2 == '\0')) return(0);
00134   }
00135   return(res);
00136 }


Variable Documentation

const char rcsid[] = "$Id: irccmp.c,v 1.4 2003-12-17 07:52:14 wcc Exp $" [static]

Definition at line 24 of file irccmp.c.

const unsigned char ToLowerTab[] [static]

Definition at line 29 of file irccmp.c.

const unsigned char ToUpperTab[] [static]

Definition at line 64 of file irccmp.c.


Generated on Sun Nov 30 18:43:34 2008 for eggdrop1.9 by  doxygen 1.5.6