comparison pidgin/gtkimhtml.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 77e0fa7c5bdd
children 44a6eeaabd80
comparison
equal deleted inserted replaced
21014:0314cb293463 21015:787b3897ba9f
111 static void imhtml_clear_formatting(GtkIMHtml *imhtml); 111 static void imhtml_clear_formatting(GtkIMHtml *imhtml);
112 112
113 /* POINT_SIZE converts from AIM font sizes to a point size scale factor. */ 113 /* POINT_SIZE converts from AIM font sizes to a point size scale factor. */
114 #define MAX_FONT_SIZE 7 114 #define MAX_FONT_SIZE 7
115 #define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SIZE) - 1]) 115 #define POINT_SIZE(x) (_point_sizes [MIN ((x > 0 ? x : 1), MAX_FONT_SIZE) - 1])
116 static gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736}; 116 static const gdouble _point_sizes [] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736};
117 117
118 enum { 118 enum {
119 TARGET_HTML, 119 TARGET_HTML,
120 TARGET_UTF8_STRING, 120 TARGET_UTF8_STRING,
121 TARGET_COMPOUND_TEXT, 121 TARGET_COMPOUND_TEXT,
138 138
139 static char *html_clipboard = NULL; 139 static char *html_clipboard = NULL;
140 static char *text_clipboard = NULL; 140 static char *text_clipboard = NULL;
141 static GtkClipboard *clipboard_selection = NULL; 141 static GtkClipboard *clipboard_selection = NULL;
142 142
143 static GtkTargetEntry selection_targets[] = { 143 static const GtkTargetEntry selection_targets[] = {
144 #ifndef _WIN32 144 #ifndef _WIN32
145 { "text/html", 0, TARGET_HTML }, 145 { "text/html", 0, TARGET_HTML },
146 #else 146 #else
147 { "HTML Format", 0, TARGET_HTML }, 147 { "HTML Format", 0, TARGET_HTML },
148 #endif 148 #endif
149 { "UTF8_STRING", 0, TARGET_UTF8_STRING }, 149 { "UTF8_STRING", 0, TARGET_UTF8_STRING },
150 { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT }, 150 { "COMPOUND_TEXT", 0, TARGET_COMPOUND_TEXT },
151 { "STRING", 0, TARGET_STRING }, 151 { "STRING", 0, TARGET_STRING },
152 { "TEXT", 0, TARGET_TEXT}}; 152 { "TEXT", 0, TARGET_TEXT}};
153 153
154 static GtkTargetEntry link_drag_drop_targets[] = { 154 static const GtkTargetEntry link_drag_drop_targets[] = {
155 GTK_IMHTML_DND_TARGETS 155 GTK_IMHTML_DND_TARGETS
156 }; 156 };
157 157
158 #ifdef _WIN32 158 #ifdef _WIN32
159 static gchar * 159 static gchar *