Added gtkhtml,libhildonhelp and maemopad
[oespirit1] / gtkhtml / gtkhtml_140_const_patch.diff
1 # Declare some variables as const to silence the compiler
2 #
3 # Copyright (C) 2006 - 2007 Nokia Corporation.
4 # This file is distributed under the terms of GNU LGPL license, either version 2
5 # of the License, or (at your option) any later version.
6 #
7 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml.c gtkhtml-3.24.4/gtkhtml/gtkhtml.c
8 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml.c gtkhtml-3.24.4/gtkhtml/gtkhtml.c
9 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml.c gtkhtml-3.24.4/gtkhtml/gtkhtml.c
10 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml.c gtkhtml-3.24.4/gtkhtml/gtkhtml.c
11 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:29:01.000000000 +0200
12 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:29:01.000000000 +0200
13 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:29:01.000000000 +0200
14 --- gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:29:01.000000000 +0200
15 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:44:08.000000000 +0200
16 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:44:08.000000000 +0200
17 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:44:08.000000000 +0200
18 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml.c    2007-02-16 16:44:08.000000000 +0200
19 @@ -92,7 +92,7 @@
20         DND_TARGET_TYPE_STRING,
21  };
22  
23 -static GtkTargetEntry dnd_link_sources [] = {
24 +static const GtkTargetEntry dnd_link_sources [] = {
25         { "message/rfc822", 0, DND_TARGET_TYPE_MESSAGE_RFC822 },
26         { "x-uid-list", 0, DND_TARGET_TYPE_X_UID_LIST },
27         { "text/uri-list", 0, DND_TARGET_TYPE_TEXT_URI_LIST },
28 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c
29 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c
30 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c
31 diff -ru gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c
32 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-12 08:57:38.000000000 +0200
33 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-12 08:57:38.000000000 +0200
34 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-12 08:57:38.000000000 +0200
35 --- gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-12 08:57:38.000000000 +0200
36 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-16 16:44:08.000000000 +0200
37 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-16 16:44:08.000000000 +0200
38 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-16 16:44:08.000000000 +0200
39 +++ gtkhtml-3.24.4/gtkhtml/gtkhtml-properties.c 2007-02-16 16:44:08.000000000 +0200
40 @@ -136,7 +136,7 @@
41  
42  /* enums */
43  
44 -static GEnumValue _gtk_html_cursor_skip_values[] = {
45 +static const GEnumValue _gtk_html_cursor_skip_values[] = {
46         { GTK_HTML_CURSOR_SKIP_ONE,  "GTK_HTML_CURSOR_SKIP_ONE",  "one" },
47         { GTK_HTML_CURSOR_SKIP_WORD, "GTK_HTML_CURSOR_SKIP_WORD", "word" },
48         { GTK_HTML_CURSOR_SKIP_PAGE, "GTK_HTML_CURSOR_SKIP_WORD", "page" },
49 @@ -155,7 +155,7 @@
50         return cursor_skip_type;
51  }
52  
53 -static GEnumValue _gtk_html_command_values[] = {
54 +static const GEnumValue _gtk_html_command_values[] = {
55         { GTK_HTML_COMMAND_UNDO,  "GTK_HTML_COMMAND_UNDO",  "undo" },
56         { GTK_HTML_COMMAND_REDO,  "GTK_HTML_COMMAND_REDO",  "redo" },
57         { GTK_HTML_COMMAND_COPY,  "GTK_HTML_COMMAND_COPY",  "copy" },
58 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c
59 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c
60 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c
61 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c
62 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-09 21:54:58.000000000 +0200
63 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-09 21:54:58.000000000 +0200
64 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-09 21:54:58.000000000 +0200
65 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-09 21:54:58.000000000 +0200
66 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-16 16:44:08.000000000 +0200
67 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-16 16:44:08.000000000 +0200
68 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-16 16:44:08.000000000 +0200
69 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cursor.c     2007-02-16 16:44:08.000000000 +0200
70 @@ -35,18 +35,18 @@
71  
72  #define BLINK_TIMEOUT 500
73  
74 -static GdkColor table_stipple_active_on      = { 0, 0,      0,      0xffff };
75 -static GdkColor table_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
76 -static GdkColor table_stipple_non_active_on  = { 0, 0xaaaa, 0xaaaa, 0xaaaa };
77 -static GdkColor table_stipple_non_active_off = { 0, 0xffff, 0xffff, 0xffff };
78 -
79 -static GdkColor cell_stipple_active_on      = { 0, 0x7fff, 0x7fff, 0 };
80 -static GdkColor cell_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
81 -static GdkColor cell_stipple_non_active_on  = { 0, 0x7aaa, 0x7aaa, 0x7aaa };
82 -static GdkColor cell_stipple_non_active_off = { 0, 0xffff, 0xffff, 0xffff };
83 +static const GdkColor table_stipple_active_on      = { 0, 0,      0,      0xffff };
84 +static const GdkColor table_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
85 +static const GdkColor table_stipple_non_active_on  = { 0, 0xaaaa, 0xaaaa, 0xaaaa };
86 +static const GdkColor table_stipple_non_active_off = { 0, 0xffff, 0xffff, 0xffff };
87 +
88 +static const GdkColor cell_stipple_active_on      = { 0, 0x7fff, 0x7fff, 0 };
89 +static const GdkColor cell_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
90 +static const GdkColor cell_stipple_non_active_on  = { 0, 0x7aaa, 0x7aaa, 0x7aaa };
91 +static const GdkColor cell_stipple_non_active_off = { 0, 0xffff, 0xffff, 0xffff };
92  
93 -static GdkColor image_stipple_active_on      = { 0, 0xffff, 0,      0 };
94 -static GdkColor image_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
95 +static const GdkColor image_stipple_active_on      = { 0, 0xffff, 0,      0 };
96 +static const GdkColor image_stipple_active_off     = { 0, 0xffff, 0xffff, 0xffff };
97  
98  void
99  html_engine_hide_cursor  (HTMLEngine *engine)
100 @@ -110,7 +110,7 @@
101  
102  static void
103  draw_cursor_rectangle (HTMLEngine *e, gint x1, gint y1, gint x2, gint y2,
104 -                      GdkColor *on_color, GdkColor *off_color,
105 +                      const GdkColor *on_color, const GdkColor *off_color,
106                        gint offset)
107  {
108         GdkGC *gc;
109 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c
110 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c
111 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c
112 diff -ru gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c
113 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-01-03 17:19:57.000000000 +0200
114 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-01-03 17:19:57.000000000 +0200
115 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-01-03 17:19:57.000000000 +0200
116 --- gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-01-03 17:19:57.000000000 +0200
117 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-02-16 16:44:08.000000000 +0200
118 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-02-16 16:44:08.000000000 +0200
119 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-02-16 16:44:08.000000000 +0200
120 +++ gtkhtml-3.24.4/gtkhtml/htmlengine-edit-cut-and-paste.c      2007-02-16 16:44:08.000000000 +0200
121 @@ -1253,9 +1253,9 @@
122         html_engine_thaw (e);
123  }
124  
125 -static char *picto_chars = "DO)(|/PQ\0:-\0:\0:-\0:\0:;=-\0:;\0:-~\0:\0:\0:-\0:\0:-\0:\0:-\0:\0:-\0:\0";
126 -static gint picto_states [] = { 9, 14, 19, 27, 35, 40, 45, 50, 0, -1, 12, 0, -1, 0, -2, 17, 0, -2, 0, -3, -4, -5, 24, 0, -3, -4, 0, -6, 31, 33, 0, -6, 0, -11, 0, -8, 38, 0, -8, 0, -9, 43, 0, -9, 0, -10, 48, 0, -10, 0, -12, 53, 0, -12, 0};
127 -static gchar *picto_icon_names [] = {
128 +static const char *picto_chars = "DO)(|/PQ\0:-\0:\0:-\0:\0:;=-\0:;\0:-~\0:\0:\0:-\0:\0:-\0:\0:-\0:\0:-\0:\0";
129 +static const gint picto_states [] = { 9, 14, 19, 27, 35, 40, 45, 50, 0, -1, 12, 0, -1, 0, -2, 17, 0, -2, 0, -3, -4, -5, 24, 0, -3, -4, 0, -6, 31, 33, 0, -6, 0, -11, 0, -8, 38, 0, -8, 0, -9, 43, 0, -9, 0, -10, 48, 0, -10, 0, -12, 53, 0, -12, 0};
130 +static const gchar *picto_icon_names [] = {
131         "stock_smiley-6",
132         "stock_smiley-5",
133         "stock_smiley-1",
134 diff -ru gtkhtml-3.24.4/gtkhtml/htmlentity.c gtkhtml-3.24.4/gtkhtml/htmlentity.c
135 diff -ru gtkhtml-3.24.4/gtkhtml/htmlentity.c gtkhtml-3.24.4/gtkhtml/htmlentity.c
136 diff -ru gtkhtml-3.24.4/gtkhtml/htmlentity.c gtkhtml-3.24.4/gtkhtml/htmlentity.c
137 diff -ru gtkhtml-3.24.4/gtkhtml/htmlentity.c gtkhtml-3.24.4/gtkhtml/htmlentity.c
138 --- gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-01-03 17:19:57.000000000 +0200
139 --- gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-01-03 17:19:57.000000000 +0200
140 --- gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-01-03 17:19:57.000000000 +0200
141 --- gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-01-03 17:19:57.000000000 +0200
142 +++ gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-02-16 16:44:08.000000000 +0200
143 +++ gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-02-16 16:44:08.000000000 +0200
144 +++ gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-02-16 16:44:08.000000000 +0200
145 +++ gtkhtml-3.24.4/gtkhtml/htmlentity.c 2007-02-16 16:44:08.000000000 +0200
146 @@ -37,7 +37,10 @@
147  };
148  typedef struct _EntityEntry EntityEntry;
149  
150 -static EntityEntry entity_table[] = {
151 +/* FIXME: why not just sort these and use bsearch() instead of creating
152 + * an additional glib hash table?
153 + */
154 +static const EntityEntry entity_table[] = {
155  
156         /* Latin1 */
157         { 160,  "nbsp" },