annotate src/m/apollo.h @ 51207:7e176ef34c10

Make (many) trivial substitutions for renamed and new macros in dispextern.h, frame.h and window.h. (make_window): Initialize new members left_margin_cols, right_margin_cols, left_fringe_width, right_fringe_width, fringes_outside_margins, scroll_bar_width, and vertical_scroll_bar_type. (coordinates_in_window): Adapted to new fringe/margin positions and per-window fringes and scroll-bars. Fix bug related to incorrectly adjusting coordinates by frame's internal_border_width (the effect normally negible since the internal_border_width is typically 0 or 1 pixel, but very noticeable for an internal_border_width of e.g. 25 pixels). Upon successful return (other than ON_NOTHING), the coordinates are now always properly converted to window relative for the given display element. (window_from_coordinates): Add new parameters wx and wy to return the window relative x and y position in the returned window and part. A null arg means, don't return the position. All callers changed. (adjust_window_margins): New function which may reduce the width of the display margins if a window's text area is too small after resizing or splitting windows. (size_window): Fix bug that did not account for display margin widths when checking the minimum width of a window; use adjust_window_margins. (set_window_buffer): Call Fset_window_fringes and Fset_window_scroll_bars to setup per-window elements. Add new arg KEEP_MARGINS_P. Non-nil means to keep window's existing display margin, fringe widths, and scroll bar settings (e.g. after splitting a window or resizing the frame). All callers changed. (Fset_window_buffer): New arg KEEP_MARGINS. All callers changed. (Fsplit_window): Duplicate original window's display margin, fringe, and scroll-bar settings; then call Fset_window_buffer with KEEP_MARGINS non-nil. This fixes a bug which caused a split window to only preserve the display margins in one of the windows. When splitting horisontally, call adjust_window_margins on both windows to ensure that the text area of the new windows is non too narrow. This fixes a bug which could cause emacs to trap if the width of the split window was less than the width of the display margins. (window_box_text_cols): Renamed from window_internal_width. All uses changed. Adapt to per-window fringes and scroll bars. Fix bug that caused vertical separator to be subtracted also on window frames. Fix another bug that did not reduce the returned value by the columns used for display margins. (window_scroll_line_based): Fix bug related to scrolling too much when display margins are present (implicitly fixed by the fix to window_box_text_cols). (scroll_left, scroll_right): Fix bug related to scrolling too far by default when display margins are present (implicitly fixed by the fix to window_box_text_cols). (struct saved_window): Rename members left to left_col, top to top_line, width to total_cols, height to total_lines, orig_top to orig_top_line, orig_height to orig_total_lines. All uses changed. New members left_margin_cols, right_margin_cols, left_fringe_width, right_fringe_width, fringes_outside_margins, scroll_bar_width, and vertical_scroll_bar_type for saving per-window display elements. (Fset_window_configuration): Restore display margins, fringes, and scroll bar settings. This fixes a bug which caused display margins to be discarded when saving and restoring a window configuration. (save_window_save): Save display margins, fringes, and scroll bar settings. This fixes a bug which caused display margins to be discarded when saving and restoring a window configuration. (Fset_window_margins): Do nothing if display margins are not really changed. Otherwise, call adjust_window_margins to ensure the text area doesn't get too narrow. This fixes a bug which could cause emacs to trap if setting display margins wider than the width of the window. (Fset_window_fringes): New defun to allow user to specifically set this window's fringe widths and position vs. display margins. (Fwindow_fringes): New defun to return window's actual fringe settings. (Fset_window_scroll_bars): New defun to allow user to specifically set this window's scroll bar width and position. (Fwindow_scroll_bars): New defun to return window's actual scroll bar settings. (compare_window_configurations): Also compare display margins, fringes, and scroll bar settings. (syms_of_window): Defsubr new defuns for fringe and scroll bars.
author Kim F. Storm <storm@cua.dk>
date Sat, 24 May 2003 22:07:51 +0000
parents 23a1cea22d13
children 695cf19ef79e d7ddb3e565de
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* machine description file for Apollo machine.
44601
4be8406ebef9 Don't define HAVE_ALLOCA, C_ALLOCA and STACK_DIRECTION, now set by autoconf.
Andreas Schwab <schwab@suse.de>
parents: 14186
diff changeset
2 Copyright (C) 1985, 1986, 1994, 2002, Free Software Foundation, Inc.
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
3699
7be0f0a02725 Updated GPL version to 2.
Jim Blandy <jimb@redhat.com>
parents: 2167
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
14186
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13374
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
ee40177f6c68 Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents: 13374
diff changeset
19 Boston, MA 02111-1307, USA. */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21
49600
23a1cea22d13 Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 44601
diff changeset
22 /* The following line tells the configuration script what sort of
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 operating system this machine is likely to run.
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
24 USUAL-OPSYS="bsd4-3" */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25
9095
23f72b18b420 (WORDS_BIG_ENDIAN): define or undef appropriately, superseding BIG_ENDIAN.
Karl Heuer <kwzh@gnu.org>
parents: 8892
diff changeset
26 /* Define WORDS_BIG_ENDIAN iff lowest-numbered byte in a word
23f72b18b420 (WORDS_BIG_ENDIAN): define or undef appropriately, superseding BIG_ENDIAN.
Karl Heuer <kwzh@gnu.org>
parents: 8892
diff changeset
27 is the most significant byte. */
23f72b18b420 (WORDS_BIG_ENDIAN): define or undef appropriately, superseding BIG_ENDIAN.
Karl Heuer <kwzh@gnu.org>
parents: 8892
diff changeset
28
23f72b18b420 (WORDS_BIG_ENDIAN): define or undef appropriately, superseding BIG_ENDIAN.
Karl Heuer <kwzh@gnu.org>
parents: 8892
diff changeset
29 #define WORDS_BIG_ENDIAN
23f72b18b420 (WORDS_BIG_ENDIAN): define or undef appropriately, superseding BIG_ENDIAN.
Karl Heuer <kwzh@gnu.org>
parents: 8892
diff changeset
30
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 /* Say this machine is a 68000 */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 /* #define m68000 */ /* Done by the C compiler */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 #define APOLLO
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 /* Assume we use s-bsd4-3.h for system version 10. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 #ifdef BSD4_3
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 #define APOLLO_SR10
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 #endif
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 /* Use type int rather than a union, to represent Lisp_Object */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 #define NO_UNION_TYPE
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 /* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 since there is no /dev/kmem */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
50 /* Undefine VIRT_ADDR_VARIES because the virtual addresses of
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
51 pure and impure space as loaded do not vary. */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
53 #undef VIRT_ADDR_VARIES
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 /* Prevent -lg from being used for debugging. Not needed. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 #define LIBS_DEBUG
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
59 /* Can't use the system's termcap. It has compressed data sections that
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
60 interfere with dumping. That means we won't automatically get a vt100
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
61 when we start up emacs in a dm pad (a dubious feature at best anyway). */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
63 #undef LIBS_TERMCAP
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
64
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
65 /* Must use the system's malloc and alloca. */
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
66
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 #define SYSTEM_MALLOC
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
68
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
69 /* Define the file we use for UNEXEC. */
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
70
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
71 #define UNEXEC unexapollo.o
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
73 /* The Apollo linker does not recognize the -X switch, so we remove it here. */
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
74
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
75 #define LD_SWITCH_SYSTEM
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
77 /* Define C_SWITCH_MACHINE to compile for 68020/68030 or PRISM.
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
78 Define LD_SWITCH_MACHINE to save space by stripping symbols
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
79 and use X11 libraries. */
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
81 #if _ISP__A88K
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
82 #define C_SWITCH_MACHINE -W0,-ncompress -W0,-opt,2 -A cpu,a88k -A sys,any -A run,bsd4.3
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
83 #define LD_SWITCH_MACHINE -A cpu,a88k -A sys,any -A run,bsd4.3
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
84 #else
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
85 #define C_SWITCH_MACHINE -W0,-ncompress -W0,-opt,2 -A cpu,3000 -A sys,any -A run,bsd4.3
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
86 #define LD_SWITCH_MACHINE -A cpu,m68k -A sys,any -A run,bsd4.3
456
c0335c02f1d7 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 #endif
2167
c4bed8692d6f (NO_X_DESTROY_DATABASE): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 750
diff changeset
88
11668
0d5b4a9053c2 (CANNOT_DUMP, VIRT_ADDR_VARIES, LIBS_TERMCAP)
Richard M. Stallman <rms@gnu.org>
parents: 10362
diff changeset
89 #define OLDXMENU_OPTIONS ${C_SWITCH_MACHINE}
13006
e4e18abbe5a2 (HAVE_UNISTD_H): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 11668
diff changeset
90
e4e18abbe5a2 (HAVE_UNISTD_H): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 11668
diff changeset
91 /* In SR10.4, unistd.h has bad prototype for getpgrp, so we don't include it. */
e4e18abbe5a2 (HAVE_UNISTD_H): Add #undef.
Richard M. Stallman <rms@gnu.org>
parents: 11668
diff changeset
92 #undef HAVE_UNISTD_H