Remove HAVE_X11R5 and HAVE_X11R4.

This commit is contained in:
Jan Djärv 2007-11-01 07:42:19 +00:00
parent 00b9439af4
commit ac1278c1f0
8 changed files with 5 additions and 142 deletions

View file

@ -1,3 +1,8 @@
2007-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* xterm.c, xfns.c, xselect.c, xterm.h, s/msdos.h, s/sco4.h, s/sco5.h:
Remove HAVE_X11R5 and HAVE_X11R4.
2007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
* Makefile.in: Remove references to sunfns.c and sunfns.o.

View file

@ -263,7 +263,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#ifdef HAVE_X_WINDOWS
/* We need a little extra space, see ../../lisp/loadup.el */
#define SYSTEM_PURESIZE_EXTRA 15000
#define HAVE_X11R5
#define LIBX11_SYSTEM -lxext -lsys
#else
/* We need a little extra space, see ../../lisp/loadup.el */

View file

@ -100,11 +100,9 @@ Boston, MA 02110-1301, USA. */
#define LIBS_SYSTEM -lPW
#endif
#ifdef HAVE_X11R5
/* configure can't get this right linking fails unless -lsocket is used. */
#undef HAVE_XSCREENNUMBEROFSCREEN
#define HAVE_XSCREENNUMBEROFSCREEN
#endif
/* We don't have -loldX, and we don't need it. */
#define LIB_XMENU_LIB

View file

@ -98,11 +98,9 @@ Boston, MA 02110-1301, USA. */
#define LIBS_SYSTEM -lPW
#endif
#ifdef HAVE_X11R5
/* configure can't get this right linking fails unless -lsocket is used. */
#undef HAVE_XSCREENNUMBEROFSCREEN
#define HAVE_XSCREENNUMBEROFSCREEN
#endif
/* We don't have -loldX, and we don't need it. */
#define LIB_XMENU_LIB

View file

@ -138,11 +138,7 @@ static Lisp_Object Vgtk_version_string;
#endif /* USE_GTK */
#ifdef HAVE_X11R4
#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
#else
#define MAXREQUEST(dpy) ((dpy)->max_request_size)
#endif
/* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses
it, and including `bitmaps/gray' more than once is a problem when
@ -1619,7 +1615,6 @@ x_set_name_internal (f, name)
if (FRAME_X_WINDOW (f))
{
BLOCK_INPUT;
#ifdef HAVE_X11R4
{
XTextProperty text, icon;
int bytes, stringp;
@ -1687,12 +1682,6 @@ x_set_name_internal (f, name)
if (do_free_text_value)
xfree (text.value);
}
#else /* not HAVE_X11R4 */
XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
SDATA (name));
XStoreName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
SDATA (name));
#endif /* not HAVE_X11R4 */
UNBLOCK_INPUT;
}
}
@ -1879,23 +1868,6 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
#if !defined (HAVE_X11R4) && !defined (HAVE_XSETWMPROTOCOLS)
Status
XSetWMProtocols (dpy, w, protocols, count)
Display *dpy;
Window w;
Atom *protocols;
int count;
{
Atom prop;
prop = XInternAtom (dpy, "WM_PROTOCOLS", False);
if (prop == None) return False;
XChangeProperty (dpy, w, prop, XA_ATOM, 32, PropModeReplace,
(unsigned char *) protocols, count);
return True;
}
#endif /* not HAVE_X11R4 && not HAVE_XSETWMPROTOCOLS */
#ifdef USE_X_TOOLKIT
@ -4013,11 +3985,7 @@ select_visual (dpyinfo)
dpyinfo->visual = DefaultVisualOfScreen (screen);
#ifdef HAVE_X11R4
vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual);
#else
vinfo_template.visualid = dpyinfo->visual->visualid;
#endif
vinfo_template.screen = XScreenNumberOfScreen (screen);
vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask,
&vinfo_template, &n_visuals);

