1 /* $Id: util_parse.h 2846 2010-03-01 17:38:28Z kuhlmann $ */
2 
3 #ifndef CLIMM_UTIL_PARSE_H
4 #define CLIMM_UTIL_PARSE_H
5 
6 strc_t        s_parse_s     (const char **input, const char *sep);
7 Contact      *s_parsenick_s (const char **input, const char *sep, BOOL any, Server *serv, const char **alias);
8 ContactGroup *s_parsecg_s   (const char **input, const char *sep, BOOL any, Server *serv);
9 ContactGroup *s_parselist_s (const char **input, BOOL rem, BOOL any, Server *serv);
10 char         *s_parserem_s  (const char **input, const char *sep);
11 
12 const char   *s_parseint_s  (const char **input, UDWORD        *parsed, const char *sep, int flags);
13 BOOL          s_parsekey_s  (const char **input, const char *kw,        const char *sep);
14 
15 int is_valid_icq_name  (char *user);
16 int is_valid_aim_name  (char *user);
17 int is_valid_xmpp_name (char *user);
18 int is_valid_msn_name  (char *user);
19 
20 #define DEFAULT_SEP " \t\r\n"
21 #define MULTI_SEP   " \t\r\n,"
22 
23 #define s_parse(i)          s_parse_s     (i, DEFAULT_SEP)
24 #define s_parsenick(i,s)    s_parsenick_s (i, DEFAULT_SEP, 0, s, NULL)
25 #define s_parsecg(i,s)      s_parsecg_s   (i, DEFAULT_SEP, 0, s)
26 #define s_parselist(i,s)    s_parselist_s (i, 0, 0, s)
27 #define s_parselistrem(i,s) s_parselist_s (i, 1, 0, s)
28 #define s_parseanylist(i,s) s_parselist_s (i, 0, 1, s)
29 #define s_parserem(i)       s_parserem_s  (i, DEFAULT_SEP)
30 #define s_parseint(i,p)     s_parseint_s  (i, p, DEFAULT_SEP, 7)
31 #define s_parsekey(i,k)     s_parsekey_s  (i, k, DEFAULT_SEP)
32 
33 #endif /* CLIMM_UTIL_PARSE_H */
34