1 /************************************************************************
2 * This technique was borrowed in part from the source code to
3 * ircd-hybrid-5.3 to implement case-insensitive string matches which
4 * are fully compliant with Section 2.2 of RFC 1459, the copyright
5 * of that code being (C) 1990 Jarkko Oikarinen and under the GPL.
7 * A special thanks goes to Mr. Okarinen for being the one person who
8 * seems to have ever noticed this section in the original RFC and
9 * written code for it. Shame on all the rest of you (myself included).
11 * --+ Dagmar d'Surreal
19 #define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)])
21 extern const unsigned char rfc_tolowertab
[];
23 int my_poptParseArgvString(const char * s
, int * argcPtr
, char *** argvPtr
);
24 char *expand_homedir (char *file
);
25 void path_part (char *file
, char *path
, int pathlen
);
26 int match (const char *mask
, const char *string
);
27 char *file_part (char *file
);
28 void for_files (char *dirname
, char *mask
, void callback (char *file
));
29 int rfc_casecmp (const char *, const char *);
30 int rfc_ncasecmp (char *, char *, int);
31 int buf_get_line (char *, char **, int *, int len
);
32 char *nocasestrstr (const char *text
, const char *tofind
);
33 char *country (char *);
34 void country_search (char *pattern
, void *ud
, void (*print
)(void *, char *, ...));
35 char *get_cpu_str (void);
36 int util_exec (const char *cmd
);
37 int util_execv (char * const argv
[]);
39 #define STRIP_ATTRIB 2
40 #define STRIP_HIDDEN 4
41 #define STRIP_ESCMARKUP 8
43 gchar
*strip_color (const char *text
, int len
, int flags
);
44 int strip_color2 (const char *src
, int len
, char *dst
, int flags
);
45 int strip_hidden_attribute (char *src
, char *dst
);
46 char *errorstring (int err
);
47 int waitline (int sok
, char *buf
, int bufsize
, int);
48 unsigned long make_ping_time (void);
49 void move_file_utf8 (char *src_dir
, char *dst_dir
, char *fname
, int dccpermissions
);
50 int mkdir_utf8 (char *dir
);
51 int token_foreach (char *str
, char sep
, int (*callback
) (char *str
, void *ud
), void *ud
);
52 guint32
str_hash (const char *key
);
53 guint32
str_ihash (const unsigned char *key
);
54 void safe_strcpy (char *dest
, const char *src
, int bytes_left
);
55 char *encode_sasl_pass_plain (char *user
, char *pass
);
56 char *encode_sasl_pass_blowfish (char *user
, char *pass
, char *data
);
57 char *encode_sasl_pass_aes (char *user
, char *pass
, char *data
);
58 char *challengeauth_response (char *username
, char *password
, char *challenge
);