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
17 #define rfc_tolower(c) (rfc_tolowertab[(unsigned char)(c)])
19 extern const unsigned char rfc_tolowertab
[];
21 int my_poptParseArgvString(const char * s
, int * argcPtr
, char *** argvPtr
);
22 char *expand_homedir (char *file
);
23 void path_part (char *file
, char *path
, int pathlen
);
24 int match (const char *mask
, const char *string
);
25 char *file_part (char *file
);
26 void for_files (char *dirname
, char *mask
, void callback (char *file
));
27 int rfc_casecmp (const char *, const char *);
28 int rfc_ncasecmp (char *, char *, int);
29 int buf_get_line (char *, char **, int *, int len
);
30 char *nocasestrstr (const char *text
, const char *tofind
);
31 char *country (char *);
32 void country_search (char *pattern
, void *ud
, void (*print
)(void *, char *, ...));
33 char *get_cpu_str (void);
34 int util_exec (const char *cmd
);
35 int util_execv (char * const argv
[]);
37 #define STRIP_ATTRIB 2
38 #define STRIP_HIDDEN 4
39 #define STRIP_ESCMARKUP 8
41 gchar
*strip_color (const char *text
, int len
, int flags
);
42 int strip_color2 (const char *src
, int len
, char *dst
, int flags
);
43 int strip_hidden_attribute (char *src
, char *dst
);
44 char *errorstring (int err
);
45 int waitline (int sok
, char *buf
, int bufsize
, int);
46 unsigned long make_ping_time (void);
47 void move_file_utf8 (char *src_dir
, char *dst_dir
, char *fname
, int dccpermissions
);
48 int mkdir_utf8 (char *dir
);
49 int token_foreach (char *str
, char sep
, int (*callback
) (char *str
, void *ud
), void *ud
);
50 guint32
str_hash (const char *key
);
51 guint32
str_ihash (const unsigned char *key
);
52 void safe_strcpy (char *dest
, const char *src
, int bytes_left
);
53 char *encode_sasl_pass (char *user
, char *pass
);
54 char *challengeauth_response (char *username
, char *password
, char *challenge
);