# HG changeset patch # User Mark Doliner # Date 1162067905 0 # Node ID 852803694be31a4cf13c5f2903346e089e6c0da1 # Parent 634014c941ec28384ffc2b72c3af5527fe1f40dc [gaim-migrate @ 17611] sf patch #1582046, from Henning Noren "This patch removes a unused array and makes some other static const. These small changes moves 14 memory pages from private to shared on my system." committer: Tailor Script diff -r 634014c941ec -r 852803694be3 libgaim/protocols/yahoo/util.c --- a/libgaim/protocols/yahoo/util.c Sat Oct 28 20:11:46 2006 +0000 +++ b/libgaim/protocols/yahoo/util.c Sat Oct 28 20:38:25 2006 +0000 @@ -342,7 +342,7 @@ /* borrowed from gtkimhtml */ #define MAX_FONT_SIZE 7 #define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SIZE) - 1]) -static gint _point_sizes [] = { 8, 10, 12, 14, 20, 30, 40 }; +static const gint _point_sizes [] = { 8, 10, 12, 14, 20, 30, 40 }; enum fatype { size, color, face, junk }; typedef struct { diff -r 634014c941ec -r 852803694be3 libgaim/protocols/yahoo/yahoo.c --- a/libgaim/protocols/yahoo/yahoo.c Sat Oct 28 20:11:46 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo.c Sat Oct 28 20:38:25 2006 +0000 @@ -1170,7 +1170,7 @@ } } /* This is the y64 alphabet... it's like base64, but has a . and a _ */ -char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; +static const char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._"; /* This is taken from Sylpheed by Hiroyuki Yamamoto. We have our own tobase64 function * in util.c, but it has a bug I don't feel like finding right now ;) */ diff -r 634014c941ec -r 852803694be3 libgaim/protocols/yahoo/yahoo_auth.c --- a/libgaim/protocols/yahoo/yahoo_auth.c Sat Oct 28 20:11:46 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_auth.c Sat Oct 28 20:38:25 2006 +0000 @@ -13,7 +13,7 @@ /************* * Ugliness * *************/ -auth_function_t main_function_list[5][96] = { +static const auth_function_t main_function_list[5][96] = { { { 0, 0x0, 0x0 }, { 0, 0x0, 0x0 }, @@ -506,7 +506,7 @@ } }; -struct buffer_t type_three_list[NUM_TYPE_THREES]={ +static const struct buffer_t type_three_list[NUM_TYPE_THREES]={ { 0x538920, "\x7a\x61\x31\x57\x9\xbc\x11\x8d\x6a\x12\x3a\x4d\x76\xbf\x19\x86\x2c\xc8\x69\x60\x84\x1\xc9\x21\xb1\xa6\xf\x99\xcd\xa0\x71\x8b\x5f\xb2\xd2\x53\xed\xf9\x55\xa\x50\x14\x15\xad\x88\x52\x5d\xbb\xe\xe5\xd\x56\x3e\x9b\xc7\x17\x9a\x97\x92\x23\x0\x37\xaa\x27\xf6\xb6\x33\xb5\xc5\xd1\x38\x1b\x85\x42\x13\xe1\x64\x1d\x4c\x87\x9f\x3c\x40\xdf\x7b\xd5\xae\xc6\x7c\xec\xd7\x49\x35\x2f\x2b\x9d\x32\xbd\x93\x45\x73\x91\x34\xd4\x39\x1e\x96\x65\xeb\x82\x5a\xf3\xd8\xf1\x41\xce\x9c\xe6\x90\x7d\x6b\x29\x6\xc1\x3d\x4e\xe3\xdb\x48\x6c\x62\x72\x7f\xfe\xdd\xcf\xa1\x24\x4f\xc0\xd0\x3f\x2d\x5c\x78\x6f\x3b\x10\xef\xba\xb\x25\xd6\x1f\x58\x8c\xf8\xcc\xc2\x5\xb3\xfa\xa4\xac\x6e\xf5\x18\x2a\x26\x5e\xf4\x79\xb8\xc3\x16\xe2\xf2\x83\x30\x59\xda\xe9\x36\x7\x46\xa9\xde\x77\xd3\xa3\x98\x8\x1c\xe7\xee\x51\xe8\xfb\x2\xc4\xfd\xff\x22\xaf\x7e\xcb\x68\xc\x28\xe4\x63\xca\x70\x75\xb0\x74\xa7\xea\x20\x4\x4b\xa5\xb7\xf7\xfc\x4a\x47\xf0\xa8\x81\xbe\xe0\x66\x8e\x44\x54\x6d\x80\xb9\x95\x2e\xab\x8a\x1a\x94\xdc\x89\xb4\x5b\x9e\xd9\x8f\xa2\x43\x67\x3" }, { 0x538a20, "\x28\xeb\x74\xef\xb7\x73\x79\xd1\x46\xcc\xfb\x3b\x91\xc2\x16\xcb\x93\xaf\x51\x88\xb0\x5d\xfa\xfc\xc\xf\xc8\x4a\x53\x17\x8e\xec\x81\x36\xc6\xdc\xbc\x89\xa\x1f\x78\xdd\x76\x6c\x85\xd2\x13\xb9\x3a\x97\xde\x86\x3e\x12\xbe\x68\x23\x6a\x58\xce\xea\xe3\xa8\x5a\x8c\x3\x8a\x9d\xfe\xf3\x47\x63\xdf\x44\xaa\xd9\x24\xf0\x5b\xe2\x9c\xd3\xa9\x2e\xfd\x8b\xbd\xa4\x7a\x42\x5f\x4d\xa2\x48\x83\xcd\xe\x27\x61\xcf\xd\x50\x6f\x49\xae\xc7\x2f\x31\x39\x8f\x11\xdb\xad\x6b\x7f\xb6\x55\x62\x4c\x66\xc4\x75\xf6\x1b\xc1\xf1\x90\x95\x65\x9\xe0\xb4\xbf\xf4\x35\x37\x1c\x67\xe8\xf9\xe6\x56\x99\x22\xc0\xe9\x92\x21\xe1\x7d\x6e\x34\xd4\x8d\x96\x20\x52\xd0\x69\x2d\xf8\x7e\x4f\xb\xac\x71\xa3\xe5\x2a\xa5\xc5\x18\x5e\x6\xca\x2\x4b\x26\xf5\xab\x9f\xe7\x15\x3d\xd6\x4\x8\xee\xbb\x57\x0\x40\xd5\xa7\x1d\x45\xa6\x2c\xff\x9a\x32\x84\x1a\x14\xf7\x80\xd8\x43\x72\x7\x98\x38\x87\x33\xb1\x29\xb3\x7c\x30\xba\x94\xc9\x64\xe4\x1\x77\x3c\x2b\x82\x54\x6d\x9e\xf2\x3f\xed\xc3\x4e\x5c\x60\x70\x19\xa0\xb8\xda\x5\xb2\x10\x7b\x25\xb5\x9b\x59\x41\x1e\xa1\xd7" }, { 0x539320, "\x9c\x3b\xec\x3e\x7b\x79\x6f\x88\x42\xe6\xe1\x9b\xa3\xd\x83\x86\x7a\xfc\xc5\xb3\xdb\x7c\xf6\xa\xb7\xe7\x3c\x53\x28\x65\xf2\xa9\x6a\xf4\xef\x2c\x3d\xf8\xed\x6\xaf\x31\x75\xab\xf3\x73\xee\x20\x95\x1b\xe\x19\xa8\x5b\xa5\x66\x74\x85\x11\x60\x1e\x2a\x6c\x48\x50\x2f\x9a\x2e\x55\xaa\xcb\x64\x40\x4c\x25\xe9\xd0\xfd\x2d\x46\x8b\x81\x8d\xd2\x32\x4a\xc6\x7\xd6\xbf\xfb\x98\xd4\x76\x7e\xc\xfa\xde\x14\xa6\xd5\xe2\x90\xd1\xeb\xd3\x58\xbb\x5f\x94\xf7\x78\x54\x27\x52\xb6\x22\xea\x8c\xc8\x7d\x87\x12\x9d\xa1\x63\x38\xd8\x35\x2b\xc9\x56\x10\x9f\x1a\x2\xbe\xf1\x59\x17\x9e\xac\x5a\xb8\x1\xb5\x30\xad\xff\xe0\x49\xe8\x23\x4e\x6b\x16\xdc\x4f\x89\x68\x43\xc1\x99\x4\xa7\x33\x92\x84\xa4\x26\x34\x41\x1d\xb2\x91\x61\xc2\x51\x8f\x36\xfe\x5\xa2\xf9\xb\x13\x71\x82\x6e\x5d\xb4\xdf\xdd\x7f\xa0\xcd\x44\xc7\x70\x4d\xf0\x1c\x4b\x45\x57\x37\x3a\xcc\xf5\x8a\xd9\xe4\xbc\x15\xc3\x62\xc4\x39\x72\x47\x97\xbd\x8\xe5\x67\x18\xb1\x77\x8e\x1f\x9\xba\xf\xd7\xb0\x24\xce\xda\x0\x96\xca\x69\x3\x6d\x93\xae\xe3\x3f\x5c\xcf\xc0\xb9\x29\x80\x21\x5e" }, @@ -614,7 +614,7 @@ { 0x546398, "\x2f\x62\x9b\xe4\xee\xdb\x3f\x8d\xd3\xd7\x9c\x32\xd6\x4a\xca\x50\xe1\x8e\x6e\xf9\x99\xc5\x4e\xdf\x46\x5d\xd5\xb7\x6d\xb1\xb9\x7e\xf\xad\x44\x96\x13\x6c\x97\x26\xa8\x9f\x85\xde\xed\x56\xce\xda\xb0\xb\x1c\xb8\x3d\x5a\x1f\xdd\x84\xf3\xcd\x9e\x73\x28\x61\x8c\xbb\x69\x64\x4f\x0\x49\x3c\x75\xc3\x29\x8a\xe2\x4d\xc7\xcb\x10\xd\xe9\x7f\xc4\x60\x1b\x5f\xd1\x45\x42\x93\x59\xe8\x74\xff\x7a\x72\xea\xd4\xa\x3e\x7d\xc1\x31\xa4\x66\x92\xfd\xf6\x6b\x3b\xba\xbc\x19\x6a\x54\x4b\x38\x47\x43\x33\x91\x8b\xe\xae\x4\x76\x4c\xab\xc6\xbe\x36\xd0\xa0\x67\x90\x87\xf5\x9a\x77\xe6\xcf\xb2\x12\x22\x8\x37\x30\xaf\x16\x3\x58\xf1\xaa\x1e\x25\xeb\xf4\x21\xa9\xfe\x27\x83\xdc\x6\x2a\x48\x78\x68\xb4\xa7\x79\x9\x80\x81\xc8\x52\x17\xcc\x2d\x15\x94\x8f\xa1\x14\x98\xe7\xd9\x7b\xb6\x82\x5\xbf\x39\x88\xac\x86\xa2\xf8\xef\x23\x2e\x95\xd2\xa6\xf2\x2c\x3a\x2b\x65\x55\x18\xc9\x35\x57\x24\xd8\xec\xf7\xf0\xb3\x5b\x6f\xfb\x20\xbd\x5c\xfa\x71\x63\xc0\x1d\xe0\x53\x2\xa5\x7c\x51\x11\xb5\xfc\x1a\x5e\x9d\x40\x34\x1\x7\x89\xa3\xc\x70\xe5\xe3\x41\xc2" }, }; -struct buffer_t type_four_list[NUM_TYPE_FOURS]={ +static const struct buffer_t type_four_list[NUM_TYPE_FOURS]={ { 0x55f320, "\x39\x25\x29\x3c\x2b\x3a\x32\x23\x26\x24\x2d\x3d\x35\x2e\x3b\x38\x20\x27\x28\x22\x33\x3f\x2c\x3e\x36\x2a\x30\x2f\x21\x34\x31\x37\x00" }, { 0x55f340, "\x5f\x4b\x40\x5e\x43\x4e\x55\x41\x5a\x57\x5d\x5b\x51\x4f\x4a\x52\x53\x58\x42\x44\x49\x46\x4d\x47\x48\x45\x50\x59\x4c\x54\x56\x5c\x00" }, { 0x55f360, "\x7a\x7c\x6f\x6c\x60\x62\x73\x69\x71\x65\x6d\x72\x78\x6b\x64\x70\x74\x7b\x7e\x76\x67\x68\x63\x77\x79\x7f\x61\x6e\x75\x66\x6a\x7d\x00" }, @@ -663,7 +663,7 @@ { 0x55f380, "\x98\x88\x94\x97\x83\x90\x99\x84\x8d\x9c\x86\x9d\x9e\x92\x91\x8b\x8f\x82\x8e\x9b\x93\x85\x87\x96\x95\x8a\x8c\x9a\x80\x81\x9f\x89\x00" } }; -struct buffer_t type_five_list[NUM_TYPE_FIVES]={ +static const struct buffer_t type_five_list[NUM_TYPE_FIVES]={ { 0x55f3f8, "\xef\xe7\xf6\xfd\xeb\xf4\xec\xe2\xf7\xf9\xea\xe4\xf8\xff\xf5\xfa\xe8\xee\xfc\xe9\xe5\xfb\xe6\xe0\xfe\xed\xf2\xe1\xf1\xf0\xe3\xf3\x00" }, { 0x562948, "\x47\x41\x56\x59\x45\x40\x58\x48\x49\x57\x55\x54\x5a\x4c\x4f\x4d\x51\x5c\x53\x4a\x52\x5d\x5f\x5e\x50\x43\x42\x5b\x44\x46\x4b\x4e\x00" }, { 0x561258, "\x5b\x49\x5f\x43\x57\x4c\x54\x59\x5c\x5a\x51\x52\x5d\x4a\x5e\x47\x44\x56\x55\x4d\x40\x50\x58\x48\x46\x45\x4f\x41\x4b\x4e\x53\x42\x00" }, @@ -727,7 +727,7 @@ hash *= 0x9e3779b1; if (outer_loop > 1) { - auth_function_t *ft; + const auth_function_t *ft; int remainder; @@ -874,7 +874,7 @@ unsigned int yahoo_auth_finalCountdown(unsigned int challenge, int divisor, int inner_loop, int outer_loop) { - auth_function_t *ft; + const auth_function_t *ft; int remainder = challenge % divisor; diff -r 634014c941ec -r 852803694be3 libgaim/protocols/yahoo/yahoo_doodle.c --- a/libgaim/protocols/yahoo/yahoo_doodle.c Sat Oct 28 20:11:46 2006 +0000 +++ b/libgaim/protocols/yahoo/yahoo_doodle.c Sat Oct 28 20:38:25 2006 +0000 @@ -56,6 +56,7 @@ /****************************************************************************** * Globals *****************************************************************************/ +#if 0 const int DefaultColorRGB24[] = { DOODLE_COLOR_RED, @@ -72,6 +73,7 @@ DOODLE_COLOR_GREY, DOODLE_COLOR_WHITE }; +#endif /****************************************************************************** * Functions