View file

@ -140,11 +140,7 @@ static Lisp_Object Qforeign_selection;
incremental transfer stuff, but it might improve server performance. */
#define MAX_SELECTION_QUANTUM 0xFFFFFF
#ifdef HAVE_X11R4
#define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100)
#else
#define SELECTION_QUANTUM(dpy) (((dpy)->max_request_size << 2) - 100)
#endif
/* The timestamp of the last input event Emacs received from the X server. */
/* Defined in keyboard.c. */

View file

@ -3438,12 +3438,7 @@ x_find_modifier_meanings (dpyinfo)
dpyinfo->super_mod_mask = 0;
dpyinfo->hyper_mod_mask = 0;
#ifdef HAVE_X11R4
XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
#else
min_code = dpyinfo->display->min_keycode;
max_code = dpyinfo->display->max_keycode;
#endif
syms = XGetKeyboardMapping (dpyinfo->display,
min_code, max_code - min_code + 1,
@ -6490,14 +6485,6 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
|| (orig_keysym & (1 << 28))
|| (keysym != NoSymbol && nbytes == 0))
&& ! (IsModifierKey (orig_keysym)
#ifndef HAVE_X11R5
#ifdef XK_Mode_switch
|| ((unsigned)(orig_keysym) == XK_Mode_switch)
#endif
#ifdef XK_Num_Lock
|| ((unsigned)(orig_keysym) == XK_Num_Lock)
#endif
#endif /* not HAVE_X11R5 */
/* The symbols from XK_ISO_Lock
to XK_ISO_Last_Group_Lock
don't have real modifiers but
@ -7587,7 +7574,6 @@ x_text_icon (f, icon_name)
if (FRAME_X_WINDOW (f) == 0)
return 1;
#ifdef HAVE_X11R4
{
XTextProperty text;
text.value = (unsigned char *) icon_name;
@ -7596,9 +7582,6 @@ x_text_icon (f, icon_name)
text.nitems = strlen (icon_name);
XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
}
#else /* not HAVE_X11R4 */
XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
#endif /* not HAVE_X11R4 */
if (f->output_data.x->icon_bitmap > 0)
x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
@ -9207,7 +9190,6 @@ x_make_frame_invisible (f)
else
#endif
{
#ifdef HAVE_X11R4
if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window,
DefaultScreen (FRAME_X_DISPLAY (f))))
@ -9215,31 +9197,6 @@ x_make_frame_invisible (f)
UNBLOCK_INPUT_RESIGNAL;
error ("Can't notify window manager of window withdrawal");
}
#else /* ! defined (HAVE_X11R4) */
/* Tell the window manager what we're going to do. */
if (! EQ (Vx_no_window_manager, Qt))
{
XEvent unmap;
unmap.xunmap.type = UnmapNotify;
unmap.xunmap.window = window;
unmap.xunmap.event = DefaultRootWindow (FRAME_X_DISPLAY (f));
unmap.xunmap.from_configure = False;
if (! XSendEvent (FRAME_X_DISPLAY (f),
DefaultRootWindow (FRAME_X_DISPLAY (f)),
False,
SubstructureRedirectMaskSubstructureNotifyMask,
&unmap))
{
UNBLOCK_INPUT_RESIGNAL;
error ("Can't notify window manager of withdrawal");
}
}
/* Unmap the window ourselves. Cheeky! */
XUnmapWindow (FRAME_X_DISPLAY (f), window);
#endif /* ! defined (HAVE_X11R4) */
}
/* We can't distinguish this from iconification
@ -9596,16 +9553,11 @@ x_wm_set_size_hint (f, flags, user_position)
them; otherwise, we set the min_width and min_height members
to the size for a zero x zero frame. */
#ifdef HAVE_X11R4
size_hints.flags |= PBaseSize;
size_hints.base_width = base_width;
size_hints.base_height = base_height;
size_hints.min_width = base_width + min_cols * size_hints.width_inc;
size_hints.min_height = base_height + min_rows * size_hints.height_inc;
#else
size_hints.min_width = base_width;
size_hints.min_height = base_height;
#endif
}
/* If we don't need the old flags, we don't need the old hint at all. */
@ -9621,12 +9573,8 @@ x_wm_set_size_hint (f, flags, user_position)
long supplied_return;
int value;
#ifdef HAVE_X11R4
value = XGetWMNormalHints (FRAME_X_DISPLAY (f), window, &hints,
&supplied_return);
#else
value = XGetNormalHints (FRAME_X_DISPLAY (f), window, &hints);
#endif
#ifdef USE_X_TOOLKIT
size_hints.base_height = hints.base_height;
@ -9667,11 +9615,7 @@ x_wm_set_size_hint (f, flags, user_position)
}
#endif /* PWinGravity */
#ifdef HAVE_X11R4
XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#else
XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
#endif
}
#endif /* not USE_GTK */
@ -10676,9 +10620,7 @@ x_term_init (display_name, xrm_option, resource_name)
argv[argc++] = "--name";
argv[argc++] = resource_name;
#ifdef HAVE_X11R5
XSetLocaleModifiers ("");
#endif
gtk_init (&argc, &argv2);
@ -10743,9 +10685,7 @@ x_term_init (display_name, xrm_option, resource_name)
}
#else /* not USE_X_TOOLKIT */
#ifdef HAVE_X11R5
XSetLocaleModifiers ("");
#endif
dpy = XOpenDisplay (SDATA (display_name));
#endif /* not USE_X_TOOLKIT */
#endif /* not USE_GTK*/
@ -11056,9 +10996,6 @@ x_term_init (display_name, xrm_option, resource_name)
#endif /* ! defined (SIGIO) */
#ifdef USE_LUCID
#ifdef HAVE_X11R5 /* It seems X11R4 lacks XtCvtStringToFont, and XPointer. */
/* Make sure that we have a valid font for dialog boxes
so that Xt does not crash. */
{
Display *dpy = dpyinfo->display;
XrmValue d, fr, to;
@ -11077,7 +11014,6 @@ x_term_init (display_name, xrm_option, resource_name)
XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15");
x_uncatch_errors ();
}
#endif
#endif
/* See if we should run in synchronous mode. This is useful

View file

@ -59,43 +59,6 @@ typedef GtkWidget *xt_or_gtk_widget;
/* Bookkeeping to distinguish X versions. */
/* HAVE_X11R4 is defined if we have the features of X11R4. It should
be defined when we're using X11R5, since X11R5 has the features of
X11R4. If, in the future, we find we need more of these flags
(HAVE_X11R5, for example), code should always be written to test
the most recent flag first:
#ifdef HAVE_X11R5
...
#elif HAVE_X11R4
...
#elif HAVE_X11
...
#endif
If you ever find yourself writing a "#ifdef HAVE_FOO" clause that
looks a lot like another one, consider moving the text into a macro
whose definition is configuration-dependent, but whose usage is
universal - like the stuff in systime.h.
It turns out that we can auto-detect whether we're being compiled
with X11R3 or X11R4 by looking for the flag macros for R4 structure
members that R3 doesn't have. */
#ifdef PBaseSize
/* AIX 3.1's X is somewhere between X11R3 and X11R4. It has
PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints,
XSetWMIconName.
AIX 3.2 is at least X11R4. */
#if (!defined AIX) || (defined AIX3_2)
#define HAVE_X11R4
#endif
#endif
#ifdef HAVE_X11R5
/* In case someone has X11R5 on AIX 3.1,
make sure HAVE_X11R4 is defined as well as HAVE_X11R5. */
#define HAVE_X11R4
#endif
#ifdef HAVE_X_I18N
#include <X11/Xlocale.h>