Mercurial > hg > xemacs-beta
comparison lisp/gtk-marshal.el @ 608:4d7fdf497470
[xemacs-hg @ 2001-06-04 16:59:51 by wmperry]
2001-06-04 William M. Perry <wmperry@gnu.org>
* gpmevent.c (KG_CTRL): Just define these unconditionally. The
linux headers are so lame that they do not expose these to
userland programs and you cannot gracefully include the kernel
headers.
2001-06-03 William M. Perry <wmperry@gnu.org>
* scrollbar-gtk.c (gtk_create_scrollbar_instance): Make calling of
gtk_size_request unconditional.
2001-06-02 William M. Perry <wmperry@gnu.org>
* emacs-marshals.c: Regenerated.
2001-06-01 William M. Perry <wmperry@gnu.org>
* glyphs-shared.c (read_bitmap_data): Common definition of
read_bitmap_data_from_file added. This does not attempt to use
the Xmu based code at all - lets us be consistent across
platforms.
* glyphs-gtk.c: Removed definition of read_bitmap_data_from_file -
this is now in glyphs-shared.c
* glyphs-msw.c: Ditto.
* glyphs-x.c: Ditto.
2001-06-03 William M. Perry <wmperry@gnu.org>
* dialog-gtk.el (popup-builtin-open-dialog): Yikes - don't forget
to return the filename!
* font.el (font-window-system-mappings): Add gtk entry - just an
alias to the X code)
2001-06-02 William M. Perry <wmperry@gnu.org>
* gtk-marshal.el: Fix for removing of the string_hash utility
functions in hash.c
author | wmperry |
---|---|
date | Mon, 04 Jun 2001 17:00:02 +0000 |
parents | ec73ae6e772b |
children | ee2d33cfc3c1 |
comparison
equal
deleted
inserted
replaced
607:9979b8030c99 | 608:4d7fdf497470 |
---|---|
255 ) | 255 ) |
256 (mapc (lambda (x) (apply 'define-marshaller x)) todo) | 256 (mapc (lambda (x) (apply 'define-marshaller x)) todo) |
257 | 257 |
258 (insert "\n | 258 (insert "\n |
259 #include \"hash.h\" | 259 #include \"hash.h\" |
260 static c_hashtable marshaller_hashtable; | 260 static int |
261 our_string_eq (const void *st1, const void *st2) | |
262 { | |
263 if (!st1) | |
264 return st2 ? 0 : 1; | |
265 else if (!st2) | |
266 return 0; | |
267 else | |
268 return !strcmp ( (const char *) st1, (const char *) st2); | |
269 } | |
270 | |
271 unsigned long | |
272 our_string_hash (const void *xv) | |
273 { | |
274 unsigned int h = 0; | |
275 unsigned const char *x = (unsigned const char *) xv; | |
276 | |
277 if (!x) return 0; | |
278 | |
279 while (*x) | |
280 { | |
281 unsigned int g; | |
282 h = (h << 4) + *x++; | |
283 if ((g = h & 0xf0000000) != 0) | |
284 h = (h ^ (g >> 24)) ^ g; | |
285 } | |
286 | |
287 return h; | |
288 } | |
289 | |
290 static struct hash_table *marshaller_hashtable; | |
261 | 291 |
262 static void initialize_marshaller_storage (void) | 292 static void initialize_marshaller_storage (void) |
263 { | 293 { |
264 if (!marshaller_hashtable) | 294 if (!marshaller_hashtable) |
265 { | 295 { |
266 marshaller_hashtable = make_strings_hashtable (100); | 296 marshaller_hashtable = make_general_hash_table (100, our_string_hash, our_string_eq); |
267 ") | 297 ") |
268 | 298 |
269 (mapc (lambda (x) | 299 (mapc (lambda (x) |
270 (let ((name (get-marshaller-name (car x) (cdr x)))) | 300 (let ((name (get-marshaller-name (car x) (cdr x)))) |
271 (insert (format "\t\tputhash (\"%s\", (void *) %s, marshaller_hashtable);\n" name name)))) | 301 (insert (format "\t\tputhash (\"%s\", (void *) %s, marshaller_hashtable);\n" name name)))) |