Mercurial > hg > xemacs-beta
diff src/menubar-gtk.c @ 2054:91d4c8c65a0f
[xemacs-hg @ 2004-05-02 04:06:51 by malcolmp]
Fix warnings and errors when building GTK using C++ and --use-union-type.
author | malcolmp |
---|---|
date | Sun, 02 May 2004 04:07:01 +0000 |
parents | b0c1d9dc4b08 |
children | e8db6a10ad42 |
line wrap: on
line diff
--- a/src/menubar-gtk.c Sat May 01 21:50:40 2004 +0000 +++ b/src/menubar-gtk.c Sun May 02 04:07:01 2004 +0000 @@ -153,7 +153,7 @@ GtkWidget * gtk_xemacs_menubar_new (struct frame *f) { - GtkXEmacsMenubar *menubar = gtk_type_new (gtk_xemacs_menubar_get_type ()); + GtkXEmacsMenubar *menubar = (GtkXEmacsMenubar*) gtk_type_new (gtk_xemacs_menubar_get_type ()); menubar->frame = f; @@ -173,7 +173,7 @@ /* Converting from XEmacs to GTK representation */ static Lisp_Object -menu_name_to_accelerator (char *name) +menu_name_to_accelerator (Ibyte *name) { while (*name) { if (*name=='%') { @@ -182,7 +182,7 @@ return Qnil; if (*name=='_' && *(name+1)) { - int accelerator = (int) (unsigned char) (*(name+1)); + int accelerator = (int) (*(name+1)); return make_char (tolower (accelerator)); } } @@ -356,9 +356,9 @@ } static char * -remove_underscores(const char *name) +remove_underscores(const Ibyte* name) { - char *rval = xmalloc_and_zero (strlen(name) + 1); + char *rval = (char*) xmalloc_and_zero (strlen((char*) name) + 1); int i,j; for (i = 0, j = 0; name[i]; i++) @@ -698,18 +698,18 @@ if (!separator_string_p (XSTRING_DATA (name))) { - char *label_buffer = NULL; + Ibyte *label_buffer = NULL; char *temp_label = NULL; if (STRINGP (suffix) && XSTRING_LENGTH (suffix)) { - label_buffer = ALLOCA (XSTRING_LENGTH (name) + 15 + XSTRING_LENGTH (suffix)); - sprintf (label_buffer, "%s %s ", XSTRING_DATA (name), XSTRING_DATA (suffix)); + label_buffer = (Ibyte*) ALLOCA (XSTRING_LENGTH (name) + 15 + XSTRING_LENGTH (suffix)); + sprintf ((char*) label_buffer, "%s %s ", XSTRING_DATA (name), XSTRING_DATA (suffix)); } else { - label_buffer = ALLOCA (XSTRING_LENGTH (name) + 15); - sprintf (label_buffer, "%s ", XSTRING_DATA (name)); + label_buffer = (Ibyte*) ALLOCA (XSTRING_LENGTH (name) + 15); + sprintf ((char*) label_buffer, "%s ", XSTRING_DATA (name)); } temp_label = remove_underscores (label_buffer); @@ -898,7 +898,7 @@ } static gboolean -menu_can_reuse_widget (GtkWidget *child, const char *label) +menu_can_reuse_widget (GtkWidget *child, const Ibyte *label) { /* Everything up at the top level was done using ** gtk_menu_item_new_with_label(), but we still double check to make