Mercurial > pidgin
comparison libpurple/example/nullclient.c @ 22007:c38d72677c8a
Probe for -Wstrict-prototypes to get some more warnings. I then cleaned up
the existing warnings. I removed a handful of dead code and cleaned up a
couple of things that I stumbled across.
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Thu, 03 Jan 2008 04:57:40 +0000 |
| parents | 9838af97586b |
| children | 3684c9d16f6f |
comparison
equal
deleted
inserted
replaced
| 21975:c7c5e2ff2b04 | 22007:c38d72677c8a |
|---|---|
| 165 NULL, | 165 NULL, |
| 166 NULL | 166 NULL |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 static void | 169 static void |
| 170 null_ui_init() | 170 null_ui_init(void) |
| 171 { | 171 { |
| 172 /** | 172 /** |
| 173 * This should initialize the UI components for all the modules. Here we | 173 * This should initialize the UI components for all the modules. Here we |
| 174 * just initialize the UI for conversations. | 174 * just initialize the UI for conversations. |
| 175 */ | 175 */ |
| 189 NULL, | 189 NULL, |
| 190 NULL | 190 NULL |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 static void | 193 static void |
| 194 init_libpurple() | 194 init_libpurple(void) |
| 195 { | 195 { |
| 196 /* Set a custom user directory (optional) */ | 196 /* Set a custom user directory (optional) */ |
| 197 purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); | 197 purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); |
| 198 | 198 |
| 199 /* We do not want any debugging for now to keep the noise to a minimum. */ | 199 /* We do not want any debugging for now to keep the noise to a minimum. */ |
| 248 PurpleAccount *account = purple_connection_get_account(gc); | 248 PurpleAccount *account = purple_connection_get_account(gc); |
| 249 printf("Account connected: %s %s\n", account->username, account->protocol_id); | 249 printf("Account connected: %s %s\n", account->username, account->protocol_id); |
| 250 } | 250 } |
| 251 | 251 |
| 252 static void | 252 static void |
| 253 connect_to_signals_for_demonstration_purposes_only() | 253 connect_to_signals_for_demonstration_purposes_only(void) |
| 254 { | 254 { |
| 255 static int handle; | 255 static int handle; |
| 256 purple_signal_connect(purple_connections_get_handle(), "signed-on", &handle, | 256 purple_signal_connect(purple_connections_get_handle(), "signed-on", &handle, |
| 257 PURPLE_CALLBACK(signed_on), NULL); | 257 PURPLE_CALLBACK(signed_on), NULL); |
| 258 } | 258 } |
| 259 | 259 |
| 260 int main() | 260 int main(int argc, char *argv[]) |
| 261 { | 261 { |
| 262 GList *iter; | 262 GList *iter; |
| 263 int i, num; | 263 int i, num; |
| 264 GList *names = NULL; | 264 GList *names = NULL; |
| 265 const char *prpl; | 265 const char *prpl; |
