aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2007-11-01 07:42:19 +0000
committerJan Djärv2007-11-01 07:42:19 +0000
commitac1278c1f0467600aae57ee5e33e4ca09b742585 (patch)
tree5ee9a200237c132798671dcd84bd9cf77e2b0e72 /src
parent00b9439af40f5ad5c9dc5e32ff10f41249525f0a (diff)
downloademacs-ac1278c1f0467600aae57ee5e33e4ca09b742585.tar.gz
emacs-ac1278c1f0467600aae57ee5e33e4ca09b742585.zip
Remove HAVE_X11R5 and HAVE_X11R4.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/s/msdos.h1
-rw-r--r--src/s/sco4.h2
-rw-r--r--src/s/sco5.h2
-rw-r--r--src/xfns.c32
-rw-r--r--src/xselect.c4
-rw-r--r--src/xterm.c64
-rw-r--r--src/xterm.h37
8 files changed, 5 insertions, 142 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 553bf65820a..417a1a14882 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12007-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * xterm.c, xfns.c, xselect.c, xterm.h, s/msdos.h, s/sco4.h, s/sco5.h:
4 Remove HAVE_X11R5 and HAVE_X11R4.
5
12007-11-01 Dan Nicolaescu <dann@ics.uci.edu> 62007-11-01 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * Makefile.in: Remove references to sunfns.c and sunfns.o. 8 * Makefile.in: Remove references to sunfns.c and sunfns.o.
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 10246513811..297fda45baa 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -263,7 +263,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
263#ifdef HAVE_X_WINDOWS 263#ifdef HAVE_X_WINDOWS
264/* We need a little extra space, see ../../lisp/loadup.el */ 264/* We need a little extra space, see ../../lisp/loadup.el */
265#define SYSTEM_PURESIZE_EXTRA 15000 265#define SYSTEM_PURESIZE_EXTRA 15000
266#define HAVE_X11R5
267#define LIBX11_SYSTEM -lxext -lsys 266#define LIBX11_SYSTEM -lxext -lsys
268#else 267#else
269/* We need a little extra space, see ../../lisp/loadup.el */ 268/* We need a little extra space, see ../../lisp/loadup.el */
diff --git a/src/s/sco4.h b/src/s/sco4.h
index 4912b275aaa..d16bcbead49 100644
--- a/src/s/sco4.h
+++ b/src/s/sco4.h
@@ -100,11 +100,9 @@ Boston, MA 02110-1301, USA. */
100#define LIBS_SYSTEM -lPW 100#define LIBS_SYSTEM -lPW
101#endif 101#endif
102 102
103#ifdef HAVE_X11R5
104/* configure can't get this right linking fails unless -lsocket is used. */ 103/* configure can't get this right linking fails unless -lsocket is used. */
105#undef HAVE_XSCREENNUMBEROFSCREEN 104#undef HAVE_XSCREENNUMBEROFSCREEN
106#define HAVE_XSCREENNUMBEROFSCREEN 105#define HAVE_XSCREENNUMBEROFSCREEN
107#endif
108 106
109/* We don't have -loldX, and we don't need it. */ 107/* We don't have -loldX, and we don't need it. */
110#define LIB_XMENU_LIB 108#define LIB_XMENU_LIB
diff --git a/src/s/sco5.h b/src/s/sco5.h
index a5cc19656ab..1f56a998014 100644
--- a/src/s/sco5.h
+++ b/src/s/sco5.h
@@ -98,11 +98,9 @@ Boston, MA 02110-1301, USA. */
98#define LIBS_SYSTEM -lPW 98#define LIBS_SYSTEM -lPW
99#endif 99#endif
100 100
101#ifdef HAVE_X11R5
102/* configure can't get this right linking fails unless -lsocket is used. */ 101/* configure can't get this right linking fails unless -lsocket is used. */
103#undef HAVE_XSCREENNUMBEROFSCREEN 102#undef HAVE_XSCREENNUMBEROFSCREEN
104#define HAVE_XSCREENNUMBEROFSCREEN 103#define HAVE_XSCREENNUMBEROFSCREEN
105#endif
106 104
107/* We don't have -loldX, and we don't need it. */ 105/* We don't have -loldX, and we don't need it. */
108#define LIB_XMENU_LIB 106#define LIB_XMENU_LIB
diff --git a/src/xfns.c b/src/xfns.c
index 4492064622a..be3ce36668f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -138,11 +138,7 @@ static Lisp_Object Vgtk_version_string;
138 138
139#endif /* USE_GTK */ 139#endif /* USE_GTK */
140 140
141#ifdef HAVE_X11R4
142#define MAXREQUEST(dpy) (XMaxRequestSize (dpy)) 141#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
143#else
144#define MAXREQUEST(dpy) ((dpy)->max_request_size)
145#endif
146 142
147/* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses 143/* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses
148 it, and including `bitmaps/gray' more than once is a problem when 144 it, and including `bitmaps/gray' more than once is a problem when
@@ -1619,7 +1615,6 @@ x_set_name_internal (f, name)
1619 if (FRAME_X_WINDOW (f)) 1615 if (FRAME_X_WINDOW (f))
1620 { 1616 {
1621 BLOCK_INPUT; 1617 BLOCK_INPUT;
1622#ifdef HAVE_X11R4
1623 { 1618 {
1624 XTextProperty text, icon; 1619 XTextProperty text, icon;
1625 int bytes, stringp; 1620 int bytes, stringp;
@@ -1687,12 +1682,6 @@ x_set_name_internal (f, name)
1687 if (do_free_text_value) 1682 if (do_free_text_value)
1688 xfree (text.value); 1683 xfree (text.value);
1689 } 1684 }
1690#else /* not HAVE_X11R4 */
1691 XSetIconName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
1692 SDATA (name));
1693 XStoreName (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
1694 SDATA (name));
1695#endif /* not HAVE_X11R4 */
1696 UNBLOCK_INPUT; 1685 UNBLOCK_INPUT;
1697 } 1686 }
1698} 1687}
@@ -1879,23 +1868,6 @@ x_default_scroll_bar_color_parameter (f, alist, prop, xprop, xclass,
1879 1868
1880 1869
1881 1870
1882#if !defined (HAVE_X11R4) && !defined (HAVE_XSETWMPROTOCOLS)
1883
1884Status
1885XSetWMProtocols (dpy, w, protocols, count)
1886 Display *dpy;
1887 Window w;
1888 Atom *protocols;
1889 int count;
1890{
1891 Atom prop;
1892 prop = XInternAtom (dpy, "WM_PROTOCOLS", False);
1893 if (prop == None) return False;
1894 XChangeProperty (dpy, w, prop, XA_ATOM, 32, PropModeReplace,
1895 (unsigned char *) protocols, count);
1896 return True;
1897}
1898#endif /* not HAVE_X11R4 && not HAVE_XSETWMPROTOCOLS */
1899 1871
1900#ifdef USE_X_TOOLKIT 1872#ifdef USE_X_TOOLKIT
1901 1873
@@ -4013,11 +3985,7 @@ select_visual (dpyinfo)
4013 3985
4014 dpyinfo->visual = DefaultVisualOfScreen (screen); 3986 dpyinfo->visual = DefaultVisualOfScreen (screen);
4015 3987
4016#ifdef HAVE_X11R4
4017 vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual); 3988 vinfo_template.visualid = XVisualIDFromVisual (dpyinfo->visual);
4018#else
4019 vinfo_template.visualid = dpyinfo->visual->visualid;
4020#endif
4021 vinfo_template.screen = XScreenNumberOfScreen (screen); 3989 vinfo_template.screen = XScreenNumberOfScreen (screen);
4022 vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask, 3990 vinfo = XGetVisualInfo (dpy, VisualIDMask | VisualScreenMask,
4023 &vinfo_template, &n_visuals); 3991 &vinfo_template, &n_visuals);
diff --git a/src/xselect.c b/src/xselect.c
index 0db5ef57767..45907b30be4 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -140,11 +140,7 @@ static Lisp_Object Qforeign_selection;
140 incremental transfer stuff, but it might improve server performance. */ 140 incremental transfer stuff, but it might improve server performance. */
141#define MAX_SELECTION_QUANTUM 0xFFFFFF 141#define MAX_SELECTION_QUANTUM 0xFFFFFF
142 142
143#ifdef HAVE_X11R4
144#define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100) 143#define SELECTION_QUANTUM(dpy) ((XMaxRequestSize(dpy) << 2) - 100)
145#else
146#define SELECTION_QUANTUM(dpy) (((dpy)->max_request_size << 2) - 100)
147#endif
148 144
149/* The timestamp of the last input event Emacs received from the X server. */ 145/* The timestamp of the last input event Emacs received from the X server. */
150/* Defined in keyboard.c. */ 146/* Defined in keyboard.c. */
diff --git a/src/xterm.c b/src/xterm.c
index 6991579a881..f3b84a73cb0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3438,12 +3438,7 @@ x_find_modifier_meanings (dpyinfo)
3438 dpyinfo->super_mod_mask = 0; 3438 dpyinfo->super_mod_mask = 0;
3439 dpyinfo->hyper_mod_mask = 0; 3439 dpyinfo->hyper_mod_mask = 0;
3440 3440
3441#ifdef HAVE_X11R4
3442 XDisplayKeycodes (dpyinfo->display, &min_code, &max_code); 3441 XDisplayKeycodes (dpyinfo->display, &min_code, &max_code);
3443#else
3444 min_code = dpyinfo->display->min_keycode;
3445 max_code = dpyinfo->display->max_keycode;
3446#endif
3447 3442
3448 syms = XGetKeyboardMapping (dpyinfo->display, 3443 syms = XGetKeyboardMapping (dpyinfo->display,
3449 min_code, max_code - min_code + 1, 3444 min_code, max_code - min_code + 1,
@@ -6490,14 +6485,6 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit)
6490 || (orig_keysym & (1 << 28)) 6485 || (orig_keysym & (1 << 28))
6491 || (keysym != NoSymbol && nbytes == 0)) 6486 || (keysym != NoSymbol && nbytes == 0))
6492 && ! (IsModifierKey (orig_keysym) 6487 && ! (IsModifierKey (orig_keysym)
6493#ifndef HAVE_X11R5
6494#ifdef XK_Mode_switch
6495 || ((unsigned)(orig_keysym) == XK_Mode_switch)
6496#endif
6497#ifdef XK_Num_Lock
6498 || ((unsigned)(orig_keysym) == XK_Num_Lock)
6499#endif
6500#endif /* not HAVE_X11R5 */
6501 /* The symbols from XK_ISO_Lock 6488 /* The symbols from XK_ISO_Lock
6502 to XK_ISO_Last_Group_Lock 6489 to XK_ISO_Last_Group_Lock
6503 don't have real modifiers but 6490 don't have real modifiers but
@@ -7587,7 +7574,6 @@ x_text_icon (f, icon_name)
7587 if (FRAME_X_WINDOW (f) == 0) 7574 if (FRAME_X_WINDOW (f) == 0)
7588 return 1; 7575 return 1;
7589 7576
7590#ifdef HAVE_X11R4
7591 { 7577 {
7592 XTextProperty text; 7578 XTextProperty text;
7593 text.value = (unsigned char *) icon_name; 7579 text.value = (unsigned char *) icon_name;
@@ -7596,9 +7582,6 @@ x_text_icon (f, icon_name)
7596 text.nitems = strlen (icon_name); 7582 text.nitems = strlen (icon_name);
7597 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text); 7583 XSetWMIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), &text);
7598 } 7584 }
7599#else /* not HAVE_X11R4 */
7600 XSetIconName (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), icon_name);
7601#endif /* not HAVE_X11R4 */
7602 7585
7603 if (f->output_data.x->icon_bitmap > 0) 7586 if (f->output_data.x->icon_bitmap > 0)
7604 x_destroy_bitmap (f, f->output_data.x->icon_bitmap); 7587 x_destroy_bitmap (f, f->output_data.x->icon_bitmap);
@@ -9207,7 +9190,6 @@ x_make_frame_invisible (f)
9207 else 9190 else
9208#endif 9191#endif
9209 { 9192 {
9210#ifdef HAVE_X11R4
9211 9193
9212 if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window, 9194 if (! XWithdrawWindow (FRAME_X_DISPLAY (f), window,
9213 DefaultScreen (FRAME_X_DISPLAY (f)))) 9195 DefaultScreen (FRAME_X_DISPLAY (f))))
@@ -9215,31 +9197,6 @@ x_make_frame_invisible (f)
9215 UNBLOCK_INPUT_RESIGNAL; 9197 UNBLOCK_INPUT_RESIGNAL;
9216 error ("Can't notify window manager of window withdrawal"); 9198 error ("Can't notify window manager of window withdrawal");
9217 } 9199 }
9218#else /* ! defined (HAVE_X11R4) */
9219
9220 /* Tell the window manager what we're going to do. */
9221 if (! EQ (Vx_no_window_manager, Qt))
9222 {
9223 XEvent unmap;
9224
9225 unmap.xunmap.type = UnmapNotify;
9226 unmap.xunmap.window = window;
9227 unmap.xunmap.event = DefaultRootWindow (FRAME_X_DISPLAY (f));
9228 unmap.xunmap.from_configure = False;
9229 if (! XSendEvent (FRAME_X_DISPLAY (f),
9230 DefaultRootWindow (FRAME_X_DISPLAY (f)),
9231 False,
9232 SubstructureRedirectMaskSubstructureNotifyMask,
9233 &unmap))
9234 {
9235 UNBLOCK_INPUT_RESIGNAL;
9236 error ("Can't notify window manager of withdrawal");
9237 }
9238 }
9239
9240 /* Unmap the window ourselves. Cheeky! */
9241 XUnmapWindow (FRAME_X_DISPLAY (f), window);
9242#endif /* ! defined (HAVE_X11R4) */
9243 } 9200 }
9244 9201
9245 /* We can't distinguish this from iconification 9202 /* We can't distinguish this from iconification
@@ -9596,16 +9553,11 @@ x_wm_set_size_hint (f, flags, user_position)
9596 them; otherwise, we set the min_width and min_height members 9553 them; otherwise, we set the min_width and min_height members
9597 to the size for a zero x zero frame. */ 9554 to the size for a zero x zero frame. */
9598 9555
9599#ifdef HAVE_X11R4
9600 size_hints.flags |= PBaseSize; 9556 size_hints.flags |= PBaseSize;
9601 size_hints.base_width = base_width; 9557 size_hints.base_width = base_width;
9602 size_hints.base_height = base_height; 9558 size_hints.base_height = base_height;
9603 size_hints.min_width = base_width + min_cols * size_hints.width_inc; 9559 size_hints.min_width = base_width + min_cols * size_hints.width_inc;
9604 size_hints.min_height = base_height + min_rows * size_hints.height_inc; 9560 size_hints.min_height = base_height + min_rows * size_hints.height_inc;
9605#else
9606 size_hints.min_width = base_width;
9607 size_hints.min_height = base_height;
9608#endif
9609 } 9561 }
9610 9562
9611 /* If we don't need the old flags, we don't need the old hint at all. */ 9563 /* 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)
9621 long supplied_return; 9573 long supplied_return;
9622 int value; 9574 int value;
9623 9575
9624#ifdef HAVE_X11R4
9625 value = XGetWMNormalHints (FRAME_X_DISPLAY (f), window, &hints, 9576 value = XGetWMNormalHints (FRAME_X_DISPLAY (f), window, &hints,
9626 &supplied_return); 9577 &supplied_return);
9627#else
9628 value = XGetNormalHints (FRAME_X_DISPLAY (f), window, &hints);
9629#endif
9630 9578
9631#ifdef USE_X_TOOLKIT 9579#ifdef USE_X_TOOLKIT
9632 size_hints.base_height = hints.base_height; 9580 size_hints.base_height = hints.base_height;
@@ -9667,11 +9615,7 @@ x_wm_set_size_hint (f, flags, user_position)
9667 } 9615 }
9668#endif /* PWinGravity */ 9616#endif /* PWinGravity */
9669 9617
9670#ifdef HAVE_X11R4
9671 XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints); 9618 XSetWMNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
9672#else
9673 XSetNormalHints (FRAME_X_DISPLAY (f), window, &size_hints);
9674#endif
9675} 9619}
9676#endif /* not USE_GTK */ 9620#endif /* not USE_GTK */
9677 9621
@@ -10676,9 +10620,7 @@ x_term_init (display_name, xrm_option, resource_name)
10676 argv[argc++] = "--name"; 10620 argv[argc++] = "--name";
10677 argv[argc++] = resource_name; 10621 argv[argc++] = resource_name;
10678 10622
10679#ifdef HAVE_X11R5
10680 XSetLocaleModifiers (""); 10623 XSetLocaleModifiers ("");
10681#endif
10682 10624
10683 gtk_init (&argc, &argv2); 10625 gtk_init (&argc, &argv2);
10684 10626
@@ -10743,9 +10685,7 @@ x_term_init (display_name, xrm_option, resource_name)
10743 } 10685 }
10744 10686
10745#else /* not USE_X_TOOLKIT */ 10687#else /* not USE_X_TOOLKIT */
10746#ifdef HAVE_X11R5
10747 XSetLocaleModifiers (""); 10688 XSetLocaleModifiers ("");
10748#endif
10749 dpy = XOpenDisplay (SDATA (display_name)); 10689 dpy = XOpenDisplay (SDATA (display_name));
10750#endif /* not USE_X_TOOLKIT */ 10690#endif /* not USE_X_TOOLKIT */
10751#endif /* not USE_GTK*/ 10691#endif /* not USE_GTK*/
@@ -11056,9 +10996,6 @@ x_term_init (display_name, xrm_option, resource_name)
11056#endif /* ! defined (SIGIO) */ 10996#endif /* ! defined (SIGIO) */
11057 10997
11058#ifdef USE_LUCID 10998#ifdef USE_LUCID
11059#ifdef HAVE_X11R5 /* It seems X11R4 lacks XtCvtStringToFont, and XPointer. */
11060 /* Make sure that we have a valid font for dialog boxes
11061 so that Xt does not crash. */
11062 { 10999 {
11063 Display *dpy = dpyinfo->display; 11000 Display *dpy = dpyinfo->display;
11064 XrmValue d, fr, to; 11001 XrmValue d, fr, to;
@@ -11078,7 +11015,6 @@ x_term_init (display_name, xrm_option, resource_name)
11078 x_uncatch_errors (); 11015 x_uncatch_errors ();
11079 } 11016 }
11080#endif 11017#endif
11081#endif
11082 11018
11083 /* See if we should run in synchronous mode. This is useful 11019 /* See if we should run in synchronous mode. This is useful
11084 for debugging X code. */ 11020 for debugging X code. */
diff --git a/src/xterm.h b/src/xterm.h
index 081a9c42343..741dec13e75 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -59,43 +59,6 @@ typedef GtkWidget *xt_or_gtk_widget;
59 59
60/* Bookkeeping to distinguish X versions. */ 60/* Bookkeeping to distinguish X versions. */
61 61
62/* HAVE_X11R4 is defined if we have the features of X11R4. It should
63 be defined when we're using X11R5, since X11R5 has the features of
64 X11R4. If, in the future, we find we need more of these flags
65 (HAVE_X11R5, for example), code should always be written to test
66 the most recent flag first:
67
68 #ifdef HAVE_X11R5
69 ...
70 #elif HAVE_X11R4
71 ...
72 #elif HAVE_X11
73 ...
74 #endif
75
76 If you ever find yourself writing a "#ifdef HAVE_FOO" clause that
77 looks a lot like another one, consider moving the text into a macro
78 whose definition is configuration-dependent, but whose usage is
79 universal - like the stuff in systime.h.
80
81 It turns out that we can auto-detect whether we're being compiled
82 with X11R3 or X11R4 by looking for the flag macros for R4 structure
83 members that R3 doesn't have. */
84#ifdef PBaseSize
85/* AIX 3.1's X is somewhere between X11R3 and X11R4. It has
86 PBaseSize, but not XWithdrawWindow, XSetWMName, XSetWMNormalHints,
87 XSetWMIconName.
88 AIX 3.2 is at least X11R4. */
89#if (!defined AIX) || (defined AIX3_2)
90#define HAVE_X11R4
91#endif
92#endif
93
94#ifdef HAVE_X11R5
95/* In case someone has X11R5 on AIX 3.1,
96 make sure HAVE_X11R4 is defined as well as HAVE_X11R5. */
97#define HAVE_X11R4
98#endif
99 62
100#ifdef HAVE_X_I18N 63#ifdef HAVE_X_I18N
101#include <X11/Xlocale.h> 64#include <X11/Xlocale.h>