X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/26e06f4464c58704889bdc536edc25b73e8c0179..47a6e6df2b6430c1047538260750cdbe78c566d5:/oldXMenu/Create.c
diff --git a/oldXMenu/Create.c b/oldXMenu/Create.c
index ca18093f11..6dda7d44ef 100644
--- a/oldXMenu/Create.c
+++ b/oldXMenu/Create.c
@@ -3,8 +3,7 @@
#include "copyright.h"
/*
-Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1993-1994, 2001-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,9 +29,8 @@ along with this program. If not, see . */
*
*/
-#include
#include "XMenuInt.h"
-
+#include
#ifdef EMACS_BITMAP_FILES
#include "../src/bitmaps/dimple1.xbm"
@@ -72,7 +70,6 @@ along with this program. If not, see . */
#define DEF_MENU_STYLE LEFT
#define DEF_MENU_MODE BOX
#define DEF_INACT_PNUM 3
-#define MAX_INACT_PNUM 4
#define DEF_P_STYLE CENTER
@@ -89,21 +86,13 @@ along with this program. If not, see . */
#define XASSOC_TABLE_SIZE 64
-#define TILE_BUF_SIZE 5
-
-int atoi();
-double atof();
-char *x_get_resource_string ();
+char *x_get_resource_string (char const *, char const *);
static Status
-XAllocDisplayColor(display, map, colorName, color, junk)
- Display *display;
- Colormap map;
- char *colorName;
- XColor *color;
- XColor *junk;
+XAllocDisplayColor(Display *display, Colormap map, char const *colorName,
+ XColor *color, XColor *junk)
{
return (colorName!=0 &&
XParseColor(display, map, colorName, color) &&
@@ -112,13 +101,11 @@ XAllocDisplayColor(display, map, colorName, color, junk)
XMenu *
-XMenuCreate(display, parent, def_env)
- Display *display; /* ID of previously opened display */
- Window parent; /* Window ID of the menu's parent window. */
- register char *def_env; /* X Defaults program environment name. */
+XMenuCreate(Display *display, Window parent, register char const *def_env)
+ /* ID of previously opened display */
+ /* Window ID of the menu's parent window. */
+ /* X Defaults program environment name. */
{
- register int i; /* Loop counter. */
- register int j; /* Loop counter. */
register char *def_val; /* X Default value temp variable. */
register XMenu *menu; /* Pointer to the new menu. */
@@ -131,7 +118,7 @@ XMenuCreate(display, parent, def_env)
int reverse; /* Reverse video mode. */
XMStyle p_style; /* Pane display style. */
- char *p_fnt_name; /* Flag font name. */
+ char const *p_fnt_name; /* Flag font name. */
XFontStruct *p_fnt_info; /* Flag font structure */
int p_fnt_pad; /* Flag font padding in pixels. */
double p_spread; /* Pane spread in flag height fractions. */
@@ -144,7 +131,7 @@ XMenuCreate(display, parent, def_env)
GC pane_GC; /* Pane graphics context. */
XMStyle s_style; /* Selection display style. */
- char *s_fnt_name; /* Selection font name. */
+ char const *s_fnt_name; /* Selection font name. */
XFontStruct *s_fnt_info; /* Selection font structure. */
int s_fnt_pad; /* Selection font padding in pixels. */
int s_fnt_height; /* Selection font character height */
@@ -157,10 +144,8 @@ XMenuCreate(display, parent, def_env)
GC inverse_select_GC; /* GC used for inverse video selection. */
GC inact_GC; /* GC for inactive pane header and */
/* selections. */
- GC inact_GC_noexpose;
XColor color_def; /* Temp color definition holder. */
- XColor screen_def; /* Temp screen color definition holder */
XColor p_bdr_color; /* Color of border. */
XColor s_bdr_color; /* Color of highlight. */
XColor p_frg_color; /* Color of pane foreground color. */
@@ -172,17 +157,6 @@ XMenuCreate(display, parent, def_env)
int inact_pnum; /* Inactive background pattern number. */
- Pixel p_bdr_pixel; /* Pane border pixel. */
- Pixel s_bdr_pixel; /* Selection border pixel. */
- Pixel p_frg_pixel; /* Pane foreground pixel. */
- Pixel s_frg_pixel; /* Selection foreground pixel. */
- Pixel bkgnd_pixel; /* Menu background pixel. */
-
- int *width, *height;
- Pixmap *bitmap;
- int *x_hot, *y_hot;
- int status; /* Return code from XReadBitmapFile. */
-
Pixmap cursor; /* Cursor pixmap holder. */
Pixmap cursor_mask; /* Cursor mask pixmap holder. */
Pixmap stipple_pixmap; /* Stipple mask for half-tone text. */
@@ -288,7 +262,7 @@ XMenuCreate(display, parent, def_env)
&mouse_color, &color_def)
);
- else ;
+ else {}
def_val = x_get_resource_string ("menuBackground", "MenuBackground");
if (
@@ -310,7 +284,7 @@ XMenuCreate(display, parent, def_env)
"white",
&bkgnd_color, &color_def)
);
- else;
+ else {}
def_val = x_get_resource_string ("menuInactivePattern", "MenuInactivePattern");
if (def_val != NULL) {
@@ -407,7 +381,7 @@ XMenuCreate(display, parent, def_env)
"black",
&s_frg_color, &color_def)
) ;
- else ;
+ else {}
def_val = x_get_resource_string ("selectionBorder", "SelectionBorder");
@@ -430,7 +404,7 @@ XMenuCreate(display, parent, def_env)
"black",
&s_bdr_color, &color_def)
) ;
- else ;
+ else {}
def_val = x_get_resource_string ("selectionBorderWidth", "SelectionBorderWidth");
if (def_val != NULL) s_bdr_width = atoi(def_val);
@@ -687,9 +661,6 @@ XMenuCreate(display, parent, def_env)
valuemask |= (GCGraphicsExposures);
values->graphics_exposures = False;
- inact_GC_noexpose = XCreateGC (display,
- root,
- valuemask, values);
/*
@@ -758,6 +729,3 @@ XMenuCreate(display, parent, def_env)
_XMErrorCode = XME_NO_ERROR;
return(menu);
}
-
-/* arch-tag: 6945b7d2-3b13-40b9-8b6e-56b1b20f3463
- (do not change this comment) */