5 _bdf_add_property(bdf_font_t *font, char *name, char *value)
8 + unsigned long propid;
11 bdf_property_t *prop, *fp;
13 * The property already exists in the font, so simply replace
14 * the value of the property with the current value.
16 - fp = font->props + (unsigned int) hn->data;
17 + fp = font->props + (unsigned long) hn->data;
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);
32 * Add the property to the font property table.
34 - hash_insert(fp->name, (void *) font->props_used,
35 + hash_insert(fp->name, (void *) ((unsigned long) font->props_used),
36 (hashtable *) font->internal);
50 bdf_create_property(char *name, int format)
58 bdf_get_property(char *name)
61 - unsigned int propid;
62 + unsigned long propid;
64 if (name == 0 || *name == 0)
67 if ((hn = hash_lookup(name, &proptbl)) == 0)
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;
76 bdf_add_font_property(bdf_font_t *font, bdf_property_t *property)
79 - unsigned int propid;
80 + unsigned long propid;
82 bdf_property_t *p, *ip;
85 * If the property exists and is a user defined property, make sure
86 * its format is updated to match the property being added.
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)
95 * Changing an existing property value.
97 - p = font->props + ((unsigned int) hn->data);
98 + p = font->props + ((unsigned long) hn->data);
101 * If the format changed, then free the atom value if the original
102 @@ -3433,7 +3433,7 @@
103 * name of the property.
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);
111 @@ -3480,7 +3480,7 @@
113 * Now insert it into the internal hash table.
115 - hash_insert(p->name, (void *) font->props_used,
116 + hash_insert(p->name, (void *) ((unsigned long) font->props_used),
117 (hashtable *) font->internal);
120 @@ -3552,7 +3552,7 @@
121 bdf_delete_font_property(bdf_font_t *font, char *name)
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)
133 - off = (unsigned int) hn->data;
134 + off = (unsigned long) hn->data;
135 p = font->props + off;
138 @@ -3616,7 +3616,7 @@
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;
149 @@ -1858,7 +1858,7 @@
151 * Now set up a file name.
153 - sprintf(buffer1, "%.*s.bdf", dot - file, file);
154 + sprintf(buffer1, "%.*s.bdf", (int) (dot - file), file);
157 * Delete the file and path names so they can be updated.