diff options
author | erdgeist <> | 2006-01-26 18:40:30 +0000 |
---|---|---|
committer | erdgeist <> | 2006-01-26 18:40:30 +0000 |
commit | 57689e698230030803c872072a03329fdd4fecc6 (patch) | |
tree | b4f8671dbe04741be93091e99eb3c6aa81b9bebd /vchat.h | |
parent | 4413fb15bec35744c06ac3cfce2ae2bfa6953ae1 (diff) |
unsigned char tidy up, query mode
Diffstat (limited to 'vchat.h')
-rwxr-xr-x | vchat.h | 124 |
1 files changed, 62 insertions, 62 deletions
@@ -26,20 +26,20 @@ typedef enum { SM_IGNORE, SM_INFO, SM_USERINFO, SM_CHANNEL, SM_ERROR } smtype; | |||
26 | /* servermessage structure */ | 26 | /* servermessage structure */ |
27 | struct servermessage | 27 | struct servermessage |
28 | { | 28 | { |
29 | unsigned char id[4]; /* three-character message id */ | 29 | char id[4]; /* three-character message id */ |
30 | smtype type; /* message type */ | 30 | smtype type; /* message type */ |
31 | void (*funct) (unsigned char *); /* function used by client */ | 31 | void (*funct) (char *); /* function used by client */ |
32 | void (*hook) (unsigned char *); /* function hook for scripting */ | 32 | void (*hook) (char *); /* function hook for scripting */ |
33 | }; | 33 | }; |
34 | typedef struct servermessage servermessage; | 34 | typedef struct servermessage servermessage; |
35 | 35 | ||
36 | /* configuration types and variable numbers */ | 36 | /* configuration types and variable numbers */ |
37 | typedef enum { CO_NIL, CO_STR, CO_INT } conftype; | 37 | typedef enum { CO_NIL, CO_STR, CO_INT } conftype; |
38 | typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT, | 38 | typedef enum { CF_NIL, CF_NICK, CF_FROM, CF_SERVERHOST, CF_SERVERPORT, |
39 | CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE, CF_LOGFILE, | 39 | CF_CIPHERSUITE, CF_CONFIGFILE, CF_CERTFILE, CF_KEYFILE, CF_FORMFILE, |
40 | CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME, | 40 | CF_USESSL, CF_USECERT, CF_PRIVHEIGHT, CF_HSCROLL, CF_CHANNEL, CF_USETIME, |
41 | CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT, | 41 | CF_USETOPIC, CF_SCROLLBPRIV, CF_SCROLLBACK, CF_SCROLLBPRIVT, CF_SCROLLBACKT, |
42 | CF_KEEPLOG, CF_ENCODING, CF_BELLPRIV } confopt; | 42 | CF_ENCODING, CF_BELLPRIV } confopt; |
43 | 43 | ||
44 | /* format strings */ | 44 | /* format strings */ |
45 | typedef enum { FS_PLAIN, FS_CHAN, FS_PRIV, FS_SERV, FS_GLOB, FS_DBG, FS_ERR, | 45 | typedef enum { FS_PLAIN, FS_CHAN, FS_PRIV, FS_SERV, FS_GLOB, FS_DBG, FS_ERR, |
@@ -54,14 +54,14 @@ FS_SBINF, FS_MISSTYPED, FS_UNKNCMD, FS_BADREGEX, FS_ERR_STRING } formtstr; | |||
54 | /* configoption structure */ | 54 | /* configoption structure */ |
55 | struct configoption | 55 | struct configoption |
56 | { | 56 | { |
57 | confopt id; | 57 | confopt id; |
58 | conftype type; | 58 | conftype type; |
59 | unsigned char *varname; | 59 | char *varname; |
60 | unsigned char *defaultvalue; | 60 | char *defaultvalue; |
61 | unsigned char *value; | 61 | char *value; |
62 | union { | 62 | union { |
63 | unsigned char **pstr; | 63 | char **pstr; |
64 | int *pint; | 64 | unsigned int *pint; |
65 | } localvar; | 65 | } localvar; |
66 | }; | 66 | }; |
67 | 67 | ||
@@ -71,74 +71,74 @@ typedef struct configoption configoption; | |||
71 | struct formatstring | 71 | struct formatstring |
72 | { | 72 | { |
73 | formtstr id; | 73 | formtstr id; |
74 | unsigned char *idstring; | 74 | char *idstring; |
75 | unsigned char *formatstr; | 75 | char *formatstr; |
76 | }; | 76 | }; |
77 | typedef struct formatstring formatstring; | 77 | typedef struct formatstring formatstring; |
78 | 78 | ||
79 | /* static tmpstr in all modules */ | 79 | /* static tmpstr in all modules */ |
80 | #define TMPSTRSIZE 1024 | 80 | #define TMPSTRSIZE 1024 |
81 | static unsigned char tmpstr[TMPSTRSIZE]; | 81 | static char tmpstr[TMPSTRSIZE]; |
82 | 82 | ||
83 | extern unsigned char *nick; | 83 | extern char *nick; |
84 | extern int chan; | 84 | extern int chan; |
85 | 85 | ||
86 | extern unsigned int loggedin; | 86 | extern unsigned int loggedin; |
87 | 87 | ||
88 | /* vchat-client.c */ | 88 | /* vchat-client.c */ |
89 | #define ERRSTRSIZE 1024 | 89 | #define ERRSTRSIZE 1024 |
90 | extern unsigned char errstr[]; | 90 | extern char errstr[]; |
91 | extern unsigned char *vchat_cl_version; | 91 | extern char *vchat_cl_version; |
92 | void cleanup(int signal); | 92 | void cleanup(int signal); |
93 | 93 | ||
94 | /* configuration helper funktions from vchat-client.c */ | 94 | /* configuration helper funktions from vchat-client.c */ |
95 | unsigned char *getformatstr (formtstr id); | 95 | char *getformatstr (formtstr id); |
96 | unsigned char *getstroption (confopt option); | 96 | char *getstroption (confopt option); |
97 | void setstroption (confopt option, unsigned char *string); | 97 | void setstroption (confopt option, char *string); |
98 | int getintoption (confopt option); | 98 | int getintoption (confopt option); |
99 | void setintoption (confopt option, int value); | 99 | void setintoption (confopt option, int value); |
100 | 100 | ||
101 | /* vchat-user.c */ | 101 | /* vchat-user.c */ |
102 | extern unsigned char *vchat_us_version; | 102 | extern char *vchat_us_version; |
103 | 103 | ||
104 | /* add / delete user */ | 104 | /* add / delete user */ |
105 | void ul_add (unsigned char *nick, int ignored); | 105 | void ul_add (char *nick, int ignored); |
106 | void ul_del (unsigned char *nick, int ignored); | 106 | void ul_del (char *nick, int ignored); |
107 | 107 | ||
108 | /* clear userlist */ | 108 | /* clear userlist */ |
109 | void ul_clear (); | 109 | void ul_clear (); |
110 | 110 | ||
111 | /* channel join / leave */ | 111 | /* channel join / leave */ |
112 | void ul_join (unsigned char *nick, int channel); | 112 | void ul_join (char *nick, int channel); |
113 | void ul_leave (unsigned char *nick, int channel); | 113 | void ul_leave (char *nick, int channel); |
114 | 114 | ||
115 | /* nickchange */ | 115 | /* nickchange */ |
116 | void ul_nickchange (unsigned char *oldnick, unsigned char *newnick); | 116 | void ul_nickchange (char *oldnick, char *newnick); |
117 | 117 | ||
118 | /* place user in channel */ | 118 | /* place user in channel */ |
119 | void ul_moveuser (unsigned char *nick, int channel); | 119 | void ul_moveuser (char *nick, int channel); |
120 | 120 | ||
121 | /* message nick completion */ | 121 | /* message nick completion */ |
122 | void ul_msgto (unsigned char *nick); | 122 | void ul_msgto (char *nick); |
123 | void ul_msgfrom (unsigned char *nick); | 123 | void ul_msgfrom (char *nick); |
124 | 124 | ||
125 | /* nick-completion for vchat-ui.c */ | 125 | /* nick-completion for vchat-ui.c */ |
126 | unsigned char *ul_nickcomp (const unsigned char *text, int state); | 126 | char *ul_nickcomp (const char *text, int state); |
127 | unsigned char *ul_cnickcomp (const unsigned char *text, int state); | 127 | char *ul_cnickcomp (const char *text, int state); |
128 | unsigned char *ul_mnickcomp (const unsigned char *text, int state); | 128 | char *ul_mnickcomp (const char *text, int state); |
129 | 129 | ||
130 | /* try to find user by substring */ | 130 | /* try to find user by substring */ |
131 | unsigned char *ul_matchuser ( unsigned char *substr); | 131 | char *ul_matchuser (char *substr); |
132 | 132 | ||
133 | /* vchat-ui.c */ | 133 | /* vchat-ui.c */ |
134 | extern unsigned char *vchat_ui_version; | 134 | extern char *vchat_ui_version; |
135 | 135 | ||
136 | /* topic and console strings */ | 136 | /* topic and console strings */ |
137 | #define TOPICSTRSIZE 1024 | 137 | #define TOPICSTRSIZE 1024 |
138 | #define CONSOLESTRSIZE 1024 | 138 | #define CONSOLESTRSIZE 1024 |
139 | extern unsigned char topicstr[]; | 139 | extern char topicstr[]; |
140 | extern unsigned char consolestr[]; | 140 | extern char consolestr[]; |
141 | extern unsigned char *encoding; | 141 | extern char *encoding; |
142 | 142 | ||
143 | /* init / exit functions */ | 143 | /* init / exit functions */ |
144 | void initui (void); | 144 | void initui (void); |
@@ -148,22 +148,20 @@ void exitui (void); | |||
148 | void userinput (void); | 148 | void userinput (void); |
149 | 149 | ||
150 | /* display various messages */ | 150 | /* display various messages */ |
151 | int writechan (unsigned char *str); | 151 | int writechan (char *str); |
152 | int writepriv (unsigned char *str, int maybeep ); | 152 | int writepriv (char *str, int maybeep ); |
153 | void writeout (unsigned char *str); | 153 | void writeout (char *str); |
154 | void showout (void); | 154 | void showout (void); |
155 | void flushout (void); | 155 | void flushout (void); |
156 | #define msgout(STR) {flushout();writeout(STR);showout();} | 156 | #define msgout(STR) {flushout();writeout(STR);showout();} |
157 | void hideout (void); | 157 | void hideout (void); |
158 | int writecf (formtstr id, unsigned char *str); | 158 | int writecf (formtstr id, char *str); |
159 | void writelog (FILE *file); | ||
160 | void writelog_i(FILE *file); | ||
161 | 159 | ||
162 | extern int outputcountdown; | 160 | extern int outputcountdown; |
163 | 161 | ||
164 | /* update console / topic window */ | 162 | /* update console / topic window */ |
165 | void consoleline (unsigned char *); | 163 | void consoleline (char *); |
166 | void topicline (unsigned char *); | 164 | void topicline (char *); |
167 | 165 | ||
168 | /* prompt for nick or password */ | 166 | /* prompt for nick or password */ |
169 | void nickprompt (void); | 167 | void nickprompt (void); |
@@ -172,40 +170,42 @@ int passprompt (char *buf, int size, int rwflag, void *userdata); | |||
172 | /* filter functions */ | 170 | /* filter functions */ |
173 | void refilterscrollback( void); | 171 | void refilterscrollback( void); |
174 | 172 | ||
175 | unsigned int addfilter ( char colour, unsigned char *regex ); | 173 | unsigned int addfilter ( char colour, char *regex ); |
176 | void removefilter ( unsigned char *line ); | 174 | void removefilter ( char *line ); |
177 | void listfilters ( void ); | 175 | void listfilters ( void ); |
178 | void clearfilters ( char colour ); | 176 | void clearfilters ( char colour ); |
179 | 177 | ||
178 | void handlequery ( char *line ); | ||
179 | |||
180 | /* vchat-protocol.c */ | 180 | /* vchat-protocol.c */ |
181 | extern unsigned char *vchat_io_version; | 181 | extern char *vchat_io_version; |
182 | 182 | ||
183 | /* connect/disconnect */ | 183 | /* connect/disconnect */ |
184 | int vcconnect (unsigned char *server, unsigned char *port); | 184 | int vcconnect (char *server, char *port); |
185 | void vcdisconnect (); | 185 | void vcdisconnect (); |
186 | 186 | ||
187 | /* network I/O */ | 187 | /* network I/O */ |
188 | void networkinput (void); | 188 | void networkinput (void); |
189 | void networkoutput (unsigned char *); | 189 | void networkoutput (char *); |
190 | 190 | ||
191 | /* helpers for vchat-user.c */ | 191 | /* helpers for vchat-user.c */ |
192 | void ownjoin (int channel); | 192 | void ownjoin (int channel); |
193 | void ownleave (int channel); | 193 | void ownleave (int channel); |
194 | void ownnickchange (unsigned char *newnick); | 194 | void ownnickchange (char *newnick); |
195 | 195 | ||
196 | /* vchat-commands.c */ | 196 | /* vchat-commands.c */ |
197 | extern unsigned char *vchat_cm_version; | 197 | extern char *vchat_cm_version; |
198 | void command_version ( unsigned char *tail); | 198 | void command_version ( char *tail); |
199 | 199 | ||
200 | /* user input */ | 200 | /* user input */ |
201 | void handleline (unsigned char *); | 201 | void handleline (char *); |
202 | 202 | ||
203 | /* struct for defining "/command" handlers */ | 203 | /* struct for defining "/command" handlers */ |
204 | typedef struct { | 204 | typedef struct { |
205 | int number; | 205 | int number; |
206 | unsigned char name[8]; | 206 | char name[8]; |
207 | int len; | 207 | int len; |
208 | void (*handler)(unsigned char *); | 208 | void (*handler)(char *); |
209 | unsigned char *short_help; | 209 | char *short_help; |
210 | unsigned char *help; | 210 | char *help; |
211 | } commandentry; | 211 | } commandentry; |