]>
Commit | Line | Data |
---|---|---|
f34f4e07 TP |
1 | --- bdf.c |
2 | +++ bdf.c | |
3 | @@ -1092,7 +1092,7 @@ | |
4 | static void | |
5 | _bdf_add_property(bdf_font_t *font, char *name, char *value) | |
6 | { | |
7 | - unsigned int propid; | |
8 | + unsigned long propid; | |
9 | hashnode hn; | |
10 | int len; | |
11 | bdf_property_t *prop, *fp; | |
12 | @@ -1105,7 +1105,7 @@ | |
13 | * The property already exists in the font, so simply replace | |
14 | * the value of the property with the current value. | |
15 | */ | |
16 | - fp = font->props + (unsigned int) hn->data; | |
17 | + fp = font->props + (unsigned long) hn->data; | |
18 | ||
19 | switch (fp->format) { | |
20 | case BDF_ATOM: | |
21 | @@ -1159,7 +1159,7 @@ | |
22 | font->props_size++; | |
23 | } | |
24 | ||
25 | - propid = (unsigned int) hn->data; | |
26 | + propid = (unsigned long) hn->data; | |
27 | if (propid >= _num_bdf_properties) | |
28 | prop = user_props + (propid - _num_bdf_properties); | |
29 | else | |
30 | @@ -1199,7 +1199,7 @@ | |
31 | /* | |
32 | * Add the property to the font property table. | |
33 | */ | |
34 | - hash_insert(fp->name, (void *) font->props_used, | |
35 | + hash_insert(fp->name, (void *) ((unsigned long) font->props_used), | |
36 | (hashtable *) font->internal); | |
37 | ||
38 | font->props_used++; | |
39 | @@ -1883,7 +1883,7 @@ | |
40 | void | |
41 | bdf_setup(void) | |
42 | { | |
43 | - unsigned int i; | |
44 | + unsigned long i; | |
45 | bdf_property_t *prop; | |
46 | ||
47 | hash_init(&proptbl); | |
48 | @@ -3206,7 +3206,7 @@ | |
49 | void | |
50 | bdf_create_property(char *name, int format) | |
51 | { | |
52 | - unsigned int n; | |
53 | + unsigned long n; | |
54 | bdf_property_t *p; | |
55 | ||
56 | /* | |
57 | @@ -3243,7 +3243,7 @@ | |
58 | bdf_get_property(char *name) | |
59 | { | |
60 | hashnode hn; | |
61 | - unsigned int propid; | |
62 | + unsigned long propid; | |
63 | ||
64 | if (name == 0 || *name == 0) | |
65 | return 0; | |
66 | @@ -3251,7 +3251,7 @@ | |
67 | if ((hn = hash_lookup(name, &proptbl)) == 0) | |
68 | return 0; | |
69 | ||
70 | - propid = (unsigned int) hn->data; | |
71 | + propid = (unsigned long) hn->data; | |
72 | if (propid >= _num_bdf_properties) | |
73 | return user_props + (propid - _num_bdf_properties); | |
74 | return _bdf_properties + propid; | |
75 | @@ -3333,7 +3333,7 @@ | |
76 | bdf_add_font_property(bdf_font_t *font, bdf_property_t *property) | |
77 | { | |
78 | int len; | |
79 | - unsigned int propid; | |
80 | + unsigned long propid; | |
81 | hashnode hn; | |
82 | bdf_property_t *p, *ip; | |
83 | ||
84 | @@ -3360,7 +3360,7 @@ | |
85 | * If the property exists and is a user defined property, make sure | |
86 | * its format is updated to match the property being added. | |
87 | */ | |
88 | - propid = (unsigned int) hn->data; | |
89 | + propid = (unsigned long) hn->data; | |
90 | if (propid >= _num_bdf_properties) { | |
91 | p = user_props + (propid - _num_bdf_properties); | |
92 | if (p->format != property->format) | |
93 | @@ -3376,7 +3376,7 @@ | |
94 | /* | |
95 | * Changing an existing property value. | |
96 | */ | |
97 | - p = font->props + ((unsigned int) hn->data); | |
98 | + p = font->props + ((unsigned long) hn->data); | |
99 | ||
100 | /* | |
101 | * If the format changed, then free the atom value if the original | |
102 | @@ -3433,7 +3433,7 @@ | |
103 | * name of the property. | |
104 | */ | |
105 | hn = hash_lookup(property->name, &proptbl); | |
106 | - propid = (unsigned int) hn->data; | |
107 | + propid = (unsigned long) hn->data; | |
108 | if (propid >= _num_bdf_properties) | |
109 | ip = user_props + (propid - _num_bdf_properties); | |
110 | else | |
111 | @@ -3480,7 +3480,7 @@ | |
112 | /* | |
113 | * Now insert it into the internal hash table. | |
114 | */ | |
115 | - hash_insert(p->name, (void *) font->props_used, | |
116 | + hash_insert(p->name, (void *) ((unsigned long) font->props_used), | |
117 | (hashtable *) font->internal); | |
118 | font->props_used++; | |
119 | } | |
120 | @@ -3552,7 +3552,7 @@ | |
121 | bdf_delete_font_property(bdf_font_t *font, char *name) | |
122 | { | |
123 | hashnode hn; | |
124 | - unsigned int off; | |
125 | + unsigned long off; | |
126 | bdf_property_t *p; | |
127 | ||
128 | if (font == 0 || name == 0 || *name == 0 || font->props_used == 0) | |
129 | @@ -3561,7 +3561,7 @@ | |
130 | if ((hn = hash_lookup(name, (hashtable *) font->internal)) == 0) | |
131 | return; | |
132 | ||
133 | - off = (unsigned int) hn->data; | |
134 | + off = (unsigned long) hn->data; | |
135 | p = font->props + off; | |
136 | ||
137 | /* | |
138 | @@ -3616,7 +3616,7 @@ | |
139 | return 0; | |
140 | ||
141 | hn = hash_lookup(name, (hashtable *) font->internal); | |
142 | - return (hn) ? (font->props + ((unsigned int) hn->data)) : 0; | |
143 | + return (hn) ? (font->props + ((unsigned long) hn->data)) : 0; | |
144 | } | |
145 | ||
146 | typedef struct { | |
147 | --- guifile.c | |
148 | +++ guifile.c | |
149 | @@ -1858,7 +1858,7 @@ | |
150 | /* | |
151 | * Now set up a file name. | |
152 | */ | |
153 | - sprintf(buffer1, "%.*s.bdf", dot - file, file); | |
154 | + sprintf(buffer1, "%.*s.bdf", (int) (dot - file), file); | |
155 | ||
156 | /* | |
157 | * Delete the file and path names so they can be updated. |