1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
diff -ur /src/interface.c src/interface.c
--- src/interface.c 2004-02-06 21:48:39.000000000 +0100
+++ src/interface.c 2004-03-17 19:42:59.242466879 +0100
@@ -222,18 +222,19 @@
sp_ui_menu_key_press (GtkMenuItem *item, GdkEventKey *event, void *data)
{
if (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK)) {
- unsigned int shortcut, verb;
+ unsigned int shortcut;
+ unsigned long verb;
shortcut = event->keyval;
if (event->state & GDK_SHIFT_MASK) shortcut |= SP_SHORTCUT_SHIFT_MASK;
if (event->state & GDK_CONTROL_MASK) shortcut |= SP_SHORTCUT_CONTROL_MASK;
if (event->state & GDK_MOD1_MASK) shortcut |= SP_SHORTCUT_ALT_MASK;
- verb = (unsigned int) data;
+ verb = (unsigned long) data;
sp_shortcut_set_verb (shortcut, verb, TRUE);
}
}
static GtkWidget *
-sp_ui_menu_append_item_from_verb (GtkMenu *menu, unsigned int verb, unsigned int repeatable)
+sp_ui_menu_append_item_from_verb (GtkMenu *menu, unsigned long verb, unsigned int repeatable)
{
SPAction *action;
GtkWidget *item, *icon;
diff -ur src/libarikkei/arikkei-dict.c src/libarikkei/arikkei-dict.c
--- src/libarikkei/arikkei-dict.c 2003-11-17 23:16:48.000000000 +0100
+++ src/libarikkei/arikkei-dict.c 2004-03-17 19:42:59.239467287 +0100
@@ -27,7 +27,7 @@
void *val;
};
-static unsigned int
+static unsigned long
arikkei_string_hash (const void *data)
{
const unsigned char *p;
@@ -40,18 +40,18 @@
return hval;
}
-static unsigned int
+static unsigned long
arikkei_string_equal (const void *l, const void *r)
{
return !strcmp (l, r);
}
-static unsigned int
+static unsigned long
arikkei_pointer_hash (const void *data)
{
- unsigned int hval, p;
+ unsigned long hval, p;
hval = 0;
- p = (unsigned int) data;
+ p = (unsigned long) data;
while (p) {
hval ^= p;
p /= 17;
@@ -59,18 +59,18 @@
return hval;
}
-static unsigned int
+static unsigned long
arikkei_pointer_equal (const void *l, const void *r)
{
return l == r;
}
-static unsigned int
+static unsigned long
arikkei_int_hash (const void *data)
{
- unsigned int hval, p;
+ unsigned long hval, p;
hval = 0;
- p = (unsigned int) data;
+ p = (unsigned long) data;
while (p) {
hval ^= p;
p /= 17;
@@ -78,10 +78,10 @@
return hval;
}
-static unsigned int
+static unsigned long
arikkei_int_equal (const void *l, const void *r)
{
- return (unsigned int) l == (unsigned int) r;
+ return (unsigned long) l == (unsigned long) r;
}
void
diff -ur src/libarikkei/arikkei-dict.h src/libarikkei/arikkei-dict.h
--- src/libarikkei/arikkei-dict.h 2003-10-14 20:31:30.000000000 +0200
+++ src/libarikkei/arikkei-dict.h 2004-03-17 19:42:59.240467151 +0100
@@ -21,8 +21,8 @@
unsigned int hashsize;
ArikkeiDictEntry *entries;
int free;
- unsigned int (* hash) (const void *data);
- unsigned int (* equal) (const void *l, const void *r);
+ unsigned long (* hash) (const void *data);
+ unsigned long (* equal) (const void *l, const void *r);
};
void arikkei_dict_setup_string (ArikkeiDict *dict, unsigned int hashsize);
diff -ur src/selection-chemistry.c src/selection-chemistry.c
--- src/selection-chemistry.c 2004-01-20 16:19:29.000000000 +0100
+++ src/selection-chemistry.c 2004-03-17 19:42:59.242466879 +0100
@@ -64,7 +64,7 @@
dt = SP_ACTIVE_DESKTOP;
if (!dt) return;
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_SELECTION_TO_FRONT:
sp_selection_raise_to_top (dt);
break;
diff -ur src/shortcuts.c src/shortcuts.c
--- src/shortcuts.c 2004-02-06 21:42:04.000000000 +0100
+++ src/shortcuts.c 2004-03-17 19:42:59.241467015 +0100
@@ -109,11 +109,11 @@
static GHashTable *scdict = NULL;
void
-sp_shortcut_set_verb (unsigned int shortcut, unsigned int verb, unsigned int primary)
+sp_shortcut_set_verb (unsigned long shortcut, unsigned long verb, unsigned int primary)
{
- unsigned int ex;
+ unsigned long ex;
if (!scdict) scdict = g_hash_table_new (NULL, NULL);
- ex = (unsigned int) g_hash_table_lookup (scdict, (void *) shortcut);
+ ex = (unsigned long) g_hash_table_lookup (scdict, (void *) shortcut);
if (ex != verb) g_hash_table_insert (scdict, (void *) shortcut, (void *) verb);
if (primary) {
SPAction *action;
@@ -125,11 +125,11 @@
}
void
-sp_shortcut_remove_verb (unsigned int shortcut)
+sp_shortcut_remove_verb (unsigned long shortcut)
{
- unsigned int ex;
+ unsigned long ex;
if (!scdict) return;
- ex = (unsigned int) g_hash_table_lookup (scdict, (void *) shortcut);
+ ex = (unsigned long) g_hash_table_lookup (scdict, (void *) shortcut);
if (ex) {
SPAction *action;
g_hash_table_insert (scdict, (void *) shortcut, (void *) 0);
@@ -140,10 +140,10 @@
}
}
-unsigned int
-sp_shortcut_get_verb (unsigned int shortcut)
+unsigned long
+sp_shortcut_get_verb (unsigned long shortcut)
{
if (!scdict) return 0;
- return (unsigned int) g_hash_table_lookup (scdict, (void *) shortcut);;
+ return (unsigned long) g_hash_table_lookup (scdict, (void *) shortcut);;
}
diff -ur src/shortcuts.h src/shortcuts.h
--- src/shortcuts.h 2003-05-12 01:09:59.000000000 +0200
+++ src/shortcuts.h 2004-03-17 19:42:59.241467015 +0100
@@ -24,8 +24,8 @@
void sp_shortcut_table_load (const unsigned char *name);
-void sp_shortcut_set_verb (unsigned int shortcut, unsigned int verb, unsigned int primary);
-void sp_shortcut_remove_verb (unsigned int shortcut);
-unsigned int sp_shortcut_get_verb (unsigned int shortcut);
+void sp_shortcut_set_verb (unsigned long shortcut, unsigned long verb, unsigned int primary);
+void sp_shortcut_remove_verb (unsigned long shortcut);
+unsigned long sp_shortcut_get_verb (unsigned long shortcut);
#endif
diff -ur src/verbs.c src/verbs.c
--- src/verbs.c 2004-02-06 21:41:13.000000000 +0100
+++ src/verbs.c 2004-03-17 19:42:59.240467151 +0100
@@ -67,7 +67,7 @@
sp_verb_action_set_shortcut (SPAction *action, unsigned int shortcut, void *data)
{
unsigned int verb, ex;
- verb = (unsigned int) data;
+ verb = (unsigned long) data;
ex = sp_shortcut_get_verb (shortcut);
if (verb != ex) sp_shortcut_set_verb (shortcut, verb, FALSE);
}
@@ -76,7 +76,7 @@
sp_verb_action_file_perform (SPAction *action, void *config, void *data)
{
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_FILE_NEW:
sp_file_new ();
break;
@@ -125,7 +125,7 @@
dt = SP_ACTIVE_DESKTOP;
if (!dt) return;
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_EDIT_UNDO:
sp_document_undo (SP_DT_DOCUMENT (dt));
break;
@@ -177,7 +177,7 @@
center.x = 0.5 * (bbox.x0 + bbox.x1);
center.y = 0.5 * (bbox.y0 + bbox.y1);
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_OBJECT_ROTATE_90:
sp_selection_rotate_90 ();
break;
@@ -209,13 +209,13 @@
dt = SP_ACTIVE_DESKTOP;
if (!dt) return;
- verb = (unsigned int) data;
+ verb = (unsigned long) data;
for (vidx = SP_VERB_CONTEXT_SELECT; vidx <= SP_VERB_CONTEXT_DROPPER; vidx++) {
sp_action_set_active (&verb_actions[vidx], vidx == verb);
}
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_CONTEXT_SELECT:
sp_desktop_set_event_context (dt, SP_TYPE_SELECT_CONTEXT, "tools.select");
/* fixme: This is really ugly hack. We should bind and unbind class methods */
@@ -291,7 +291,7 @@
dt = SP_ACTIVE_DESKTOP;
if (!dt) return;
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_ZOOM_IN:
sp_desktop_get_display_area (dt, &d);
sp_desktop_zoom_relative (dt, (d.x0 + d.x1) / 2, (d.y0 + d.y1) / 2, SP_DESKTOP_ZOOM_INC);
@@ -329,7 +329,7 @@
static void
sp_verb_action_dialog_perform (SPAction *action, void *config, void *data)
{
- switch ((int) data) {
+ switch ((long) data) {
case SP_VERB_DIALOG_DISPLAY:
sp_display_dialog ();
break;
@@ -487,7 +487,7 @@
static void
sp_verbs_init (void)
{
- int v;
+ long v;
verb_actions = nr_new (SPAction, SP_VERB_LAST);
for (v = 0; v < SP_VERB_LAST; v++) {
assert (props[v].code == v);
--- src/libnr/nr-svp.c.ORG 2004-01-29 00:03:14.000000000 +0100
+++ src/libnr/nr-svp.c 2004-03-19 11:40:32.507553077 +0100
@@ -70,6 +70,9 @@
svl = sl;
}
+ if (!nsegs)
+ return NULL;
+
svp = malloc (sizeof (NRSVP) + (nsegs - 1) * sizeof (NRSVPSegment));
svp->length = nsegs;
if (nsegs > 0) {
--- src/libnrtype/nr-type-xft.c 2003-12-15 15:38:21.000000000 -0700
+++ src/libnrtype/nr-type-xft.c 2004-08-14 18:46:45.108908800 -0700
@@ -186,7 +186,7 @@
/* Get typeface list */
#ifdef WITH_FONTCONFIG
- obj = FcObjectSetBuild (FC_SCALABLE, FC_OUTLINE, FC_FAMILY, FC_WEIGHT, FC_SLANT, FC_FILE, FC_INDEX, 0);
+ obj = FcObjectSetBuild (FC_SCALABLE, FC_OUTLINE, FC_FAMILY, FC_WEIGHT, FC_SLANT, FC_FILE, FC_INDEX, NULL);
NRXftPatterns = FcFontList (cfg, pat, obj);
FcObjectSetDestroy (obj);
#else
|