aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-07-13 19:54:34 +0000
committerJim Blandy1992-07-13 19:54:34 +0000
commit502b9b6441d9c3ce0fdc5f671447f30f11fb5afb (patch)
treec053def82b81e846727ee840df463599703232ef /src
parent1cbd5d9dc53c354c837c568a9da8fd180eed4d89 (diff)
downloademacs-502b9b6441d9c3ce0fdc5f671447f30f11fb5afb.tar.gz
emacs-502b9b6441d9c3ce0fdc5f671447f30f11fb5afb.zip
entered into RCS
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c38
-rw-r--r--src/buffer.c2
-rw-r--r--src/dispextern.h26
-rw-r--r--src/dispnew.c850
-rw-r--r--src/indent.c16
5 files changed, 466 insertions, 466 deletions
diff --git a/src/alloc.c b/src/alloc.c
index c0d92e33802..ee2f2aff28b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -24,9 +24,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
24#ifndef standalone 24#ifndef standalone
25#include "buffer.h" 25#include "buffer.h"
26#include "window.h" 26#include "window.h"
27#ifdef MULTI_SCREEN 27#ifdef MULTI_FRAME
28#include "screen.h" 28#include "frame.h"
29#endif /* MULTI_SCREEN */ 29#endif /* MULTI_FRAME */
30#endif 30#endif
31 31
32#include "syssignal.h" 32#include "syssignal.h"
@@ -68,9 +68,9 @@ extern
68#endif /* VIRT_ADDR_VARIES */ 68#endif /* VIRT_ADDR_VARIES */
69 int malloc_sbrk_unused; 69 int malloc_sbrk_unused;
70 70
71/* Two thresholds controlling how much undo information to keep. */ 71/* Two limits controlling how much undo information to keep. */
72int undo_threshold; 72int undo_limit;
73int undo_high_threshold; 73int undo_strong_limit;
74 74
75/* Non-nil means defun should do purecopy on the function definition */ 75/* Non-nil means defun should do purecopy on the function definition */
76Lisp_Object Vpurify_flag; 76Lisp_Object Vpurify_flag;
@@ -1090,8 +1090,8 @@ Garbage collection happens automatically if you cons more than\n\
1090 So don't call truncate_undo_list if undo_list is Qt. */ 1090 So don't call truncate_undo_list if undo_list is Qt. */
1091 if (! EQ (nextb->undo_list, Qt)) 1091 if (! EQ (nextb->undo_list, Qt))
1092 nextb->undo_list 1092 nextb->undo_list
1093 = truncate_undo_list (nextb->undo_list, undo_threshold, 1093 = truncate_undo_list (nextb->undo_list, undo_limit,
1094 undo_high_threshold); 1094 undo_strong_limit);
1095 nextb = nextb->next; 1095 nextb = nextb->next;
1096 } 1096 }
1097 } 1097 }
@@ -1344,10 +1344,10 @@ mark_object (objptr)
1344 } 1344 }
1345 break; 1345 break;
1346 1346
1347#ifdef MULTI_SCREEN 1347#ifdef MULTI_FRAME
1348 case Lisp_Screen: 1348 case Lisp_Frame:
1349 { 1349 {
1350 register struct screen *ptr = XSCREEN (obj); 1350 register struct frame *ptr = XFRAME (obj);
1351 register int size = ptr->size; 1351 register int size = ptr->size;
1352 register int i; 1352 register int i;
1353 1353
@@ -1355,7 +1355,7 @@ mark_object (objptr)
1355 ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */ 1355 ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */
1356 1356
1357 mark_object (&ptr->name); 1357 mark_object (&ptr->name);
1358 mark_object (&ptr->focus_screen); 1358 mark_object (&ptr->focus_frame);
1359 mark_object (&ptr->width); 1359 mark_object (&ptr->width);
1360 mark_object (&ptr->height); 1360 mark_object (&ptr->height);
1361 mark_object (&ptr->selected_window); 1361 mark_object (&ptr->selected_window);
@@ -1363,7 +1363,7 @@ mark_object (objptr)
1363 mark_object (&ptr->param_alist); 1363 mark_object (&ptr->param_alist);
1364 } 1364 }
1365 break; 1365 break;
1366#endif /* MULTI_SCREEN */ 1366#endif /* MULTI_FRAME */
1367 1367
1368#if 0 1368#if 0
1369 case Lisp_Temp_Vector: 1369 case Lisp_Temp_Vector:
@@ -1900,20 +1900,20 @@ prevent garbage collection during a part of the program.");
1900 "Non-nil means loading Lisp code in order to dump an executable.\n\ 1900 "Non-nil means loading Lisp code in order to dump an executable.\n\
1901This means that certain objects should be allocated in shared (pure) space."); 1901This means that certain objects should be allocated in shared (pure) space.");
1902 1902
1903 DEFVAR_INT ("undo-threshold", &undo_threshold, 1903 DEFVAR_INT ("undo-limit", &undo_limit,
1904 "Keep no more undo information once it exceeds this size.\n\ 1904 "Keep no more undo information once it exceeds this size.\n\
1905This threshold is applied when garbage collection happens.\n\ 1905This limit is applied when garbage collection happens.\n\
1906The size is counted as the number of bytes occupied,\n\ 1906The size is counted as the number of bytes occupied,\n\
1907which includes both saved text and other data."); 1907which includes both saved text and other data.");
1908 undo_threshold = 20000; 1908 undo_limit = 20000;
1909 1909
1910 DEFVAR_INT ("undo-high-threshold", &undo_high_threshold, 1910 DEFVAR_INT ("undo-strong-limit", &undo_strong_limit,
1911 "Don't keep more than this much size of undo information.\n\ 1911 "Don't keep more than this much size of undo information.\n\
1912A command which pushes past this size is itself forgotten.\n\ 1912A command which pushes past this size is itself forgotten.\n\
1913This threshold is applied when garbage collection happens.\n\ 1913This limit is applied when garbage collection happens.\n\
1914The size is counted as the number of bytes occupied,\n\ 1914The size is counted as the number of bytes occupied,\n\
1915which includes both saved text and other data."); 1915which includes both saved text and other data.");
1916 undo_high_threshold = 30000; 1916 undo_strong_limit = 30000;
1917 1917
1918 defsubr (&Scons); 1918 defsubr (&Scons);
1919 defsubr (&Slist); 1919 defsubr (&Slist);
diff --git a/src/buffer.c b/src/buffer.c
index ad70801e812..2bd7cc52e05 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1455,7 +1455,7 @@ Automatically becomes buffer-local when set in any fashion.\n\
1455\n\ 1455\n\
1456Note that this is overridden by the variable\n\ 1456Note that this is overridden by the variable\n\
1457`truncate-partial-width-windows' if that variable is non-nil\n\ 1457`truncate-partial-width-windows' if that variable is non-nil\n\
1458and this buffer is not full-screen width."); 1458and this buffer is not full-frame width.");
1459 1459
1460 DEFVAR_PER_BUFFER ("default-directory", &current_buffer->directory, 1460 DEFVAR_PER_BUFFER ("default-directory", &current_buffer->directory,
1461 "Name of default directory of current buffer. Should end with slash.\n\ 1461 "Name of default directory of current buffer. Should end with slash.\n\
diff --git a/src/dispextern.h b/src/dispextern.h
index 19a0bfcecfa..87a84ad4d4d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -18,8 +18,8 @@ along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ 18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19 19
20/* Nonzero means don't assume anything about current 20/* Nonzero means don't assume anything about current
21 contents of actual terminal screen */ 21 contents of actual terminal frame */
22extern int screen_garbaged; 22extern int frame_garbaged;
23 23
24/* Nonzero means last display completed and cursor is really at 24/* Nonzero means last display completed and cursor is really at
25 cursX, cursY. Zero means it was preempted. */ 25 cursX, cursY. Zero means it was preempted. */
@@ -34,32 +34,32 @@ struct run
34}; 34};
35#endif 35#endif
36 36
37/* This structure is used for the actual display of text on a screen. 37/* This structure is used for the actual display of text on a frame.
38 38
39 There are two instantiations of it: the glyphs currently displayed, 39 There are two instantiations of it: the glyphs currently displayed,
40 and the glyphs we desire to display. The latter object is generated 40 and the glyphs we desire to display. The latter object is generated
41 from buffers being displayed. */ 41 from buffers being displayed. */
42 42
43struct screen_glyphs 43struct frame_glyphs
44 { 44 {
45#ifdef MULTI_SCREEN 45#ifdef MULTI_FRAME
46 struct screen *screen; /* Screen these glyphs belong to. */ 46 struct frame *frame; /* Frame these glyphs belong to. */
47#endif /* MULTI_SCREEN */ 47#endif /* MULTI_FRAME */
48 int height; 48 int height;
49 int width; 49 int width;
50 50
51 /* Contents of the screen. 51 /* Contents of the frame.
52 glyphs[V][H] is the glyph at position V, H. 52 glyphs[V][H] is the glyph at position V, H.
53 Note that glyphs[V][-1], 53 Note that glyphs[V][-1],
54 glyphs[V][used[V]], 54 glyphs[V][used[V]],
55 and glyphs[V][screen_width] are always '\0'. */ 55 and glyphs[V][frame_width] are always '\0'. */
56 GLYPH **glyphs; 56 GLYPH **glyphs;
57 /* long vector from which the strings in `glyphs' are taken. */ 57 /* long vector from which the strings in `glyphs' are taken. */
58 GLYPH *total_contents; 58 GLYPH *total_contents;
59 59
60 /* When representing a desired screen, 60 /* When representing a desired frame,
61 enable[n] == 0 means that line n is same as current screen. 61 enable[n] == 0 means that line n is same as current frame.
62 When representing current screen contents, 62 When representing current frame contents,
63 enable[n] == 0 means that line n is blank. */ 63 enable[n] == 0 means that line n is blank. */
64 char *enable; 64 char *enable;
65 65
@@ -90,6 +90,6 @@ struct screen_glyphs
90 90
91#define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font)) 91#define LINE_HEIGHT(s,n) (FONT_HEIGHT((s)->display.x->font))
92#define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \ 92#define LINE_WIDTH(s,n) (FONT_HEIGHT((s)->display.x->font) \
93 * SCREEN_CURRENT_GLYPHS(s)->enable[(n)]) 93 * FRAME_CURRENT_GLYPHS(s)->enable[(n)])
94 94
95extern void get_display_line (); 95extern void get_display_line ();
diff --git a/src/dispnew.c b/src/dispnew.c
index c5b802679d4..c8fc1cec8f8 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -30,7 +30,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
30#include "lisp.h" 30#include "lisp.h"
31#include "dispextern.h" 31#include "dispextern.h"
32#include "buffer.h" 32#include "buffer.h"
33#include "screen.h" 33#include "frame.h"
34#include "window.h" 34#include "window.h"
35#include "commands.h" 35#include "commands.h"
36#include "disptab.h" 36#include "disptab.h"
@@ -54,9 +54,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
54#endif 54#endif
55 55
56/* Nonzero upon entry to redisplay means do not assume anything about 56/* Nonzero upon entry to redisplay means do not assume anything about
57 current contents of actual terminal screen; clear and redraw it. */ 57 current contents of actual terminal frame; clear and redraw it. */
58 58
59int screen_garbaged; 59int frame_garbaged;
60 60
61/* Nonzero means last display completed. Zero means it was preempted. */ 61/* Nonzero means last display completed. Zero means it was preempted. */
62 62
@@ -67,7 +67,7 @@ int display_completed;
67 67
68int visible_bell; 68int visible_bell;
69 69
70/* Invert the color of the whole screen, at a low level. */ 70/* Invert the color of the whole frame, at a low level. */
71 71
72int inverse_video; 72int inverse_video;
73 73
@@ -101,27 +101,27 @@ Lisp_Object Vstandard_display_table;
101 negative means at beginning of line. */ 101 negative means at beginning of line. */
102int cursor_in_echo_area; 102int cursor_in_echo_area;
103 103
104/* The currently selected screen. 104/* The currently selected frame.
105 In a single-screen version, this variable always remains 0. */ 105 In a single-frame version, this variable always remains 0. */
106 106
107SCREEN_PTR selected_screen; 107FRAME_PTR selected_frame;
108 108
109/* A screen which is not just a minibuffer, or 0 if there are no such 109/* A frame which is not just a minibuffer, or 0 if there are no such
110 screens. This is usually the most recent such screen that was 110 frames. This is usually the most recent such frame that was
111 selected. In a single-screen version, this variable always remains 0. */ 111 selected. In a single-frame version, this variable always remains 0. */
112SCREEN_PTR last_nonminibuf_screen; 112FRAME_PTR last_nonminibuf_frame;
113 113
114/* In a single-screen version, the information that would otherwise 114/* In a single-frame version, the information that would otherwise
115 exist inside screen objects lives in the following structure instead. */ 115 exist inside frame objects lives in the following structure instead. */
116 116
117#ifndef MULTI_SCREEN 117#ifndef MULTI_FRAME
118struct screen the_only_screen; 118struct frame the_only_frame;
119#endif 119#endif
120 120
121/* This is a vector, made larger whenever it isn't large enough, 121/* This is a vector, made larger whenever it isn't large enough,
122 which is used inside `update_screen' to hold the old contents 122 which is used inside `update_frame' to hold the old contents
123 of the SCREEN_PHYS_LINES of the screen being updated. */ 123 of the FRAME_PHYS_LINES of the frame being updated. */
124struct screen_glyphs **ophys_lines; 124struct frame_glyphs **ophys_lines;
125/* Length of vector currently allocated. */ 125/* Length of vector currently allocated. */
126int ophys_lines_length; 126int ophys_lines_length;
127 127
@@ -135,55 +135,55 @@ int in_display; /* 1 if in redisplay: can't handle SIGWINCH now. */
135 135
136int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */ 136int delayed_size_change; /* 1 means SIGWINCH happened when not safe. */
137 137
138#ifdef MULTI_SCREEN 138#ifdef MULTI_FRAME
139 139
140DEFUN ("redraw-screen", Fredraw_screen, Sredraw_screen, 1, 1, 0, 140DEFUN ("redraw-frame", Fredraw_frame, Sredraw_frame, 1, 1, 0,
141 "Clear screen SCREEN and output again what is supposed to appear on it.") 141 "Clear frame FRAME and output again what is supposed to appear on it.")
142 (screen) 142 (frame)
143 Lisp_Object screen; 143 Lisp_Object frame;
144{ 144{
145 SCREEN_PTR s; 145 FRAME_PTR f;
146 146
147 CHECK_LIVE_SCREEN (screen, 0); 147 CHECK_LIVE_FRAME (frame, 0);
148 s = XSCREEN (screen); 148 f = XFRAME (frame);
149 update_begin (s); 149 update_begin (f);
150 /* set_terminal_modes (); */ 150 /* set_terminal_modes (); */
151 clear_screen (); 151 clear_frame ();
152 update_end (s); 152 update_end (f);
153 fflush (stdout); 153 fflush (stdout);
154 clear_screen_records (s); 154 clear_frame_records (f);
155 windows_or_buffers_changed++; 155 windows_or_buffers_changed++;
156 /* Mark all windows as INaccurate, 156 /* Mark all windows as INaccurate,
157 so that every window will have its redisplay done. */ 157 so that every window will have its redisplay done. */
158 mark_window_display_accurate (SCREEN_ROOT_WINDOW (s), 0); 158 mark_window_display_accurate (FRAME_ROOT_WINDOW (f), 0);
159 s->garbaged = 0; 159 f->garbaged = 0;
160 return Qnil; 160 return Qnil;
161} 161}
162 162
163DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "", 163DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, "",
164 "Redraw all screens marked as having their images garbled.") 164 "Redraw all frames marked as having their images garbled.")
165 () 165 ()
166{ 166{
167 Lisp_Object screen, tail; 167 Lisp_Object frame, tail;
168 168
169 for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) 169 for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr)
170 { 170 {
171 screen = XCONS (tail)->car; 171 frame = XCONS (tail)->car;
172 if (XSCREEN (screen)->garbaged && XSCREEN (screen)->visible) 172 if (XFRAME (frame)->garbaged && XFRAME (frame)->visible)
173 Fredraw_screen (screen); 173 Fredraw_frame (frame);
174 } 174 }
175 return Qnil; 175 return Qnil;
176} 176}
177 177
178redraw_screen (s) 178redraw_frame (f)
179 SCREEN_PTR s; 179 FRAME_PTR f;
180{ 180{
181 Lisp_Object screen; 181 Lisp_Object frame;
182 XSET (screen, Lisp_Screen, s); 182 XSET (frame, Lisp_Frame, f);
183 Fredraw_screen (screen); 183 Fredraw_frame (frame);
184} 184}
185 185
186#else /* not MULTI_SCREEN */ 186#else /* not MULTI_FRAME */
187 187
188DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, 0, 188DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, 0,
189 "Clear screen and output again what is supposed to appear on it.") 189 "Clear screen and output again what is supposed to appear on it.")
@@ -191,10 +191,10 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, 0,
191{ 191{
192 update_begin (0); 192 update_begin (0);
193 set_terminal_modes (); 193 set_terminal_modes ();
194 clear_screen (); 194 clear_frame ();
195 update_end (0); 195 update_end (0);
196 fflush (stdout); 196 fflush (stdout);
197 clear_screen_records (0); 197 clear_frame_records (0);
198 windows_or_buffers_changed++; 198 windows_or_buffers_changed++;
199 /* Mark all windows as INaccurate, 199 /* Mark all windows as INaccurate,
200 so that every window will have its redisplay done. */ 200 so that every window will have its redisplay done. */
@@ -202,20 +202,20 @@ DEFUN ("redraw-display", Fredraw_display, Sredraw_display, 0, 0, 0,
202 return Qnil; 202 return Qnil;
203} 203}
204 204
205#endif /* not MULTI_SCREEN */ 205#endif /* not MULTI_FRAME */
206 206
207static struct screen_glyphs * 207static struct frame_glyphs *
208make_screen_glyphs (screen, empty) 208make_frame_glyphs (frame, empty)
209 register SCREEN_PTR screen; 209 register FRAME_PTR frame;
210 int empty; 210 int empty;
211{ 211{
212 register int i; 212 register int i;
213 register width = SCREEN_WIDTH (screen); 213 register width = FRAME_WIDTH (frame);
214 register height = SCREEN_HEIGHT (screen); 214 register height = FRAME_HEIGHT (frame);
215 register struct screen_glyphs *new = 215 register struct frame_glyphs *new =
216 (struct screen_glyphs *) xmalloc (sizeof (struct screen_glyphs)); 216 (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs));
217 217
218 SET_GLYPHS_SCREEN (new, screen); 218 SET_GLYPHS_FRAME (new, frame);
219 new->height = height; 219 new->height = height;
220 new->width = width; 220 new->width = width;
221 new->used = (int *) xmalloc (height * sizeof (int)); 221 new->used = (int *) xmalloc (height * sizeof (int));
@@ -226,7 +226,7 @@ make_screen_glyphs (screen, empty)
226 new->bufp = (int *) xmalloc (height * sizeof (int)); 226 new->bufp = (int *) xmalloc (height * sizeof (int));
227 227
228#ifdef HAVE_X_WINDOWS 228#ifdef HAVE_X_WINDOWS
229 if (SCREEN_IS_X (screen)) 229 if (FRAME_IS_X (frame))
230 { 230 {
231 new->nruns = (int *) xmalloc (height * sizeof (int)); 231 new->nruns = (int *) xmalloc (height * sizeof (int));
232 new->face_list 232 new->face_list
@@ -241,7 +241,7 @@ make_screen_glyphs (screen, empty)
241 if (empty) 241 if (empty)
242 { 242 {
243 /* Make the buffer used by decode_mode_spec. This buffer is also 243 /* Make the buffer used by decode_mode_spec. This buffer is also
244 used as temporary storage when updating the screen. See scroll.c. */ 244 used as temporary storage when updating the frame. See scroll.c. */
245 unsigned int total_glyphs = (width + 2) * sizeof (GLYPH); 245 unsigned int total_glyphs = (width + 2) * sizeof (GLYPH);
246 246
247 new->total_contents = (GLYPH *) xmalloc (total_glyphs); 247 new->total_contents = (GLYPH *) xmalloc (total_glyphs);
@@ -261,9 +261,9 @@ make_screen_glyphs (screen, empty)
261} 261}
262 262
263static void 263static void
264free_screen_glyphs (screen, glyphs) 264free_frame_glyphs (frame, glyphs)
265 SCREEN_PTR screen; 265 FRAME_PTR frame;
266 struct screen_glyphs *glyphs; 266 struct frame_glyphs *glyphs;
267{ 267{
268 if (glyphs->total_contents) 268 if (glyphs->total_contents)
269 free (glyphs->total_contents); 269 free (glyphs->total_contents);
@@ -275,7 +275,7 @@ free_screen_glyphs (screen, glyphs)
275 free (glyphs->bufp); 275 free (glyphs->bufp);
276 276
277#ifdef HAVE_X_WINDOWS 277#ifdef HAVE_X_WINDOWS
278 if (SCREEN_IS_X (screen)) 278 if (FRAME_IS_X (frame))
279 { 279 {
280 free (glyphs->nruns); 280 free (glyphs->nruns);
281 free (glyphs->face_list); 281 free (glyphs->face_list);
@@ -290,35 +290,35 @@ free_screen_glyphs (screen, glyphs)
290} 290}
291 291
292static void 292static void
293remake_screen_glyphs (screen) 293remake_frame_glyphs (frame)
294 SCREEN_PTR screen; 294 FRAME_PTR frame;
295{ 295{
296 if (SCREEN_CURRENT_GLYPHS (screen)) 296 if (FRAME_CURRENT_GLYPHS (frame))
297 free_screen_glyphs (screen, SCREEN_CURRENT_GLYPHS (screen)); 297 free_frame_glyphs (frame, FRAME_CURRENT_GLYPHS (frame));
298 if (SCREEN_DESIRED_GLYPHS (screen)) 298 if (FRAME_DESIRED_GLYPHS (frame))
299 free_screen_glyphs (screen, SCREEN_DESIRED_GLYPHS (screen)); 299 free_frame_glyphs (frame, FRAME_DESIRED_GLYPHS (frame));
300 if (SCREEN_TEMP_GLYPHS (screen)) 300 if (FRAME_TEMP_GLYPHS (frame))
301 free_screen_glyphs (screen, SCREEN_TEMP_GLYPHS (screen)); 301 free_frame_glyphs (frame, FRAME_TEMP_GLYPHS (frame));
302 302
303 if (SCREEN_MESSAGE_BUF (screen)) 303 if (FRAME_MESSAGE_BUF (frame))
304 SCREEN_MESSAGE_BUF (screen) 304 FRAME_MESSAGE_BUF (frame)
305 = (char *) xrealloc (SCREEN_MESSAGE_BUF (screen), 305 = (char *) xrealloc (FRAME_MESSAGE_BUF (frame),
306 SCREEN_WIDTH (screen) + 1); 306 FRAME_WIDTH (frame) + 1);
307 else 307 else
308 SCREEN_MESSAGE_BUF (screen) 308 FRAME_MESSAGE_BUF (frame)
309 = (char *) xmalloc (SCREEN_WIDTH (screen) + 1); 309 = (char *) xmalloc (FRAME_WIDTH (frame) + 1);
310 310
311 SCREEN_CURRENT_GLYPHS (screen) = make_screen_glyphs (screen, 0); 311 FRAME_CURRENT_GLYPHS (frame) = make_frame_glyphs (frame, 0);
312 SCREEN_DESIRED_GLYPHS (screen) = make_screen_glyphs (screen, 0); 312 FRAME_DESIRED_GLYPHS (frame) = make_frame_glyphs (frame, 0);
313 SCREEN_TEMP_GLYPHS (screen) = make_screen_glyphs (screen, 1); 313 FRAME_TEMP_GLYPHS (frame) = make_frame_glyphs (frame, 1);
314 SET_SCREEN_GARBAGED (screen); 314 SET_FRAME_GARBAGED (frame);
315} 315}
316 316
317/* Return the hash code of contents of line VPOS in screen-matrix M. */ 317/* Return the hash code of contents of line VPOS in frame-matrix M. */
318 318
319static int 319static int
320line_hash_code (m, vpos) 320line_hash_code (m, vpos)
321 register struct screen_glyphs *m; 321 register struct frame_glyphs *m;
322 int vpos; 322 int vpos;
323{ 323{
324 register GLYPH *body, *end; 324 register GLYPH *body, *end;
@@ -364,7 +364,7 @@ line_hash_code (m, vpos)
364 364
365static unsigned int 365static unsigned int
366line_draw_cost (m, vpos) 366line_draw_cost (m, vpos)
367 struct screen_glyphs *m; 367 struct frame_glyphs *m;
368 int vpos; 368 int vpos;
369{ 369{
370 register GLYPH *beg = m->glyphs[vpos]; 370 register GLYPH *beg = m->glyphs[vpos];
@@ -407,37 +407,37 @@ line_draw_cost (m, vpos)
407/* The functions on this page are the interface from xdisp.c to redisplay. 407/* The functions on this page are the interface from xdisp.c to redisplay.
408 408
409 The only other interface into redisplay is through setting 409 The only other interface into redisplay is through setting
410 SCREEN_CURSOR_X (screen) and SCREEN_CURSOR_Y (screen) 410 FRAME_CURSOR_X (frame) and FRAME_CURSOR_Y (frame)
411 and SET_SCREEN_GARBAGED (screen). */ 411 and SET_FRAME_GARBAGED (frame). */
412 412
413/* cancel_line eliminates any request to display a line at position `vpos' */ 413/* cancel_line eliminates any request to display a line at position `vpos' */
414 414
415cancel_line (vpos, screen) 415cancel_line (vpos, frame)
416 int vpos; 416 int vpos;
417 register SCREEN_PTR screen; 417 register FRAME_PTR frame;
418{ 418{
419 SCREEN_DESIRED_GLYPHS (screen)->enable[vpos] = 0; 419 FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0;
420} 420}
421 421
422clear_screen_records (screen) 422clear_frame_records (frame)
423 register SCREEN_PTR screen; 423 register FRAME_PTR frame;
424{ 424{
425 bzero (SCREEN_CURRENT_GLYPHS (screen)->enable, SCREEN_HEIGHT (screen)); 425 bzero (FRAME_CURRENT_GLYPHS (frame)->enable, FRAME_HEIGHT (frame));
426} 426}
427 427
428/* Prepare to display on line VPOS starting at HPOS within it. */ 428/* Prepare to display on line VPOS starting at HPOS within it. */
429 429
430void 430void
431get_display_line (screen, vpos, hpos) 431get_display_line (frame, vpos, hpos)
432 register SCREEN_PTR screen; 432 register FRAME_PTR frame;
433 int vpos; 433 int vpos;
434 register int hpos; 434 register int hpos;
435{ 435{
436 register struct screen_glyphs *glyphs; 436 register struct frame_glyphs *glyphs;
437 register struct screen_glyphs *desired_glyphs = SCREEN_DESIRED_GLYPHS (screen); 437 register struct frame_glyphs *desired_glyphs = FRAME_DESIRED_GLYPHS (frame);
438 register GLYPH *p; 438 register GLYPH *p;
439 439
440 if (vpos < 0 || (! SCREEN_VISIBLE_P (screen))) 440 if (vpos < 0 || (! FRAME_VISIBLE_P (frame)))
441 abort (); 441 abort ();
442 442
443 if ((desired_glyphs->enable[vpos]) && desired_glyphs->used[vpos] > hpos) 443 if ((desired_glyphs->enable[vpos]) && desired_glyphs->used[vpos] > hpos)
@@ -569,13 +569,13 @@ rotate_vector (vector, size, distance)
569 Returns nonzero if done, zero if terminal cannot scroll them. */ 569 Returns nonzero if done, zero if terminal cannot scroll them. */
570 570
571int 571int
572scroll_screen_lines (screen, from, end, amount) 572scroll_frame_lines (frame, from, end, amount)
573 register SCREEN_PTR screen; 573 register FRAME_PTR frame;
574 int from, end, amount; 574 int from, end, amount;
575{ 575{
576 register int i; 576 register int i;
577 register struct screen_glyphs *current_screen 577 register struct frame_glyphs *current_frame
578 = SCREEN_CURRENT_GLYPHS (screen); 578 = FRAME_CURRENT_GLYPHS (frame);
579 579
580 if (!line_ins_del_ok) 580 if (!line_ins_del_ok)
581 return 0; 581 return 0;
@@ -585,193 +585,193 @@ scroll_screen_lines (screen, from, end, amount)
585 585
586 if (amount > 0) 586 if (amount > 0)
587 { 587 {
588 update_begin (screen); 588 update_begin (frame);
589 set_terminal_window (end + amount); 589 set_terminal_window (end + amount);
590 if (!scroll_region_ok) 590 if (!scroll_region_ok)
591 ins_del_lines (end, -amount); 591 ins_del_lines (end, -amount);
592 ins_del_lines (from, amount); 592 ins_del_lines (from, amount);
593 set_terminal_window (0); 593 set_terminal_window (0);
594 594
595 rotate_vector (current_screen->glyphs + from, 595 rotate_vector (current_frame->glyphs + from,
596 sizeof (GLYPH *) * (end + amount - from), 596 sizeof (GLYPH *) * (end + amount - from),
597 amount * sizeof (GLYPH *)); 597 amount * sizeof (GLYPH *));
598 598
599 safe_bcopy (current_screen->used + from, 599 safe_bcopy (current_frame->used + from,
600 current_screen->used + from + amount, 600 current_frame->used + from + amount,
601 (end - from) * sizeof current_screen->used[0]); 601 (end - from) * sizeof current_frame->used[0]);
602 602
603 safe_bcopy (current_screen->highlight + from, 603 safe_bcopy (current_frame->highlight + from,
604 current_screen->highlight + from + amount, 604 current_frame->highlight + from + amount,
605 (end - from) * sizeof current_screen->highlight[0]); 605 (end - from) * sizeof current_frame->highlight[0]);
606 606
607 safe_bcopy (current_screen->enable + from, 607 safe_bcopy (current_frame->enable + from,
608 current_screen->enable + from + amount, 608 current_frame->enable + from + amount,
609 (end - from) * sizeof current_screen->enable[0]); 609 (end - from) * sizeof current_frame->enable[0]);
610 610
611 /* Mark the lines made empty by scrolling as enabled, empty and 611 /* Mark the lines made empty by scrolling as enabled, empty and
612 normal video. */ 612 normal video. */
613 bzero (current_screen->used + from, 613 bzero (current_frame->used + from,
614 amount * sizeof current_screen->used[0]); 614 amount * sizeof current_frame->used[0]);
615 bzero (current_screen->highlight + from, 615 bzero (current_frame->highlight + from,
616 amount * sizeof current_screen->highlight[0]); 616 amount * sizeof current_frame->highlight[0]);
617 for (i = from; i < from + amount; i++) 617 for (i = from; i < from + amount; i++)
618 { 618 {
619 current_screen->glyphs[i][0] = '\0'; 619 current_frame->glyphs[i][0] = '\0';
620 current_screen->enable[i] = 1; 620 current_frame->enable[i] = 1;
621 } 621 }
622 622
623 safe_bcopy (current_screen->bufp + from, 623 safe_bcopy (current_frame->bufp + from,
624 current_screen->bufp + from + amount, 624 current_frame->bufp + from + amount,
625 (end - from) * sizeof current_screen->bufp[0]); 625 (end - from) * sizeof current_frame->bufp[0]);
626 626
627#ifdef HAVE_X_WINDOWS 627#ifdef HAVE_X_WINDOWS
628 if (SCREEN_IS_X (screen)) 628 if (FRAME_IS_X (frame))
629 { 629 {
630 safe_bcopy (current_screen->nruns + from, 630 safe_bcopy (current_frame->nruns + from,
631 current_screen->nruns + from + amount, 631 current_frame->nruns + from + amount,
632 (end - from) * sizeof current_screen->nruns[0]); 632 (end - from) * sizeof current_frame->nruns[0]);
633 633
634 safe_bcopy (current_screen->face_list + from, 634 safe_bcopy (current_frame->face_list + from,
635 current_screen->face_list + from + amount, 635 current_frame->face_list + from + amount,
636 (end - from) * sizeof current_screen->face_list[0]); 636 (end - from) * sizeof current_frame->face_list[0]);
637 637
638 safe_bcopy (current_screen->top_left_x + from, 638 safe_bcopy (current_frame->top_left_x + from,
639 current_screen->top_left_x + from + amount, 639 current_frame->top_left_x + from + amount,
640 (end - from) * sizeof current_screen->top_left_x[0]); 640 (end - from) * sizeof current_frame->top_left_x[0]);
641 641
642 safe_bcopy (current_screen->top_left_y + from, 642 safe_bcopy (current_frame->top_left_y + from,
643 current_screen->top_left_y + from + amount, 643 current_frame->top_left_y + from + amount,
644 (end - from) * sizeof current_screen->top_left_y[0]); 644 (end - from) * sizeof current_frame->top_left_y[0]);
645 645
646 safe_bcopy (current_screen->pix_width + from, 646 safe_bcopy (current_frame->pix_width + from,
647 current_screen->pix_width + from + amount, 647 current_frame->pix_width + from + amount,
648 (end - from) * sizeof current_screen->pix_width[0]); 648 (end - from) * sizeof current_frame->pix_width[0]);
649 649
650 safe_bcopy (current_screen->pix_height + from, 650 safe_bcopy (current_frame->pix_height + from,
651 current_screen->pix_height + from + amount, 651 current_frame->pix_height + from + amount,
652 (end - from) * sizeof current_screen->pix_height[0]); 652 (end - from) * sizeof current_frame->pix_height[0]);
653 } 653 }
654#endif /* HAVE_X_WINDOWS */ 654#endif /* HAVE_X_WINDOWS */
655 655
656 update_end (screen); 656 update_end (frame);
657 } 657 }
658 if (amount < 0) 658 if (amount < 0)
659 { 659 {
660 update_begin (screen); 660 update_begin (frame);
661 set_terminal_window (end); 661 set_terminal_window (end);
662 ins_del_lines (from + amount, amount); 662 ins_del_lines (from + amount, amount);
663 if (!scroll_region_ok) 663 if (!scroll_region_ok)
664 ins_del_lines (end + amount, -amount); 664 ins_del_lines (end + amount, -amount);
665 set_terminal_window (0); 665 set_terminal_window (0);
666 666
667 rotate_vector (current_screen->glyphs + from + amount, 667 rotate_vector (current_frame->glyphs + from + amount,
668 sizeof (GLYPH *) * (end - from - amount), 668 sizeof (GLYPH *) * (end - from - amount),
669 amount * sizeof (GLYPH *)); 669 amount * sizeof (GLYPH *));
670 670
671 safe_bcopy (current_screen->used + from, 671 safe_bcopy (current_frame->used + from,
672 current_screen->used + from + amount, 672 current_frame->used + from + amount,
673 (end - from) * sizeof current_screen->used[0]); 673 (end - from) * sizeof current_frame->used[0]);
674 674
675 safe_bcopy (current_screen->highlight + from, 675 safe_bcopy (current_frame->highlight + from,
676 current_screen->highlight + from + amount, 676 current_frame->highlight + from + amount,
677 (end - from) * sizeof current_screen->highlight[0]); 677 (end - from) * sizeof current_frame->highlight[0]);
678 678
679 safe_bcopy (current_screen->enable + from, 679 safe_bcopy (current_frame->enable + from,
680 current_screen->enable + from + amount, 680 current_frame->enable + from + amount,
681 (end - from) * sizeof current_screen->enable[0]); 681 (end - from) * sizeof current_frame->enable[0]);
682 682
683 /* Mark the lines made empty by scrolling as enabled, empty and 683 /* Mark the lines made empty by scrolling as enabled, empty and
684 normal video. */ 684 normal video. */
685 bzero (current_screen->used + end + amount, 685 bzero (current_frame->used + end + amount,
686 - amount * sizeof current_screen->used[0]); 686 - amount * sizeof current_frame->used[0]);
687 bzero (current_screen->highlight + end + amount, 687 bzero (current_frame->highlight + end + amount,
688 - amount * sizeof current_screen->highlight[0]); 688 - amount * sizeof current_frame->highlight[0]);
689 for (i = end + amount; i < end; i++) 689 for (i = end + amount; i < end; i++)
690 { 690 {
691 current_screen->glyphs[i][0] = '\0'; 691 current_frame->glyphs[i][0] = '\0';
692 current_screen->enable[i] = 1; 692 current_frame->enable[i] = 1;
693 } 693 }
694 694
695 safe_bcopy (current_screen->bufp + from, 695 safe_bcopy (current_frame->bufp + from,
696 current_screen->bufp + from + amount, 696 current_frame->bufp + from + amount,
697 (end - from) * sizeof current_screen->bufp[0]); 697 (end - from) * sizeof current_frame->bufp[0]);
698 698
699#ifdef HAVE_X_WINDOWS 699#ifdef HAVE_X_WINDOWS
700 if (SCREEN_IS_X (screen)) 700 if (FRAME_IS_X (frame))
701 { 701 {
702 safe_bcopy (current_screen->nruns + from, 702 safe_bcopy (current_frame->nruns + from,
703 current_screen->nruns + from + amount, 703 current_frame->nruns + from + amount,
704 (end - from) * sizeof current_screen->nruns[0]); 704 (end - from) * sizeof current_frame->nruns[0]);
705 705
706 safe_bcopy (current_screen->face_list + from, 706 safe_bcopy (current_frame->face_list + from,
707 current_screen->face_list + from + amount, 707 current_frame->face_list + from + amount,
708 (end - from) * sizeof current_screen->face_list[0]); 708 (end - from) * sizeof current_frame->face_list[0]);
709 709
710 safe_bcopy (current_screen->top_left_x + from, 710 safe_bcopy (current_frame->top_left_x + from,
711 current_screen->top_left_x + from + amount, 711 current_frame->top_left_x + from + amount,
712 (end - from) * sizeof current_screen->top_left_x[0]); 712 (end - from) * sizeof current_frame->top_left_x[0]);
713 713
714 safe_bcopy (current_screen->top_left_y + from, 714 safe_bcopy (current_frame->top_left_y + from,
715 current_screen->top_left_y + from + amount, 715 current_frame->top_left_y + from + amount,
716 (end - from) * sizeof current_screen->top_left_y[0]); 716 (end - from) * sizeof current_frame->top_left_y[0]);
717 717
718 safe_bcopy (current_screen->pix_width + from, 718 safe_bcopy (current_frame->pix_width + from,
719 current_screen->pix_width + from + amount, 719 current_frame->pix_width + from + amount,
720 (end - from) * sizeof current_screen->pix_width[0]); 720 (end - from) * sizeof current_frame->pix_width[0]);
721 721
722 safe_bcopy (current_screen->pix_height + from, 722 safe_bcopy (current_frame->pix_height + from,
723 current_screen->pix_height + from + amount, 723 current_frame->pix_height + from + amount,
724 (end - from) * sizeof current_screen->pix_height[0]); 724 (end - from) * sizeof current_frame->pix_height[0]);
725 } 725 }
726#endif /* HAVE_X_WINDOWS */ 726#endif /* HAVE_X_WINDOWS */
727 727
728 update_end (screen); 728 update_end (frame);
729 } 729 }
730 return 1; 730 return 1;
731} 731}
732 732
733/* After updating a window W that isn't the full screen wide, 733/* After updating a window W that isn't the full frame wide,
734 copy all the columns that W does not occupy 734 copy all the columns that W does not occupy
735 into the SCREEN_DESIRED_GLYPHS (screen) from the SCREEN_PHYS_GLYPHS (screen) 735 into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame)
736 so that update_screen will not change those columns. */ 736 so that update_frame will not change those columns. */
737 737
738preserve_other_columns (w) 738preserve_other_columns (w)
739 struct window *w; 739 struct window *w;
740{ 740{
741 register int vpos; 741 register int vpos;
742 register struct screen_glyphs *current_screen, *desired_screen; 742 register struct frame_glyphs *current_frame, *desired_frame;
743 register SCREEN_PTR screen = XSCREEN (w->screen); 743 register FRAME_PTR frame = XFRAME (w->frame);
744 int start = XFASTINT (w->left); 744 int start = XFASTINT (w->left);
745 int end = XFASTINT (w->left) + XFASTINT (w->width); 745 int end = XFASTINT (w->left) + XFASTINT (w->width);
746 int bot = XFASTINT (w->top) + XFASTINT (w->height); 746 int bot = XFASTINT (w->top) + XFASTINT (w->height);
747 747
748 current_screen = SCREEN_CURRENT_GLYPHS (screen); 748 current_frame = FRAME_CURRENT_GLYPHS (frame);
749 desired_screen = SCREEN_DESIRED_GLYPHS (screen); 749 desired_frame = FRAME_DESIRED_GLYPHS (frame);
750 750
751 for (vpos = XFASTINT (w->top); vpos < bot; vpos++) 751 for (vpos = XFASTINT (w->top); vpos < bot; vpos++)
752 { 752 {
753 if (current_screen->enable[vpos] && desired_screen->enable[vpos]) 753 if (current_frame->enable[vpos] && desired_frame->enable[vpos])
754 { 754 {
755 if (start > 0) 755 if (start > 0)
756 { 756 {
757 int len; 757 int len;
758 758
759 bcopy (current_screen->glyphs[vpos], 759 bcopy (current_frame->glyphs[vpos],
760 desired_screen->glyphs[vpos], start); 760 desired_frame->glyphs[vpos], start);
761 len = min (start, current_screen->used[vpos]); 761 len = min (start, current_frame->used[vpos]);
762 if (desired_screen->used[vpos] < len) 762 if (desired_frame->used[vpos] < len)
763 desired_screen->used[vpos] = len; 763 desired_frame->used[vpos] = len;
764 } 764 }
765 if (current_screen->used[vpos] > end 765 if (current_frame->used[vpos] > end
766 && desired_screen->used[vpos] < current_screen->used[vpos]) 766 && desired_frame->used[vpos] < current_frame->used[vpos])
767 { 767 {
768 while (desired_screen->used[vpos] < end) 768 while (desired_frame->used[vpos] < end)
769 desired_screen->glyphs[vpos][desired_screen->used[vpos]++] 769 desired_frame->glyphs[vpos][desired_frame->used[vpos]++]
770 = SPACEGLYPH; 770 = SPACEGLYPH;
771 bcopy (current_screen->glyphs[vpos] + end, 771 bcopy (current_frame->glyphs[vpos] + end,
772 desired_screen->glyphs[vpos] + end, 772 desired_frame->glyphs[vpos] + end,
773 current_screen->used[vpos] - end); 773 current_frame->used[vpos] - end);
774 desired_screen->used[vpos] = current_screen->used[vpos]; 774 desired_frame->used[vpos] = current_frame->used[vpos];
775 } 775 }
776 } 776 }
777 } 777 }
@@ -779,10 +779,10 @@ preserve_other_columns (w)
779 779
780#if 0 780#if 0
781 781
782/* If window w does not need to be updated and isn't the full screen wide, 782/* If window w does not need to be updated and isn't the full frame wide,
783 copy all the columns that w does occupy 783 copy all the columns that w does occupy
784 into the SCREEN_DESIRED_LINES (screen) from the SCREEN_PHYS_LINES (screen) 784 into the FRAME_DESIRED_LINES (frame) from the FRAME_PHYS_LINES (frame)
785 so that update_screen will not change those columns. 785 so that update_frame will not change those columns.
786 786
787 Have not been able to figure out how to use this correctly. */ 787 Have not been able to figure out how to use this correctly. */
788 788
@@ -790,16 +790,16 @@ preserve_my_columns (w)
790 struct window *w; 790 struct window *w;
791{ 791{
792 register int vpos, fin; 792 register int vpos, fin;
793 register struct screen_glyphs *l1, *l2; 793 register struct frame_glyphs *l1, *l2;
794 register SCREEN_PTR screen = XSCREEN (w->screen); 794 register FRAME_PTR frame = XFRAME (w->frame);
795 int start = XFASTINT (w->left); 795 int start = XFASTINT (w->left);
796 int end = XFASTINT (w->left) + XFASTINT (w->width); 796 int end = XFASTINT (w->left) + XFASTINT (w->width);
797 int bot = XFASTINT (w->top) + XFASTINT (w->height); 797 int bot = XFASTINT (w->top) + XFASTINT (w->height);
798 798
799 for (vpos = XFASTINT (w->top); vpos < bot; vpos++) 799 for (vpos = XFASTINT (w->top); vpos < bot; vpos++)
800 { 800 {
801 if ((l1 = SCREEN_DESIRED_GLYPHS (screen)->glyphs[vpos + 1]) 801 if ((l1 = FRAME_DESIRED_GLYPHS (frame)->glyphs[vpos + 1])
802 && (l2 = SCREEN_PHYS_GLYPHS (screen)->glyphs[vpos + 1])) 802 && (l2 = FRAME_PHYS_GLYPHS (frame)->glyphs[vpos + 1]))
803 { 803 {
804 if (l2->length > start && l1->length < l2->length) 804 if (l2->length > start && l1->length < l2->length)
805 { 805 {
@@ -824,8 +824,8 @@ cancel_my_columns (w)
824 struct window *w; 824 struct window *w;
825{ 825{
826 register int vpos; 826 register int vpos;
827 register struct screen_glyphs *desired_glyphs = 827 register struct frame_glyphs *desired_glyphs =
828 SCREEN_DESIRED_GLYPHS (XSCREEN (w->screen)); 828 FRAME_DESIRED_GLYPHS (XFRAME (w->frame));
829 register int start = XFASTINT (w->left); 829 register int start = XFASTINT (w->left);
830 register int bot = XFASTINT (w->top) + XFASTINT (w->height); 830 register int bot = XFASTINT (w->top) + XFASTINT (w->height);
831 831
@@ -835,11 +835,11 @@ cancel_my_columns (w)
835 desired_glyphs->used[vpos] = start; 835 desired_glyphs->used[vpos] = start;
836} 836}
837 837
838/* These functions try to perform directly and immediately on the screen 838/* These functions try to perform directly and immediately on the frame
839 the necessary output for one change in the buffer. 839 the necessary output for one change in the buffer.
840 They may return 0 meaning nothing was done if anything is difficult, 840 They may return 0 meaning nothing was done if anything is difficult,
841 or 1 meaning the output was performed properly. 841 or 1 meaning the output was performed properly.
842 They assume that the screen was up to date before the buffer 842 They assume that the frame was up to date before the buffer
843 change being displayed. THey make various other assumptions too; 843 change being displayed. THey make various other assumptions too;
844 see command_loop_1 where these are called. */ 844 see command_loop_1 where these are called. */
845 845
@@ -847,9 +847,9 @@ int
847direct_output_for_insert (g) 847direct_output_for_insert (g)
848 int g; 848 int g;
849{ 849{
850 register SCREEN_PTR screen = selected_screen; 850 register FRAME_PTR frame = selected_frame;
851 register struct screen_glyphs *current_screen 851 register struct frame_glyphs *current_frame
852 = SCREEN_CURRENT_GLYPHS (screen); 852 = FRAME_CURRENT_GLYPHS (frame);
853 853
854#ifndef COMPILER_REGISTER_BUG 854#ifndef COMPILER_REGISTER_BUG
855 register 855 register
@@ -858,11 +858,11 @@ direct_output_for_insert (g)
858#ifndef COMPILER_REGISTER_BUG 858#ifndef COMPILER_REGISTER_BUG
859 register 859 register
860#endif /* COMPILER_REGISTER_BUG */ 860#endif /* COMPILER_REGISTER_BUG */
861 int hpos = SCREEN_CURSOR_X (screen); 861 int hpos = FRAME_CURSOR_X (frame);
862#ifndef COMPILER_REGISTER_BUG 862#ifndef COMPILER_REGISTER_BUG
863 register 863 register
864#endif /* COMPILER_REGISTER_BUG */ 864#endif /* COMPILER_REGISTER_BUG */
865 int vpos = SCREEN_CURSOR_Y (screen); 865 int vpos = FRAME_CURSOR_Y (frame);
866 866
867 /* Give up if about to continue line */ 867 /* Give up if about to continue line */
868 if (hpos - XFASTINT (w->left) + 1 + 1 >= XFASTINT (w->width) 868 if (hpos - XFASTINT (w->left) + 1 + 1 >= XFASTINT (w->width)
@@ -871,10 +871,10 @@ direct_output_for_insert (g)
871 || (XINT (w->hscroll) && hpos == XFASTINT (w->left)) 871 || (XINT (w->hscroll) && hpos == XFASTINT (w->left))
872 872
873 /* Give up if cursor outside window (in minibuf, probably) */ 873 /* Give up if cursor outside window (in minibuf, probably) */
874 || SCREEN_CURSOR_Y (screen) < XFASTINT (w->top) 874 || FRAME_CURSOR_Y (frame) < XFASTINT (w->top)
875 || SCREEN_CURSOR_Y (screen) >= XFASTINT (w->top) + XFASTINT (w->height) 875 || FRAME_CURSOR_Y (frame) >= XFASTINT (w->top) + XFASTINT (w->height)
876 876
877 /* Give up if cursor not really at SCREEN_CURSOR_X, SCREEN_CURSOR_Y */ 877 /* Give up if cursor not really at FRAME_CURSOR_X, FRAME_CURSOR_Y */
878 || !display_completed 878 || !display_completed
879 879
880 /* Give up if buffer appears in two places. */ 880 /* Give up if buffer appears in two places. */
@@ -884,7 +884,7 @@ direct_output_for_insert (g)
884 || (MINI_WINDOW_P (w) && echo_area_glyphs)) 884 || (MINI_WINDOW_P (w) && echo_area_glyphs))
885 return 0; 885 return 0;
886 886
887 current_screen->glyphs[vpos][hpos] = g; 887 current_frame->glyphs[vpos][hpos] = g;
888 unchanged_modified = MODIFF; 888 unchanged_modified = MODIFF;
889 beg_unchanged = GPT - BEG; 889 beg_unchanged = GPT - BEG;
890 XFASTINT (w->last_point) = point; 890 XFASTINT (w->last_point) = point;
@@ -892,13 +892,13 @@ direct_output_for_insert (g)
892 XFASTINT (w->last_modified) = MODIFF; 892 XFASTINT (w->last_modified) = MODIFF;
893 893
894 reassert_line_highlight (0, vpos); 894 reassert_line_highlight (0, vpos);
895 write_glyphs (&current_screen->glyphs[vpos][hpos], 1); 895 write_glyphs (&current_frame->glyphs[vpos][hpos], 1);
896 fflush (stdout); 896 fflush (stdout);
897 ++SCREEN_CURSOR_X (screen); 897 ++FRAME_CURSOR_X (frame);
898 if (hpos == current_screen->used[vpos]) 898 if (hpos == current_frame->used[vpos])
899 { 899 {
900 current_screen->used[vpos] = hpos + 1; 900 current_frame->used[vpos] = hpos + 1;
901 current_screen->glyphs[vpos][hpos + 1] = 0; 901 current_frame->glyphs[vpos][hpos + 1] = 0;
902 } 902 }
903 903
904 return 1; 904 return 1;
@@ -908,42 +908,42 @@ int
908direct_output_forward_char (n) 908direct_output_forward_char (n)
909 int n; 909 int n;
910{ 910{
911 register SCREEN_PTR screen = selected_screen; 911 register FRAME_PTR frame = selected_frame;
912 register struct window *w = XWINDOW (selected_window); 912 register struct window *w = XWINDOW (selected_window);
913 913
914 /* Avoid losing if cursor is in invisible text off left margin 914 /* Avoid losing if cursor is in invisible text off left margin
915 or about to go off either side of window. */ 915 or about to go off either side of window. */
916 if ((SCREEN_CURSOR_X (screen) == XFASTINT (w->left) 916 if ((FRAME_CURSOR_X (frame) == XFASTINT (w->left)
917 && (XINT (w->hscroll) || n < 0)) 917 && (XINT (w->hscroll) || n < 0))
918 || (n > 0 918 || (n > 0
919 && (SCREEN_CURSOR_X (screen) + 1 919 && (FRAME_CURSOR_X (frame) + 1
920 >= (XFASTINT (w->left) + XFASTINT (w->width) 920 >= (XFASTINT (w->left) + XFASTINT (w->width)
921 - (XFASTINT (w->width) < SCREEN_WIDTH (screen)) 921 - (XFASTINT (w->width) < FRAME_WIDTH (frame))
922 - 1)))) 922 - 1))))
923 return 0; 923 return 0;
924 924
925 SCREEN_CURSOR_X (screen) += n; 925 FRAME_CURSOR_X (frame) += n;
926 XFASTINT (w->last_point_x) = SCREEN_CURSOR_X (screen); 926 XFASTINT (w->last_point_x) = FRAME_CURSOR_X (frame);
927 XFASTINT (w->last_point) = point; 927 XFASTINT (w->last_point) = point;
928 cursor_to (SCREEN_CURSOR_Y (screen), SCREEN_CURSOR_X (screen)); 928 cursor_to (FRAME_CURSOR_Y (frame), FRAME_CURSOR_X (frame));
929 fflush (stdout); 929 fflush (stdout);
930 return 1; 930 return 1;
931} 931}
932 932
933static void update_line (); 933static void update_line ();
934 934
935/* Update screen S based on the data in SCREEN_DESIRED_GLYPHS. 935/* Update frame F based on the data in FRAME_DESIRED_GLYPHS.
936 Value is nonzero if redisplay stopped due to pending input. 936 Value is nonzero if redisplay stopped due to pending input.
937 FORCE nonzero means do not stop for pending input. */ 937 FORCE nonzero means do not stop for pending input. */
938 938
939int 939int
940update_screen (s, force, inhibit_hairy_id) 940update_frame (f, force, inhibit_hairy_id)
941 SCREEN_PTR s; 941 FRAME_PTR f;
942 int force; 942 int force;
943 int inhibit_hairy_id; 943 int inhibit_hairy_id;
944{ 944{
945 register struct screen_glyphs *current_screen = SCREEN_CURRENT_GLYPHS (s); 945 register struct frame_glyphs *current_frame = FRAME_CURRENT_GLYPHS (f);
946 register struct screen_glyphs *desired_screen = SCREEN_DESIRED_GLYPHS (s); 946 register struct frame_glyphs *desired_frame = FRAME_DESIRED_GLYPHS (f);
947 register int i; 947 register int i;
948 int pause; 948 int pause;
949 int preempt_count = baud_rate / 2400 + 1; 949 int preempt_count = baud_rate / 2400 + 1;
@@ -952,7 +952,7 @@ update_screen (s, force, inhibit_hairy_id)
952 register int downto, leftmost; 952 register int downto, leftmost;
953#endif 953#endif
954 954
955 if (SCREEN_HEIGHT (s) == 0) abort (); /* Some bug zeros some core */ 955 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */
956 956
957 detect_input_pending (); 957 detect_input_pending ();
958 if (input_pending && !force) 958 if (input_pending && !force)
@@ -961,48 +961,48 @@ update_screen (s, force, inhibit_hairy_id)
961 goto do_pause; 961 goto do_pause;
962 } 962 }
963 963
964 update_begin (s); 964 update_begin (f);
965 965
966 if (!line_ins_del_ok) 966 if (!line_ins_del_ok)
967 inhibit_hairy_id = 1; 967 inhibit_hairy_id = 1;
968 968
969 /* See if any of the desired lines are enabled; don't compute for 969 /* See if any of the desired lines are enabled; don't compute for
970 i/d line if just want cursor motion. */ 970 i/d line if just want cursor motion. */
971 for (i = 0; i < SCREEN_HEIGHT (s); i++) 971 for (i = 0; i < FRAME_HEIGHT (f); i++)
972 if (desired_screen->enable[i]) 972 if (desired_frame->enable[i])
973 break; 973 break;
974 974
975 /* Try doing i/d line, if not yet inhibited. */ 975 /* Try doing i/d line, if not yet inhibited. */
976 if (!inhibit_hairy_id && i < SCREEN_HEIGHT (s)) 976 if (!inhibit_hairy_id && i < FRAME_HEIGHT (f))
977 force |= scrolling (s); 977 force |= scrolling (f);
978 978
979 /* Update the individual lines as needed. Do bottom line first. */ 979 /* Update the individual lines as needed. Do bottom line first. */
980 980
981 if (desired_screen->enable[SCREEN_HEIGHT (s) - 1]) 981 if (desired_frame->enable[FRAME_HEIGHT (f) - 1])
982 update_line (s, SCREEN_HEIGHT (s) - 1); 982 update_line (f, FRAME_HEIGHT (f) - 1);
983 983
984#ifdef HAVE_X_WINDOWS 984#ifdef HAVE_X_WINDOWS
985 if (SCREEN_IS_X (s)) 985 if (FRAME_IS_X (f))
986 { 986 {
987 leftmost = downto = s->display.x->internal_border_width; 987 leftmost = downto = f->display.x->internal_border_width;
988 if (desired_screen->enable[0]) 988 if (desired_frame->enable[0])
989 { 989 {
990 current_screen->top_left_x[SCREEN_HEIGHT (s) - 1] = leftmost; 990 current_frame->top_left_x[FRAME_HEIGHT (f) - 1] = leftmost;
991 current_screen->top_left_y[SCREEN_HEIGHT (s) - 1] 991 current_frame->top_left_y[FRAME_HEIGHT (f) - 1]
992 = PIXEL_HEIGHT (s) - s->display.x->internal_border_width 992 = PIXEL_HEIGHT (f) - f->display.x->internal_border_width
993 - LINE_HEIGHT(s, SCREEN_HEIGHT (s) - 1); 993 - LINE_HEIGHT(f, FRAME_HEIGHT (f) - 1);
994 current_screen->top_left_x[0] = leftmost; 994 current_frame->top_left_x[0] = leftmost;
995 current_screen->top_left_y[0] = downto; 995 current_frame->top_left_y[0] = downto;
996 } 996 }
997 } 997 }
998#endif /* HAVE_X_WINDOWS */ 998#endif /* HAVE_X_WINDOWS */
999 999
1000 /* Now update the rest of the lines. */ 1000 /* Now update the rest of the lines. */
1001 for (i = 0; i < SCREEN_HEIGHT (s) - 1 && (force || !input_pending); i++) 1001 for (i = 0; i < FRAME_HEIGHT (f) - 1 && (force || !input_pending); i++)
1002 { 1002 {
1003 if (desired_screen->enable[i]) 1003 if (desired_frame->enable[i])
1004 { 1004 {
1005 if (SCREEN_IS_TERMCAP (s)) 1005 if (FRAME_IS_TERMCAP (f))
1006 { 1006 {
1007 /* Flush out every so many lines. 1007 /* Flush out every so many lines.
1008 Also flush out if likely to have more than 1k buffered 1008 Also flush out if likely to have more than 1k buffered
@@ -1029,45 +1029,45 @@ update_screen (s, force, inhibit_hairy_id)
1029 detect_input_pending (); 1029 detect_input_pending ();
1030 } 1030 }
1031 1031
1032 update_line (s, i); 1032 update_line (f, i);
1033#ifdef HAVE_X_WINDOWS 1033#ifdef HAVE_X_WINDOWS
1034 if (SCREEN_IS_X (s)) 1034 if (FRAME_IS_X (f))
1035 { 1035 {
1036 current_screen->top_left_y[i] = downto; 1036 current_frame->top_left_y[i] = downto;
1037 current_screen->top_left_x[i] = leftmost; 1037 current_frame->top_left_x[i] = leftmost;
1038 } 1038 }
1039#endif /* HAVE_X_WINDOWS */ 1039#endif /* HAVE_X_WINDOWS */
1040 } 1040 }
1041 1041
1042#ifdef HAVE_X_WINDOWS 1042#ifdef HAVE_X_WINDOWS
1043 if (SCREEN_IS_X (s)) 1043 if (FRAME_IS_X (f))
1044 downto += LINE_HEIGHT(s, i); 1044 downto += LINE_HEIGHT(f, i);
1045#endif 1045#endif
1046 } 1046 }
1047 pause = (i < SCREEN_HEIGHT (s) - 1) ? i : 0; 1047 pause = (i < FRAME_HEIGHT (f) - 1) ? i : 0;
1048 1048
1049 /* Now just clean up termcap drivers and set cursor, etc. */ 1049 /* Now just clean up termcap drivers and set cursor, etc. */
1050 if (!pause) 1050 if (!pause)
1051 { 1051 {
1052 if (cursor_in_echo_area) 1052 if (cursor_in_echo_area)
1053 { 1053 {
1054 if (s == selected_screen 1054 if (f == selected_frame
1055 && cursor_in_echo_area < 0) 1055 && cursor_in_echo_area < 0)
1056 cursor_to (SCREEN_HEIGHT (s) - 1, 0); 1056 cursor_to (FRAME_HEIGHT (f) - 1, 0);
1057 else if (s == selected_screen 1057 else if (f == selected_frame
1058 && ! current_screen->enable[SCREEN_HEIGHT (s) - 1]) 1058 && ! current_frame->enable[FRAME_HEIGHT (f) - 1])
1059 cursor_to (SCREEN_HEIGHT (s) - 1, 0); 1059 cursor_to (FRAME_HEIGHT (f) - 1, 0);
1060 else 1060 else
1061 cursor_to (SCREEN_HEIGHT (s) - 1, 1061 cursor_to (FRAME_HEIGHT (f) - 1,
1062 min (SCREEN_WIDTH (s) - 1, 1062 min (FRAME_WIDTH (f) - 1,
1063 current_screen->used[SCREEN_HEIGHT (s) - 1])); 1063 current_frame->used[FRAME_HEIGHT (f) - 1]));
1064 } 1064 }
1065 else 1065 else
1066 cursor_to (SCREEN_CURSOR_Y (s), max (min (SCREEN_CURSOR_X (s), 1066 cursor_to (FRAME_CURSOR_Y (f), max (min (FRAME_CURSOR_X (f),
1067 SCREEN_WIDTH (s) - 1), 0)); 1067 FRAME_WIDTH (f) - 1), 0));
1068 } 1068 }
1069 1069
1070 update_end (s); 1070 update_end (f);
1071 1071
1072 if (termscript) 1072 if (termscript)
1073 fflush (termscript); 1073 fflush (termscript);
@@ -1076,10 +1076,10 @@ update_screen (s, force, inhibit_hairy_id)
1076 /* Here if output is preempted because input is detected. */ 1076 /* Here if output is preempted because input is detected. */
1077 do_pause: 1077 do_pause:
1078 1078
1079 if (SCREEN_HEIGHT (s) == 0) abort (); /* Some bug zeros some core */ 1079 if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */
1080 display_completed = !pause; 1080 display_completed = !pause;
1081 1081
1082 bzero (desired_screen->enable, SCREEN_HEIGHT (s)); 1082 bzero (desired_frame->enable, FRAME_HEIGHT (f));
1083 return pause; 1083 return pause;
1084} 1084}
1085 1085
@@ -1089,11 +1089,11 @@ update_screen (s, force, inhibit_hairy_id)
1089void 1089void
1090quit_error_check () 1090quit_error_check ()
1091{ 1091{
1092 if (SCREEN_DESIRED_GLYPHS (selected_screen) == 0) 1092 if (FRAME_DESIRED_GLYPHS (selected_frame) == 0)
1093 return; 1093 return;
1094 if (SCREEN_DESIRED_GLYPHS (selected_screen)->enable[0]) 1094 if (FRAME_DESIRED_GLYPHS (selected_frame)->enable[0])
1095 abort (); 1095 abort ();
1096 if (SCREEN_DESIRED_GLYPHS (selected_screen)->enable[SCREEN_HEIGHT (selected_screen) - 1]) 1096 if (FRAME_DESIRED_GLYPHS (selected_frame)->enable[FRAME_HEIGHT (selected_frame) - 1])
1097 abort (); 1097 abort ();
1098} 1098}
1099 1099
@@ -1101,19 +1101,19 @@ quit_error_check ()
1101 1101
1102extern void scrolling_1 (); 1102extern void scrolling_1 ();
1103 1103
1104scrolling (screen) 1104scrolling (frame)
1105 SCREEN_PTR screen; 1105 FRAME_PTR frame;
1106{ 1106{
1107 int unchanged_at_top, unchanged_at_bottom; 1107 int unchanged_at_top, unchanged_at_bottom;
1108 int window_size; 1108 int window_size;
1109 int changed_lines; 1109 int changed_lines;
1110 int *old_hash = (int *) alloca (SCREEN_HEIGHT (screen) * sizeof (int)); 1110 int *old_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1111 int *new_hash = (int *) alloca (SCREEN_HEIGHT (screen) * sizeof (int)); 1111 int *new_hash = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1112 int *draw_cost = (int *) alloca (SCREEN_HEIGHT (screen) * sizeof (int)); 1112 int *draw_cost = (int *) alloca (FRAME_HEIGHT (frame) * sizeof (int));
1113 register int i; 1113 register int i;
1114 int free_at_end_vpos = SCREEN_HEIGHT (screen); 1114 int free_at_end_vpos = FRAME_HEIGHT (frame);
1115 register struct screen_glyphs *current_screen = SCREEN_CURRENT_GLYPHS (screen); 1115 register struct frame_glyphs *current_frame = FRAME_CURRENT_GLYPHS (frame);
1116 register struct screen_glyphs *desired_screen = SCREEN_DESIRED_GLYPHS (screen); 1116 register struct frame_glyphs *desired_frame = FRAME_DESIRED_GLYPHS (frame);
1117 1117
1118 /* Compute hash codes of all the lines. 1118 /* Compute hash codes of all the lines.
1119 Also calculate number of changed lines, 1119 Also calculate number of changed lines,
@@ -1122,51 +1122,51 @@ scrolling (screen)
1122 1122
1123 changed_lines = 0; 1123 changed_lines = 0;
1124 unchanged_at_top = 0; 1124 unchanged_at_top = 0;
1125 unchanged_at_bottom = SCREEN_HEIGHT (screen); 1125 unchanged_at_bottom = FRAME_HEIGHT (frame);
1126 for (i = 0; i < SCREEN_HEIGHT (screen); i++) 1126 for (i = 0; i < FRAME_HEIGHT (frame); i++)
1127 { 1127 {
1128 /* Give up on this scrolling if some old lines are not enabled. */ 1128 /* Give up on this scrolling if some old lines are not enabled. */
1129 if (!current_screen->enable[i]) 1129 if (!current_frame->enable[i])
1130 return 0; 1130 return 0;
1131 old_hash[i] = line_hash_code (current_screen, i); 1131 old_hash[i] = line_hash_code (current_frame, i);
1132 if (! desired_screen->enable[i]) 1132 if (! desired_frame->enable[i])
1133 new_hash[i] = old_hash[i]; 1133 new_hash[i] = old_hash[i];
1134 else 1134 else
1135 new_hash[i] = line_hash_code (desired_screen, i); 1135 new_hash[i] = line_hash_code (desired_frame, i);
1136 1136
1137 if (old_hash[i] != new_hash[i]) 1137 if (old_hash[i] != new_hash[i])
1138 { 1138 {
1139 changed_lines++; 1139 changed_lines++;
1140 unchanged_at_bottom = SCREEN_HEIGHT (screen) - i - 1; 1140 unchanged_at_bottom = FRAME_HEIGHT (frame) - i - 1;
1141 } 1141 }
1142 else if (i == unchanged_at_top) 1142 else if (i == unchanged_at_top)
1143 unchanged_at_top++; 1143 unchanged_at_top++;
1144 draw_cost[i] = line_draw_cost (desired_screen, i); 1144 draw_cost[i] = line_draw_cost (desired_frame, i);
1145 } 1145 }
1146 1146
1147 /* If changed lines are few, don't allow preemption, don't scroll. */ 1147 /* If changed lines are few, don't allow preemption, don't scroll. */
1148 if (changed_lines < baud_rate / 2400 1148 if (changed_lines < baud_rate / 2400
1149 || unchanged_at_bottom == SCREEN_HEIGHT (screen)) 1149 || unchanged_at_bottom == FRAME_HEIGHT (frame))
1150 return 1; 1150 return 1;
1151 1151
1152 window_size = (SCREEN_HEIGHT (screen) - unchanged_at_top 1152 window_size = (FRAME_HEIGHT (frame) - unchanged_at_top
1153 - unchanged_at_bottom); 1153 - unchanged_at_bottom);
1154 1154
1155 if (scroll_region_ok) 1155 if (scroll_region_ok)
1156 free_at_end_vpos -= unchanged_at_bottom; 1156 free_at_end_vpos -= unchanged_at_bottom;
1157 else if (memory_below_screen) 1157 else if (memory_below_frame)
1158 free_at_end_vpos = -1; 1158 free_at_end_vpos = -1;
1159 1159
1160 /* If large window, fast terminal and few lines in common between 1160 /* If large window, fast terminal and few lines in common between
1161 current screen and desired screen, don't bother with i/d calc. */ 1161 current frame and desired frame, don't bother with i/d calc. */
1162 if (window_size >= 18 && baud_rate > 2400 1162 if (window_size >= 18 && baud_rate > 2400
1163 && (window_size >= 1163 && (window_size >=
1164 10 * scrolling_max_lines_saved (unchanged_at_top, 1164 10 * scrolling_max_lines_saved (unchanged_at_top,
1165 SCREEN_HEIGHT (screen) - unchanged_at_bottom, 1165 FRAME_HEIGHT (frame) - unchanged_at_bottom,
1166 old_hash, new_hash, draw_cost))) 1166 old_hash, new_hash, draw_cost)))
1167 return 0; 1167 return 0;
1168 1168
1169 scrolling_1 (screen, window_size, unchanged_at_top, unchanged_at_bottom, 1169 scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom,
1170 draw_cost + unchanged_at_top - 1, 1170 draw_cost + unchanged_at_top - 1,
1171 old_hash + unchanged_at_top - 1, 1171 old_hash + unchanged_at_top - 1,
1172 new_hash + unchanged_at_top - 1, 1172 new_hash + unchanged_at_top - 1,
@@ -1189,7 +1189,7 @@ buffer_posn_from_coords (window, col, line)
1189 window. */ 1189 window. */
1190 int window_width = (XFASTINT (window->width) - 1 1190 int window_width = (XFASTINT (window->width) - 1
1191 - (XFASTINT (window->width) + window_left 1191 - (XFASTINT (window->width) + window_left
1192 != SCREEN_WIDTH (XSCREEN (window->screen)))); 1192 != FRAME_WIDTH (XFRAME (window->frame))));
1193 1193
1194 int startp = marker_position (window->start); 1194 int startp = marker_position (window->start);
1195 1195
@@ -1200,8 +1200,8 @@ buffer_posn_from_coords (window, col, line)
1200 1200
1201 current_buffer = XBUFFER (window->buffer); 1201 current_buffer = XBUFFER (window->buffer);
1202 1202
1203 /* It would be nice if we could use SCREEN_CURRENT_GLYPHS (XSCREEN 1203 /* It would be nice if we could use FRAME_CURRENT_GLYPHS (XFRAME
1204 (window->screen))->bufp to avoid scanning from the very top of 1204 (window->frame))->bufp to avoid scanning from the very top of
1205 the window, but it isn't maintained correctly, and I'm not even 1205 the window, but it isn't maintained correctly, and I'm not even
1206 sure I will keep it. */ 1206 sure I will keep it. */
1207 posn = compute_motion (startp, 0, 1207 posn = compute_motion (startp, 0,
@@ -1212,7 +1212,7 @@ buffer_posn_from_coords (window, col, line)
1212 1212
1213 current_buffer = old_current_buffer; 1213 current_buffer = old_current_buffer;
1214 1214
1215 /* compute_motion considers screen points past the end of a line 1215 /* compute_motion considers frame points past the end of a line
1216 to be *after* the newline, i.e. at the start of the next line. 1216 to be *after* the newline, i.e. at the start of the next line.
1217 This is reasonable, but not really what we want. So if the 1217 This is reasonable, but not really what we want. So if the
1218 result is on a line below LINE, back it up one character. */ 1218 result is on a line below LINE, back it up one character. */
@@ -1244,42 +1244,42 @@ count_match (str1, str2)
1244/* Char insertion/deletion cost vector, from term.c */ 1244/* Char insertion/deletion cost vector, from term.c */
1245extern int *char_ins_del_vector; 1245extern int *char_ins_del_vector;
1246 1246
1247#define char_ins_del_cost(s) (&char_ins_del_vector[SCREEN_HEIGHT((s))]) 1247#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_HEIGHT((f))])
1248 1248
1249static void 1249static void
1250update_line (screen, vpos) 1250update_line (frame, vpos)
1251 register SCREEN_PTR screen; 1251 register FRAME_PTR frame;
1252 int vpos; 1252 int vpos;
1253{ 1253{
1254 register GLYPH *obody, *nbody, *op1, *op2, *np1, *temp; 1254 register GLYPH *obody, *nbody, *op1, *op2, *np1, *temp;
1255 int tem; 1255 int tem;
1256 int osp, nsp, begmatch, endmatch, olen, nlen; 1256 int osp, nsp, begmatch, endmatch, olen, nlen;
1257 int save; 1257 int save;
1258 register struct screen_glyphs *current_screen 1258 register struct frame_glyphs *current_frame
1259 = SCREEN_CURRENT_GLYPHS (screen); 1259 = FRAME_CURRENT_GLYPHS (frame);
1260 register struct screen_glyphs *desired_screen 1260 register struct frame_glyphs *desired_frame
1261 = SCREEN_DESIRED_GLYPHS (screen); 1261 = FRAME_DESIRED_GLYPHS (frame);
1262 1262
1263 if (desired_screen->highlight[vpos] 1263 if (desired_frame->highlight[vpos]
1264 != (current_screen->enable[vpos] && current_screen->highlight[vpos])) 1264 != (current_frame->enable[vpos] && current_frame->highlight[vpos]))
1265 { 1265 {
1266 change_line_highlight (desired_screen->highlight[vpos], vpos, 1266 change_line_highlight (desired_frame->highlight[vpos], vpos,
1267 (current_screen->enable[vpos] ? 1267 (current_frame->enable[vpos] ?
1268 current_screen->used[vpos] : 0)); 1268 current_frame->used[vpos] : 0));
1269 current_screen->enable[vpos] = 0; 1269 current_frame->enable[vpos] = 0;
1270 } 1270 }
1271 else 1271 else
1272 reassert_line_highlight (desired_screen->highlight[vpos], vpos); 1272 reassert_line_highlight (desired_frame->highlight[vpos], vpos);
1273 1273
1274 if (! current_screen->enable[vpos]) 1274 if (! current_frame->enable[vpos])
1275 { 1275 {
1276 olen = 0; 1276 olen = 0;
1277 } 1277 }
1278 else 1278 else
1279 { 1279 {
1280 obody = current_screen->glyphs[vpos]; 1280 obody = current_frame->glyphs[vpos];
1281 olen = current_screen->used[vpos]; 1281 olen = current_frame->used[vpos];
1282 if (! current_screen->highlight[vpos]) 1282 if (! current_frame->highlight[vpos])
1283 { 1283 {
1284 if (!must_write_spaces) 1284 if (!must_write_spaces)
1285 while (obody[olen - 1] == SPACEGLYPH && olen > 0) 1285 while (obody[olen - 1] == SPACEGLYPH && olen > 0)
@@ -1288,43 +1288,43 @@ update_line (screen, vpos)
1288 else 1288 else
1289 { 1289 {
1290 /* For an inverse-video line, remember we gave it 1290 /* For an inverse-video line, remember we gave it
1291 spaces all the way to the screen edge 1291 spaces all the way to the frame edge
1292 so that the reverse video extends all the way across. */ 1292 so that the reverse video extends all the way across. */
1293 1293
1294 while (olen < SCREEN_WIDTH (screen) - 1) 1294 while (olen < FRAME_WIDTH (frame) - 1)
1295 obody[olen++] = SPACEGLYPH; 1295 obody[olen++] = SPACEGLYPH;
1296 } 1296 }
1297 } 1297 }
1298 1298
1299 /* One way or another, this will enable the line being updated. */ 1299 /* One way or another, this will enable the line being updated. */
1300 current_screen->enable[vpos] = 1; 1300 current_frame->enable[vpos] = 1;
1301 current_screen->used[vpos] = desired_screen->used[vpos]; 1301 current_frame->used[vpos] = desired_frame->used[vpos];
1302 current_screen->highlight[vpos] = desired_screen->highlight[vpos]; 1302 current_frame->highlight[vpos] = desired_frame->highlight[vpos];
1303 current_screen->bufp[vpos] = desired_screen->bufp[vpos]; 1303 current_frame->bufp[vpos] = desired_frame->bufp[vpos];
1304 1304
1305#ifdef HAVE_X_WINDOWS 1305#ifdef HAVE_X_WINDOWS
1306 if (SCREEN_IS_X (screen)) 1306 if (FRAME_IS_X (frame))
1307 { 1307 {
1308 current_screen->pix_width[vpos] 1308 current_frame->pix_width[vpos]
1309 = current_screen->used[vpos] 1309 = current_frame->used[vpos]
1310 * FONT_WIDTH (screen->display.x->font); 1310 * FONT_WIDTH (frame->display.x->font);
1311 current_screen->pix_height[vpos] 1311 current_frame->pix_height[vpos]
1312 = FONT_HEIGHT (screen->display.x->font); 1312 = FONT_HEIGHT (frame->display.x->font);
1313 } 1313 }
1314#endif /* HAVE_X_WINDOWS */ 1314#endif /* HAVE_X_WINDOWS */
1315 1315
1316 if (!desired_screen->enable[vpos]) 1316 if (!desired_frame->enable[vpos])
1317 { 1317 {
1318 nlen = 0; 1318 nlen = 0;
1319 goto just_erase; 1319 goto just_erase;
1320 } 1320 }
1321 1321
1322 nbody = desired_screen->glyphs[vpos]; 1322 nbody = desired_frame->glyphs[vpos];
1323 nlen = desired_screen->used[vpos]; 1323 nlen = desired_frame->used[vpos];
1324 1324
1325 /* Pretend trailing spaces are not there at all, 1325 /* Pretend trailing spaces are not there at all,
1326 unless for one reason or another we must write all spaces. */ 1326 unless for one reason or another we must write all spaces. */
1327 if (! desired_screen->highlight[vpos]) 1327 if (! desired_frame->highlight[vpos])
1328 { 1328 {
1329 if (!must_write_spaces) 1329 if (!must_write_spaces)
1330 /* We know that the previous character byte contains 0. */ 1330 /* We know that the previous character byte contains 0. */
@@ -1334,10 +1334,10 @@ update_line (screen, vpos)
1334 else 1334 else
1335 { 1335 {
1336 /* For an inverse-video line, give it extra trailing spaces 1336 /* For an inverse-video line, give it extra trailing spaces
1337 all the way to the screen edge 1337 all the way to the frame edge
1338 so that the reverse video extends all the way across. */ 1338 so that the reverse video extends all the way across. */
1339 1339
1340 while (nlen < SCREEN_WIDTH (screen) - 1) 1340 while (nlen < FRAME_WIDTH (frame) - 1)
1341 nbody[nlen++] = SPACEGLYPH; 1341 nbody[nlen++] = SPACEGLYPH;
1342 } 1342 }
1343 1343
@@ -1370,17 +1370,17 @@ update_line (screen, vpos)
1370 clear_end_of_line (olen); 1370 clear_end_of_line (olen);
1371 } 1371 }
1372 1372
1373 /* Exchange contents between current_screen and new_screen. */ 1373 /* Exchange contents between current_frame and new_frame. */
1374 temp = desired_screen->glyphs[vpos]; 1374 temp = desired_frame->glyphs[vpos];
1375 desired_screen->glyphs[vpos] = current_screen->glyphs[vpos]; 1375 desired_frame->glyphs[vpos] = current_frame->glyphs[vpos];
1376 current_screen->glyphs[vpos] = temp; 1376 current_frame->glyphs[vpos] = temp;
1377 1377
1378 return; 1378 return;
1379 } 1379 }
1380 1380
1381 if (!olen) 1381 if (!olen)
1382 { 1382 {
1383 nsp = (must_write_spaces || desired_screen->highlight[vpos]) 1383 nsp = (must_write_spaces || desired_frame->highlight[vpos])
1384 ? 0 : count_blanks (nbody); 1384 ? 0 : count_blanks (nbody);
1385 if (nlen > nsp) 1385 if (nlen > nsp)
1386 { 1386 {
@@ -1388,10 +1388,10 @@ update_line (screen, vpos)
1388 write_glyphs (nbody + nsp, nlen - nsp); 1388 write_glyphs (nbody + nsp, nlen - nsp);
1389 } 1389 }
1390 1390
1391 /* Exchange contents between current_screen and new_screen. */ 1391 /* Exchange contents between current_frame and new_frame. */
1392 temp = desired_screen->glyphs[vpos]; 1392 temp = desired_frame->glyphs[vpos];
1393 desired_screen->glyphs[vpos] = current_screen->glyphs[vpos]; 1393 desired_frame->glyphs[vpos] = current_frame->glyphs[vpos];
1394 current_screen->glyphs[vpos] = temp; 1394 current_frame->glyphs[vpos] = temp;
1395 1395
1396 return; 1396 return;
1397 } 1397 }
@@ -1402,7 +1402,7 @@ update_line (screen, vpos)
1402 1402
1403 /* Compute number of leading blanks in old and new contents. */ 1403 /* Compute number of leading blanks in old and new contents. */
1404 osp = count_blanks (obody); 1404 osp = count_blanks (obody);
1405 if (!desired_screen->highlight[vpos]) 1405 if (!desired_frame->highlight[vpos])
1406 nsp = count_blanks (nbody); 1406 nsp = count_blanks (nbody);
1407 else 1407 else
1408 nsp = 0; 1408 nsp = 0;
@@ -1449,7 +1449,7 @@ update_line (screen, vpos)
1449 1449
1450 tem = (nlen - nsp) - (olen - osp); 1450 tem = (nlen - nsp) - (olen - osp);
1451 if (endmatch && tem 1451 if (endmatch && tem
1452 && (!char_ins_del_ok || endmatch <= char_ins_del_cost (screen)[tem])) 1452 && (!char_ins_del_ok || endmatch <= char_ins_del_cost (frame)[tem]))
1453 endmatch = 0; 1453 endmatch = 0;
1454 1454
1455 /* nsp - osp is the distance to insert or delete. 1455 /* nsp - osp is the distance to insert or delete.
@@ -1459,7 +1459,7 @@ update_line (screen, vpos)
1459 1459
1460 if (nsp != osp 1460 if (nsp != osp
1461 && (!char_ins_del_ok 1461 && (!char_ins_del_ok
1462 || begmatch + endmatch <= char_ins_del_cost (screen)[nsp - osp])) 1462 || begmatch + endmatch <= char_ins_del_cost (frame)[nsp - osp]))
1463 { 1463 {
1464 begmatch = 0; 1464 begmatch = 0;
1465 endmatch = 0; 1465 endmatch = 0;
@@ -1500,7 +1500,7 @@ update_line (screen, vpos)
1500 there is no need to do clear-to-eol at the end. 1500 there is no need to do clear-to-eol at the end.
1501 (and it would not be safe, since cursor is not 1501 (and it would not be safe, since cursor is not
1502 going to be "at the margin" after the text is done) */ 1502 going to be "at the margin" after the text is done) */
1503 if (nlen == SCREEN_WIDTH (screen)) 1503 if (nlen == FRAME_WIDTH (frame))
1504 olen = 0; 1504 olen = 0;
1505 write_glyphs (nbody + nsp + begmatch, nlen - tem); 1505 write_glyphs (nbody + nsp + begmatch, nlen - tem);
1506 1506
@@ -1514,7 +1514,7 @@ update_line (screen, vpos)
1514 it will lose one way or another (depending on AutoWrap) 1514 it will lose one way or another (depending on AutoWrap)
1515 to clear to end of line after outputting all the text. 1515 to clear to end of line after outputting all the text.
1516 So pause with one character to go and clear the line then. */ 1516 So pause with one character to go and clear the line then. */
1517 if (nlen == SCREEN_WIDTH (screen) && fast_clear_end_of_line && olen > nlen) 1517 if (nlen == FRAME_WIDTH (frame) && fast_clear_end_of_line && olen > nlen)
1518 { 1518 {
1519 /* endmatch must be zero, and tem must equal nsp + begmatch */ 1519 /* endmatch must be zero, and tem must equal nsp + begmatch */
1520 write_glyphs (nbody + tem, nlen - tem - 1); 1520 write_glyphs (nbody + tem, nlen - tem - 1);
@@ -1549,10 +1549,10 @@ update_line (screen, vpos)
1549 clear_end_of_line (olen); 1549 clear_end_of_line (olen);
1550 } 1550 }
1551 1551
1552 /* Exchange contents between current_screen and new_screen. */ 1552 /* Exchange contents between current_frame and new_frame. */
1553 temp = desired_screen->glyphs[vpos]; 1553 temp = desired_frame->glyphs[vpos];
1554 desired_screen->glyphs[vpos] = current_screen->glyphs[vpos]; 1554 desired_frame->glyphs[vpos] = current_frame->glyphs[vpos];
1555 current_screen->glyphs[vpos] = temp; 1555 current_frame->glyphs[vpos] = temp;
1556} 1556}
1557 1557
1558DEFUN ("open-termscript", Fopen_termscript, Sopen_termscript, 1558DEFUN ("open-termscript", Fopen_termscript, Sopen_termscript,
@@ -1584,25 +1584,25 @@ window_change_signal ()
1584 extern int errno; 1584 extern int errno;
1585 int old_errno = errno; 1585 int old_errno = errno;
1586 1586
1587 get_screen_size (&width, &height); 1587 get_frame_size (&width, &height);
1588 1588
1589 /* The screen size change obviously applies to a termcap-controlled 1589 /* The frame size change obviously applies to a termcap-controlled
1590 screen. Find such a screen in the list, and assume it's the only 1590 frame. Find such a frame in the list, and assume it's the only
1591 one (since the redisplay code always writes to stdout, not a 1591 one (since the redisplay code always writes to stdout, not a
1592 FILE * specified in the screen structure). Record the new size, 1592 FILE * specified in the frame structure). Record the new size,
1593 but don't reallocate the data structures now. Let that be done 1593 but don't reallocate the data structures now. Let that be done
1594 later outside of the signal handler. */ 1594 later outside of the signal handler. */
1595 1595
1596 { 1596 {
1597 Lisp_Object tail; 1597 Lisp_Object tail;
1598 SCREEN_PTR s; 1598 FRAME_PTR f;
1599 1599
1600 FOR_EACH_SCREEN (tail, s) 1600 FOR_EACH_FRAME (tail, f)
1601 { 1601 {
1602 if (SCREEN_IS_TERMCAP (s)) 1602 if (FRAME_IS_TERMCAP (f))
1603 { 1603 {
1604 ++in_display; 1604 ++in_display;
1605 change_screen_size (s, height, width, 0); 1605 change_frame_size (f, height, width, 0);
1606 --in_display; 1606 --in_display;
1607 break; 1607 break;
1608 } 1608 }
@@ -1615,7 +1615,7 @@ window_change_signal ()
1615#endif /* SIGWINCH */ 1615#endif /* SIGWINCH */
1616 1616
1617 1617
1618/* Do any change in screen size that was requested by a signal. */ 1618/* Do any change in frame size that was requested by a signal. */
1619 1619
1620do_pending_window_change () 1620do_pending_window_change ()
1621{ 1621{
@@ -1623,102 +1623,102 @@ do_pending_window_change ()
1623 while (delayed_size_change) 1623 while (delayed_size_change)
1624 { 1624 {
1625 Lisp_Object tail; 1625 Lisp_Object tail;
1626 SCREEN_PTR s; 1626 FRAME_PTR f;
1627 1627
1628 delayed_size_change = 0; 1628 delayed_size_change = 0;
1629 1629
1630 FOR_EACH_SCREEN (tail, s) 1630 FOR_EACH_FRAME (tail, f)
1631 { 1631 {
1632 int height = SCREEN_NEW_HEIGHT (s); 1632 int height = FRAME_NEW_HEIGHT (f);
1633 int width = SCREEN_NEW_WIDTH (s); 1633 int width = FRAME_NEW_WIDTH (f);
1634 1634
1635 SCREEN_NEW_HEIGHT (s) = 0; 1635 FRAME_NEW_HEIGHT (f) = 0;
1636 SCREEN_NEW_WIDTH (s) = 0; 1636 FRAME_NEW_WIDTH (f) = 0;
1637 1637
1638 if (height != 0) 1638 if (height != 0)
1639 change_screen_size (s, height, width, 0); 1639 change_frame_size (f, height, width, 0);
1640 } 1640 }
1641 } 1641 }
1642} 1642}
1643 1643
1644 1644
1645/* Change the screen height and/or width. Values may be given as zero to 1645/* Change the frame height and/or width. Values may be given as zero to
1646 indicate no change is to take place. */ 1646 indicate no change is to take place. */
1647 1647
1648change_screen_size (screen, newlength, newwidth, pretend) 1648change_frame_size (frame, newlength, newwidth, pretend)
1649 register SCREEN_PTR screen; 1649 register FRAME_PTR frame;
1650 register int newlength, newwidth, pretend; 1650 register int newlength, newwidth, pretend;
1651{ 1651{
1652 /* If we can't deal with the change now, queue it for later. */ 1652 /* If we can't deal with the change now, queue it for later. */
1653 if (in_display) 1653 if (in_display)
1654 { 1654 {
1655 SCREEN_NEW_HEIGHT (screen) = newlength; 1655 FRAME_NEW_HEIGHT (frame) = newlength;
1656 SCREEN_NEW_WIDTH (screen) = newwidth; 1656 FRAME_NEW_WIDTH (frame) = newwidth;
1657 delayed_size_change = 1; 1657 delayed_size_change = 1;
1658 return; 1658 return;
1659 } 1659 }
1660 1660
1661 /* This size-change overrides any pending one for this screen. */ 1661 /* This size-change overrides any pending one for this frame. */
1662 SCREEN_NEW_HEIGHT (screen) = 0; 1662 FRAME_NEW_HEIGHT (frame) = 0;
1663 SCREEN_NEW_WIDTH (screen) = 0; 1663 FRAME_NEW_WIDTH (frame) = 0;
1664 1664
1665 if ((newlength == 0 || newlength == SCREEN_HEIGHT (screen)) 1665 if ((newlength == 0 || newlength == FRAME_HEIGHT (frame))
1666 && (newwidth == 0 || newwidth == SCREEN_WIDTH (screen))) 1666 && (newwidth == 0 || newwidth == FRAME_WIDTH (frame)))
1667 return; 1667 return;
1668 1668
1669 if (newlength && newlength != SCREEN_HEIGHT (screen)) 1669 if (newlength && newlength != FRAME_HEIGHT (frame))
1670 { 1670 {
1671 if (SCREEN_HAS_MINIBUF (screen) 1671 if (FRAME_HAS_MINIBUF (frame)
1672 && ! SCREEN_MINIBUF_ONLY_P (screen)) 1672 && ! FRAME_MINIBUF_ONLY_P (frame))
1673 { 1673 {
1674 /* Screen has both root and minibuffer. */ 1674 /* Frame has both root and minibuffer. */
1675 set_window_height (SCREEN_ROOT_WINDOW (screen), 1675 set_window_height (FRAME_ROOT_WINDOW (frame),
1676 newlength - 1, 0); 1676 newlength - 1, 0);
1677 XFASTINT (XWINDOW (SCREEN_MINIBUF_WINDOW (screen))->top) 1677 XFASTINT (XWINDOW (FRAME_MINIBUF_WINDOW (frame))->top)
1678 = newlength - 1; 1678 = newlength - 1;
1679 set_window_height (SCREEN_MINIBUF_WINDOW (screen), 1, 0); 1679 set_window_height (FRAME_MINIBUF_WINDOW (frame), 1, 0);
1680 } 1680 }
1681 else 1681 else
1682 /* Screen has just one top-level window. */ 1682 /* Frame has just one top-level window. */
1683 set_window_height (SCREEN_ROOT_WINDOW (screen), newlength, 0); 1683 set_window_height (FRAME_ROOT_WINDOW (frame), newlength, 0);
1684 1684
1685 if (SCREEN_IS_TERMCAP (screen) && !pretend) 1685 if (FRAME_IS_TERMCAP (frame) && !pretend)
1686 ScreenRows = newlength; 1686 FrameRows = newlength;
1687 1687
1688#if 0 1688#if 0
1689 if (screen->output_method == output_termcap) 1689 if (frame->output_method == output_termcap)
1690 { 1690 {
1691 screen_height = newlength; 1691 frame_height = newlength;
1692 if (!pretend) 1692 if (!pretend)
1693 ScreenRows = newlength; 1693 FrameRows = newlength;
1694 } 1694 }
1695#endif 1695#endif
1696 } 1696 }
1697 1697
1698 if (newwidth && newwidth != SCREEN_WIDTH (screen)) 1698 if (newwidth && newwidth != FRAME_WIDTH (frame))
1699 { 1699 {
1700 set_window_width (SCREEN_ROOT_WINDOW (screen), newwidth, 0); 1700 set_window_width (FRAME_ROOT_WINDOW (frame), newwidth, 0);
1701 if (SCREEN_HAS_MINIBUF (screen)) 1701 if (FRAME_HAS_MINIBUF (frame))
1702 set_window_width (SCREEN_MINIBUF_WINDOW (screen), newwidth, 0); 1702 set_window_width (FRAME_MINIBUF_WINDOW (frame), newwidth, 0);
1703 SCREEN_WIDTH (screen) = newwidth; 1703 FRAME_WIDTH (frame) = newwidth;
1704 1704
1705 if (SCREEN_IS_TERMCAP (screen) && !pretend) 1705 if (FRAME_IS_TERMCAP (frame) && !pretend)
1706 ScreenCols = newwidth; 1706 FrameCols = newwidth;
1707#if 0 1707#if 0
1708 if (screen->output_method == output_termcap) 1708 if (frame->output_method == output_termcap)
1709 { 1709 {
1710 screen_width = newwidth; 1710 frame_width = newwidth;
1711 if (!pretend) 1711 if (!pretend)
1712 ScreenCols = newwidth; 1712 FrameCols = newwidth;
1713 } 1713 }
1714#endif 1714#endif
1715 } 1715 }
1716 1716
1717 if (newlength) 1717 if (newlength)
1718 SCREEN_HEIGHT (screen) = newlength; 1718 FRAME_HEIGHT (frame) = newlength;
1719 1719
1720 remake_screen_glyphs (screen); 1720 remake_frame_glyphs (frame);
1721 calculate_costs (screen); 1721 calculate_costs (frame);
1722} 1722}
1723 1723
1724DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, 1724DEFUN ("send-string-to-terminal", Fsend_string_to_terminal,
@@ -2023,12 +2023,12 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
2023 2023
2024 term_init (terminal_type); 2024 term_init (terminal_type);
2025 2025
2026 remake_screen_glyphs (selected_screen); 2026 remake_frame_glyphs (selected_frame);
2027 calculate_costs (selected_screen); 2027 calculate_costs (selected_frame);
2028 2028
2029 /* X and Y coordinates of the cursor between updates. */ 2029 /* X and Y coordinates of the cursor between updates. */
2030 SCREEN_CURSOR_X (selected_screen) = 0; 2030 FRAME_CURSOR_X (selected_frame) = 0;
2031 SCREEN_CURSOR_Y (selected_screen) = 0; 2031 FRAME_CURSOR_Y (selected_frame) = 0;
2032 2032
2033#ifdef SIGWINCH 2033#ifdef SIGWINCH
2034#ifndef CANNOT_DUMP 2034#ifndef CANNOT_DUMP
@@ -2040,8 +2040,8 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
2040 2040
2041syms_of_display () 2041syms_of_display ()
2042{ 2042{
2043#ifdef MULTI_SCREEN 2043#ifdef MULTI_FRAME
2044 defsubr (&Sredraw_screen); 2044 defsubr (&Sredraw_frame);
2045#endif 2045#endif
2046 defsubr (&Sredraw_display); 2046 defsubr (&Sredraw_display);
2047 defsubr (&Sopen_termscript); 2047 defsubr (&Sopen_termscript);
@@ -2055,14 +2055,14 @@ syms_of_display ()
2055On most systems, changing this value will affect the amount of padding\n\ 2055On most systems, changing this value will affect the amount of padding\n\
2056and the other strategic decisions made during redisplay."); 2056and the other strategic decisions made during redisplay.");
2057 DEFVAR_BOOL ("inverse-video", &inverse_video, 2057 DEFVAR_BOOL ("inverse-video", &inverse_video,
2058 "*Non-nil means invert the entire screen display.\n\ 2058 "*Non-nil means invert the entire frame display.\n\
2059This means everything is in inverse video which otherwise would not be."); 2059This means everything is in inverse video which otherwise would not be.");
2060 DEFVAR_BOOL ("visible-bell", &visible_bell, 2060 DEFVAR_BOOL ("visible-bell", &visible_bell,
2061 "*Non-nil means try to flash the screen to represent a bell."); 2061 "*Non-nil means try to flash the frame to represent a bell.");
2062 DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter, 2062 DEFVAR_BOOL ("no-redraw-on-reenter", &no_redraw_on_reenter,
2063 "*Non-nil means no need to redraw entire screen after suspending.\n\ 2063 "*Non-nil means no need to redraw entire frame after suspending.\n\
2064A non-nil value is useful if the terminal can automatically preserve\n\ 2064A non-nil value is useful if the terminal can automatically preserve\n\
2065Emacs's screen display when you reenter Emacs.\n\ 2065Emacs's frame display when you reenter Emacs.\n\
2066It is up to you to set this variable if your terminal can do that."); 2066It is up to you to set this variable if your terminal can do that.");
2067 DEFVAR_LISP ("window-system", &Vwindow_system, 2067 DEFVAR_LISP ("window-system", &Vwindow_system,
2068 "A symbol naming the window-system under which Emacs is running\n\ 2068 "A symbol naming the window-system under which Emacs is running\n\
@@ -2073,7 +2073,7 @@ For X windows, this is 10 or 11.");
2073 DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area, 2073 DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area,
2074 "Non-nil means put cursor in minibuffer, at end of any message there."); 2074 "Non-nil means put cursor in minibuffer, at end of any message there.");
2075 DEFVAR_LISP ("glyph-table", &Vglyph_table, 2075 DEFVAR_LISP ("glyph-table", &Vglyph_table,
2076 "Table defining how to output a glyph code to the screen.\n\ 2076 "Table defining how to output a glyph code to the frame.\n\
2077If not nil, this is a vector indexed by glyph code to define the glyph.\n\ 2077If not nil, this is a vector indexed by glyph code to define the glyph.\n\
2078Each element can be:\n\ 2078Each element can be:\n\
2079 integer: a glyph code which this glyph is an alias for.\n\ 2079 integer: a glyph code which this glyph is an alias for.\n\
diff --git a/src/indent.c b/src/indent.c
index 3f3745a5565..cdd9ad8b20c 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -22,7 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22#include "lisp.h" 22#include "lisp.h"
23#include "buffer.h" 23#include "buffer.h"
24#include "indent.h" 24#include "indent.h"
25#include "screen.h" 25#include "frame.h"
26#include "window.h" 26#include "window.h"
27#include "termchar.h" 27#include "termchar.h"
28#include "termopts.h" 28#include "termopts.h"
@@ -70,8 +70,8 @@ This is calculated by adding together the widths of all the displayed\n\
70representations of the character between the start of the previous line\n\ 70representations of the character between the start of the previous line\n\
71and point. (eg control characters will have a width of 2 or 4, tabs\n\ 71and point. (eg control characters will have a width of 2 or 4, tabs\n\
72will have a variable width)\n\ 72will have a variable width)\n\
73Ignores finite width of screen, which means that this function may return\n\ 73Ignores finite width of frame, which means that this function may return\n\
74values greater than (screen-width).\n\ 74values greater than (frame-width).\n\
75Whether the line is visible (if `selective-display' is t) has no effect;\n\ 75Whether the line is visible (if `selective-display' is t) has no effect;\n\
76however, ^M is treated as end of line when `selective-display' is t.") 76however, ^M is treated as end of line when `selective-display' is t.")
77 () 77 ()
@@ -395,12 +395,12 @@ struct position val_compute_motion;
395 When displaying in window w, a typical formula for WIDTH is: 395 When displaying in window w, a typical formula for WIDTH is:
396 396
397 window_width - 1 397 window_width - 1
398 - (window_width + window_left != screen_width) 398 - (window_width + window_left != frame_width)
399 399
400 where 400 where
401 window_width is XFASTINT (w->width), 401 window_width is XFASTINT (w->width),
402 window_left is XFASTINT (w->left), 402 window_left is XFASTINT (w->left),
403 and screen_width = SCREEN_WIDTH (XSCREEN (window->screen)) 403 and frame_width = FRAME_WIDTH (XFRAME (window->frame))
404 404
405 This accounts for the continuation-line backslashes, and the window 405 This accounts for the continuation-line backslashes, and the window
406 borders if the window is split vertically. */ 406 borders if the window is split vertically. */
@@ -513,7 +513,7 @@ compute_motion (from, fromvpos, fromhpos, to, tovpos, tohpos, width, hscroll, ta
513 break; 513 break;
514 if (hscroll 514 if (hscroll
515 || (truncate_partial_width_windows 515 || (truncate_partial_width_windows
516 && width + 1 < SCREEN_WIDTH (selected_screen)) 516 && width + 1 < FRAME_WIDTH (selected_frame))
517 || !NILP (current_buffer->truncate_lines)) 517 || !NILP (current_buffer->truncate_lines))
518 { 518 {
519 /* Truncating: skip to newline. */ 519 /* Truncating: skip to newline. */
@@ -561,7 +561,7 @@ pos_tab_offset (w, pos)
561 int col; 561 int col;
562 int width = XFASTINT (w->width) - 1 562 int width = XFASTINT (w->width) - 1
563 - (XFASTINT (w->width) + XFASTINT (w->left) 563 - (XFASTINT (w->width) + XFASTINT (w->left)
564 != SCREEN_WIDTH (XSCREEN (w->screen))); 564 != FRAME_WIDTH (XFRAME (w->frame)));
565 565
566 if (pos == BEGV || FETCH_CHAR (pos - 1) == '\n') 566 if (pos == BEGV || FETCH_CHAR (pos - 1) == '\n')
567 return 0; 567 return 0;
@@ -678,7 +678,7 @@ Returns number of lines moved; may be closer to zero than LINES\n\
678 register struct window *w = XWINDOW (selected_window); 678 register struct window *w = XWINDOW (selected_window);
679 int width = XFASTINT (w->width) - 1 679 int width = XFASTINT (w->width) - 1
680 - (XFASTINT (w->width) + XFASTINT (w->left) 680 - (XFASTINT (w->width) + XFASTINT (w->left)
681 != SCREEN_WIDTH (XSCREEN (w->screen))); 681 != FRAME_WIDTH (XFRAME (w->frame)));
682 682
683 CHECK_NUMBER (lines, 0); 683 CHECK_NUMBER (lines, 0);
684 684