Mercurial > pidgin
annotate src/protocols/zephyr/error_message.c @ 14141:5f656a0a82b7
[gaim-migrate @ 16783]
Whitespace and warning fixes:
gtkaccount.c: In function ?icon_select_cb?:
gtkaccount.c:289: warning: passing argument 1 of
?gaim_gtk_buddy_icon_chooser_new? from incompatible pointer type
gtkaccount.c:289: warning: passing argument 2 of
?gaim_gtk_buddy_icon_chooser_new? from incompatible pointer type
gtkstatusbox.c: In function ?icon_box_press_cb?:
gtkstatusbox.c:951: warning: passing argument 2 of
?gaim_gtk_buddy_icon_chooser_new? from incompatible pointer type
gtkstatusbox.c:951: warning: ISO C90 forbids mixed declarations and code
gtkstatusbox.c: In function ?icon_box_enter_cb?:
gtkstatusbox.c:960: warning: passing argument 1 of ?gtk_image_set_from_pixbuf?
from incompatible pointer type
gtkstatusbox.c: In function ?icon_box_leave_cb?:
gtkstatusbox.c:968: warning: passing argument 1 of ?gtk_image_set_from_pixbuf?
from incompatible pointer type
gtkstatusbox.c: In function ?gtk_gaim_status_box_size_allocate?:
gtkstatusbox.c:1183: warning: passing argument 1 of ?gtk_image_set_from_pixbuf?
from incompatible pointer type
gtkstatusbox.c: In function ?gtk_gaim_status_box_set_buddy_icon?:
gtkstatusbox.c:1338: warning: passing argument 1 of ?gtk_image_set_from_pixbuf?
from incompatible pointer type
gtkutils.c: In function ?gaim_gtk_convert_buddy_icon?:
gtkutils.c:2463: warning: ISO C90 forbids mixed declarations and code
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Wed, 16 Aug 2006 06:31:59 +0000 |
| parents | 64895571248f |
| children |
| rev | line source |
|---|---|
| 2086 | 1 /* |
| 2 * Copyright 1987 by the Student Information Processing Board | |
| 3 * of the Massachusetts Institute of Technology | |
| 4 * | |
| 5 * For copyright info, see "mit-sipb-copyright.h". | |
| 6 */ | |
| 7 | |
| 8 #include "error_table.h" | |
| 9 #include "com_err.h" | |
| 6903 | 10 #include <sysdep.h> |
| 2086 | 11 |
| 12 char *error_table_name_r __P((int, char *)); | |
| 13 | |
| 14 struct et_list * _et_list = (struct et_list *) NULL; | |
| 15 | |
| 16 const char * error_message (code) | |
| 17 long code; | |
| 18 { | |
| 19 static char buf[COM_ERR_BUF_LEN]; | |
| 20 | |
| 21 return(error_message_r(code, buf)); | |
| 22 } | |
| 23 | |
| 24 const char * error_message_r (code, buf) | |
| 25 long code; | |
| 26 char *buf; | |
| 27 { | |
| 28 int offset; | |
| 29 struct et_list *et; | |
| 30 int table_num; | |
| 31 int started = 0; | |
| 32 char *cp, namebuf[6]; | |
| 33 | |
| 34 offset = code & ((1<<ERRCODE_RANGE)-1); | |
| 35 table_num = code - offset; | |
| 36 if (!table_num) | |
| 37 return strerror(offset); | |
| 38 for (et = _et_list; et; et = et->next) { | |
| 39 if (et->table->base == table_num) { | |
| 40 /* This is the right table */ | |
| 41 if (et->table->n_msgs <= offset) | |
| 42 break; | |
| 43 return(et->table->msgs[offset]); | |
| 44 } | |
| 45 } | |
| 46 | |
| 47 strcpy (buf, "Unknown code "); | |
| 48 if (table_num) { | |
| 49 strcat (buf, error_table_name_r (table_num, namebuf)); | |
| 50 strcat (buf, " "); | |
| 51 } | |
| 52 for (cp = buf; *cp; cp++) | |
| 53 ; | |
| 54 if (offset >= 100) { | |
| 55 *cp++ = '0' + offset / 100; | |
| 56 offset %= 100; | |
| 57 started++; | |
| 58 } | |
| 59 if (started || offset >= 10) { | |
| 60 *cp++ = '0' + offset / 10; | |
| 61 offset %= 10; | |
| 62 } | |
| 63 *cp++ = '0' + offset; | |
| 64 *cp = '\0'; | |
| 65 return(buf); | |
| 66 } |
