comparison libpurple/protocols/oscar/oscar.c @ 21015:787b3897ba9f

Patch from Andrew Gaul to constify a bunch of static variables to reduce the amount of writable memory +08108000 12K rwx-- /local/local/bin/pidgin -08107000 16K rwx-- /local/local/bin/pidgin +005bf000 20K rwx-- /local/local/lib/libpurple.so.0.2.1 -005be000 24K rwx-- /local/local/lib/libpurple.so.0.2.1
author Ka-Hing Cheung <khc@hxbc.us>
date Fri, 26 Oct 2007 04:59:23 +0000
parents 0314cb293463
children 3ee4d335247d
comparison
equal deleted inserted replaced
21014:0314cb293463 21015:787b3897ba9f
110 PurpleConnection *gc; 110 PurpleConnection *gc;
111 gchar *name; 111 gchar *name;
112 gchar *nick; 112 gchar *nick;
113 }; 113 };
114 114
115 static char *msgerrreason[] = { 115 static const char * const msgerrreason[] = {
116 N_("Invalid error"), 116 N_("Invalid error"),
117 N_("Invalid SNAC"), 117 N_("Invalid SNAC"),
118 N_("Rate to host"), 118 N_("Rate to host"),
119 N_("Rate to client"), 119 N_("Rate to client"),
120 N_("Not logged in"), 120 N_("Not logged in"),
137 N_("List overflow"), 137 N_("List overflow"),
138 N_("Request ambiguous"), 138 N_("Request ambiguous"),
139 N_("Queue full"), 139 N_("Queue full"),
140 N_("Not while on AOL") 140 N_("Not while on AOL")
141 }; 141 };
142 static int msgerrreasonlen = 25; 142 static const int msgerrreasonlen = G_N_ELEMENTS(msgerrreason);
143 143
144 /* All the libfaim->purple callback functions */ 144 /* All the libfaim->purple callback functions */
145 static int purple_parse_auth_resp (OscarData *, FlapConnection *, FlapFrame *, ...); 145 static int purple_parse_auth_resp (OscarData *, FlapConnection *, FlapFrame *, ...);
146 static int purple_parse_login (OscarData *, FlapConnection *, FlapFrame *, ...); 146 static int purple_parse_login (OscarData *, FlapConnection *, FlapFrame *, ...);
147 static int purple_parse_auth_securid_request(OscarData *, FlapConnection *, FlapFrame *, ...); 147 static int purple_parse_auth_securid_request(OscarData *, FlapConnection *, FlapFrame *, ...);