*push*
[NeonServV5.git] / main.h
1 #ifndef _main_h
2 #define _main_h
3
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <string.h>
7 #include <ctype.h>
8 #include <sys/types.h>
9 #include <sys/socket.h>
10 #include <netinet/in.h>
11 #include <arpa/inet.h>
12 #include <unistd.h>
13 #include <netdb.h>
14
15 #if __GNUC__ >= 2
16 #define UNUSED_ARG(ARG) ARG __attribute__((unused))
17 #elif defined(S_SPLINT_S)
18 #define UNUSED_ARG(ARG) /*@unused@*/ ARG
19 #define const /*@observer@*/ /*@temp@*/
20 #else
21 #define UNUSED_ARG(ARG) ARG
22 #endif
23
24
25 #define NICKLEN         30
26 #define USERLEN         10
27 #define HOSTLEN         63
28 #define REALLEN         50
29 #define TOPICLEN        500
30 #define CHANNELLEN      200
31
32 //valid nick chars
33 #define VALID_NICK_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890{|}~[\\]^_`"
34 //the first char is a little bit different
35 //                              0        1         2         3         4         5          6
36 //                              1234567890123456789012345678901234567890123456789012345678 9012   62
37 #define VALID_NICK_CHARS_FIRST "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~[\\]^_`"
38 #define VALID_NICK_CHARS_FIRST_LEN 62
39
40 #endif