comparison src/emacs-marshals.c @ 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 ea7687dc2b34
children 2923009caf47
comparison
equal deleted inserted replaced
607:9979b8030c99 608:4d7fdf497470
1454 *return_val = (*rfunc) (); 1454 *return_val = (*rfunc) ();
1455 } 1455 }
1456 1456
1457 1457
1458 #include "hash.h" 1458 #include "hash.h"
1459 static c_hashtable marshaller_hashtable; 1459 static int
1460 our_string_eq (const void *st1, const void *st2)
1461 {
1462 if (!st1)
1463 return st2 ? 0 : 1;
1464 else if (!st2)
1465 return 0;
1466 else
1467 return !strcmp ( (const char *) st1, (const char *) st2);
1468 }
1469
1470 unsigned long
1471 our_string_hash (const void *xv)
1472 {
1473 unsigned int h = 0;
1474 unsigned const char *x = (unsigned const char *) xv;
1475
1476 if (!x) return 0;
1477
1478 while (*x)
1479 {
1480 unsigned int g;
1481 h = (h << 4) + *x++;
1482 if ((g = h & 0xf0000000) != 0)
1483 h = (h ^ (g >> 24)) ^ g;
1484 }
1485
1486 return h;
1487 }
1488
1489 static struct hash_table *marshaller_hashtable;
1460 1490
1461 static void initialize_marshaller_storage (void) 1491 static void initialize_marshaller_storage (void)
1462 { 1492 {
1463 if (!marshaller_hashtable) 1493 if (!marshaller_hashtable)
1464 { 1494 {
1465 marshaller_hashtable = make_strings_hashtable (100); 1495 marshaller_hashtable = make_general_hash_table (100, our_string_hash, our_string_eq);
1466 puthash ("emacs_gtk_marshal_BOOL__OBJECT_INT", (void *) emacs_gtk_marshal_BOOL__OBJECT_INT, marshaller_hashtable); 1496 puthash ("emacs_gtk_marshal_BOOL__OBJECT_INT", (void *) emacs_gtk_marshal_BOOL__OBJECT_INT, marshaller_hashtable);
1467 puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT", (void *) emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT, marshaller_hashtable); 1497 puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT", (void *) emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT, marshaller_hashtable);
1468 puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT", (void *) emacs_gtk_marshal_BOOL__OBJECT_OBJECT, marshaller_hashtable); 1498 puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT", (void *) emacs_gtk_marshal_BOOL__OBJECT_OBJECT, marshaller_hashtable);
1469 puthash ("emacs_gtk_marshal_BOOL__OBJECT_POINTER", (void *) emacs_gtk_marshal_BOOL__OBJECT_POINTER, marshaller_hashtable); 1499 puthash ("emacs_gtk_marshal_BOOL__OBJECT_POINTER", (void *) emacs_gtk_marshal_BOOL__OBJECT_POINTER, marshaller_hashtable);
1470 puthash ("emacs_gtk_marshal_BOOL__OBJECT_STRING", (void *) emacs_gtk_marshal_BOOL__OBJECT_STRING, marshaller_hashtable); 1500 puthash ("emacs_gtk_marshal_BOOL__OBJECT_STRING", (void *) emacs_gtk_marshal_BOOL__OBJECT_STRING, marshaller_hashtable);