diff options
| author | Jim Blandy | 1992-07-13 20:56:17 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-07-13 20:56:17 +0000 |
| commit | 0137dbf747e9fcbfe6f37c7fb0bbb29012a27179 (patch) | |
| tree | 658380474eae580fc6b03b724e6498d9cf0b783f /src | |
| parent | ff11dfa15b3b56559bac0d5c6b0a26a80d2d5f6d (diff) | |
| download | emacs-0137dbf747e9fcbfe6f37c7fb0bbb29012a27179.tar.gz emacs-0137dbf747e9fcbfe6f37c7fb0bbb29012a27179.zip | |
entered into RCS
Diffstat (limited to 'src')
| -rw-r--r-- | src/print.c | 42 | ||||
| -rw-r--r-- | src/scroll.c | 230 | ||||
| -rw-r--r-- | src/sunfns.c | 6 | ||||
| -rw-r--r-- | src/sysdep.c | 28 | ||||
| -rw-r--r-- | src/termchar.h | 4 | ||||
| -rw-r--r-- | src/termhooks.h | 34 |
6 files changed, 172 insertions, 172 deletions
diff --git a/src/print.c b/src/print.c index 534d5d67b22..4b707c1c24d 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -25,7 +25,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 25 | 25 | ||
| 26 | #ifndef standalone | 26 | #ifndef standalone |
| 27 | #include "buffer.h" | 27 | #include "buffer.h" |
| 28 | #include "screen.h" | 28 | #include "frame.h" |
| 29 | #include "window.h" | 29 | #include "window.h" |
| 30 | #include "process.h" | 30 | #include "process.h" |
| 31 | #include "dispextern.h" | 31 | #include "dispextern.h" |
| @@ -159,7 +159,7 @@ glyph_to_str_cpy (glyphs, str) | |||
| 159 | 159 | ||
| 160 | #define PRINTCHAR(ch) printchar (ch, printcharfun) | 160 | #define PRINTCHAR(ch) printchar (ch, printcharfun) |
| 161 | 161 | ||
| 162 | /* Index of first unused element of SCREEN_MESSAGE_BUF(selected_screen). */ | 162 | /* Index of first unused element of FRAME_MESSAGE_BUF(selected_frame). */ |
| 163 | static int printbufidx; | 163 | static int printbufidx; |
| 164 | 164 | ||
| 165 | static void | 165 | static void |
| @@ -190,17 +190,17 @@ printchar (ch, fun) | |||
| 190 | return; | 190 | return; |
| 191 | } | 191 | } |
| 192 | 192 | ||
| 193 | if (echo_area_glyphs != SCREEN_MESSAGE_BUF (selected_screen) | 193 | if (echo_area_glyphs != FRAME_MESSAGE_BUF (selected_frame) |
| 194 | || !message_buf_print) | 194 | || !message_buf_print) |
| 195 | { | 195 | { |
| 196 | echo_area_glyphs = SCREEN_MESSAGE_BUF (selected_screen); | 196 | echo_area_glyphs = FRAME_MESSAGE_BUF (selected_frame); |
| 197 | printbufidx = 0; | 197 | printbufidx = 0; |
| 198 | message_buf_print = 1; | 198 | message_buf_print = 1; |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | if (printbufidx < SCREEN_WIDTH (selected_screen) - 1) | 201 | if (printbufidx < FRAME_WIDTH (selected_frame) - 1) |
| 202 | SCREEN_MESSAGE_BUF (selected_screen)[printbufidx++] = ch; | 202 | FRAME_MESSAGE_BUF (selected_frame)[printbufidx++] = ch; |
| 203 | SCREEN_MESSAGE_BUF (selected_screen)[printbufidx] = 0; | 203 | FRAME_MESSAGE_BUF (selected_frame)[printbufidx] = 0; |
| 204 | 204 | ||
| 205 | return; | 205 | return; |
| 206 | } | 206 | } |
| @@ -242,19 +242,19 @@ strout (ptr, size, printcharfun) | |||
| 242 | return; | 242 | return; |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | if (echo_area_glyphs != SCREEN_MESSAGE_BUF (selected_screen) | 245 | if (echo_area_glyphs != FRAME_MESSAGE_BUF (selected_frame) |
| 246 | || !message_buf_print) | 246 | || !message_buf_print) |
| 247 | { | 247 | { |
| 248 | echo_area_glyphs = SCREEN_MESSAGE_BUF (selected_screen); | 248 | echo_area_glyphs = FRAME_MESSAGE_BUF (selected_frame); |
| 249 | printbufidx = 0; | 249 | printbufidx = 0; |
| 250 | message_buf_print = 1; | 250 | message_buf_print = 1; |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | if (i > SCREEN_WIDTH (selected_screen) - printbufidx - 1) | 253 | if (i > FRAME_WIDTH (selected_frame) - printbufidx - 1) |
| 254 | i = SCREEN_WIDTH (selected_screen) - printbufidx - 1; | 254 | i = FRAME_WIDTH (selected_frame) - printbufidx - 1; |
| 255 | bcopy (ptr, &SCREEN_MESSAGE_BUF (selected_screen) [printbufidx], i); | 255 | bcopy (ptr, &FRAME_MESSAGE_BUF (selected_frame) [printbufidx], i); |
| 256 | printbufidx += i; | 256 | printbufidx += i; |
| 257 | SCREEN_MESSAGE_BUF (selected_screen) [printbufidx] = 0; | 257 | FRAME_MESSAGE_BUF (selected_frame) [printbufidx] = 0; |
| 258 | 258 | ||
| 259 | return; | 259 | return; |
| 260 | } | 260 | } |
| @@ -275,7 +275,7 @@ print_string (string, printcharfun) | |||
| 275 | Lisp_Object printcharfun; | 275 | Lisp_Object printcharfun; |
| 276 | { | 276 | { |
| 277 | if (EQ (printcharfun, Qnil) || EQ (printcharfun, Qt)) | 277 | if (EQ (printcharfun, Qnil) || EQ (printcharfun, Qt)) |
| 278 | /* In predictable cases, strout is safe: output to buffer or screen. */ | 278 | /* In predictable cases, strout is safe: output to buffer or frame. */ |
| 279 | strout (XSTRING (string)->data, XSTRING (string)->size, printcharfun); | 279 | strout (XSTRING (string)->data, XSTRING (string)->size, printcharfun); |
| 280 | else | 280 | else |
| 281 | { | 281 | { |
| @@ -887,17 +887,17 @@ print (obj, printcharfun, escapeflag) | |||
| 887 | strout ("#<window-configuration>", -1, printcharfun); | 887 | strout ("#<window-configuration>", -1, printcharfun); |
| 888 | break; | 888 | break; |
| 889 | 889 | ||
| 890 | #ifdef MULTI_SCREEN | 890 | #ifdef MULTI_FRAME |
| 891 | case Lisp_Screen: | 891 | case Lisp_Frame: |
| 892 | strout (((XSCREEN (obj)->display.nothing == 0) | 892 | strout ((FRAME_LIVE_P (XFRAME (obj)) |
| 893 | ? "#<dead screen " : "#<screen "), | 893 | ? "#<frame " : "#<dead frame "), |
| 894 | -1, printcharfun); | 894 | -1, printcharfun); |
| 895 | print_string (XSCREEN (obj)->name, printcharfun); | 895 | print_string (XFRAME (obj)->name, printcharfun); |
| 896 | sprintf (buf, " 0x%x", XFASTINT (XSCREEN (obj))); | 896 | sprintf (buf, " 0x%x", XFASTINT (XFRAME (obj))); |
| 897 | strout (buf, -1, printcharfun); | 897 | strout (buf, -1, printcharfun); |
| 898 | strout (">", -1, printcharfun); | 898 | strout (">", -1, printcharfun); |
| 899 | break; | 899 | break; |
| 900 | #endif /* MULTI_SCREEN */ | 900 | #endif /* MULTI_FRAME */ |
| 901 | 901 | ||
| 902 | case Lisp_Marker: | 902 | case Lisp_Marker: |
| 903 | strout ("#<marker ", -1, printcharfun); | 903 | strout ("#<marker ", -1, printcharfun); |
diff --git a/src/scroll.c b/src/scroll.c index ed45318a26b..cc743ea0d59 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -22,7 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 22 | #include "termchar.h" | 22 | #include "termchar.h" |
| 23 | #include "lisp.h" | 23 | #include "lisp.h" |
| 24 | #include "dispextern.h" | 24 | #include "dispextern.h" |
| 25 | #include "screen.h" | 25 | #include "frame.h" |
| 26 | 26 | ||
| 27 | extern struct display_line **ophys_lines; | 27 | extern struct display_line **ophys_lines; |
| 28 | 28 | ||
| @@ -30,7 +30,7 @@ extern struct display_line **ophys_lines; | |||
| 30 | #define min(a, b) ((a) < (b) ? (a) : (b)) | 30 | #define min(a, b) ((a) < (b) ? (a) : (b)) |
| 31 | 31 | ||
| 32 | /* All costs measured in characters. | 32 | /* All costs measured in characters. |
| 33 | So no cost can exceed the area of a screen, measured in characters. | 33 | So no cost can exceed the area of a frame, measured in characters. |
| 34 | Let's hope this is never more than 15000 characters. */ | 34 | Let's hope this is never more than 15000 characters. */ |
| 35 | 35 | ||
| 36 | #define INFINITY 15000 | 36 | #define INFINITY 15000 |
| @@ -68,15 +68,15 @@ struct matrix_elt | |||
| 68 | /* draw_cost[VPOS] is the cost of outputting new line at VPOS. | 68 | /* draw_cost[VPOS] is the cost of outputting new line at VPOS. |
| 69 | old_hash[VPOS] is the hash code of the old line at VPOS. | 69 | old_hash[VPOS] is the hash code of the old line at VPOS. |
| 70 | new_hash[VPOS] is the hash code of the new line at VPOS. | 70 | new_hash[VPOS] is the hash code of the new line at VPOS. |
| 71 | Note that these are not true screen vpos's, but relative | 71 | Note that these are not true frame vpos's, but relative |
| 72 | to the place at which the first mismatch between old and | 72 | to the place at which the first mismatch between old and |
| 73 | new contents appears. */ | 73 | new contents appears. */ |
| 74 | 74 | ||
| 75 | static void | 75 | static void |
| 76 | calculate_scrolling (screen, matrix, window_size, lines_below, | 76 | calculate_scrolling (frame, matrix, window_size, lines_below, |
| 77 | draw_cost, old_hash, new_hash, | 77 | draw_cost, old_hash, new_hash, |
| 78 | free_at_end) | 78 | free_at_end) |
| 79 | SCREEN_PTR screen; | 79 | FRAME_PTR frame; |
| 80 | /* matrix is of size window_size + 1 on each side. */ | 80 | /* matrix is of size window_size + 1 on each side. */ |
| 81 | struct matrix_elt *matrix; | 81 | struct matrix_elt *matrix; |
| 82 | int window_size; | 82 | int window_size; |
| @@ -86,7 +86,7 @@ calculate_scrolling (screen, matrix, window_size, lines_below, | |||
| 86 | int free_at_end; | 86 | int free_at_end; |
| 87 | { | 87 | { |
| 88 | register int i, j; | 88 | register int i, j; |
| 89 | int screen_height = SCREEN_HEIGHT (screen); | 89 | int frame_height = FRAME_HEIGHT (frame); |
| 90 | register struct matrix_elt *p, *p1; | 90 | register struct matrix_elt *p, *p1; |
| 91 | register int cost, cost1; | 91 | register int cost, cost1; |
| 92 | 92 | ||
| @@ -95,18 +95,18 @@ calculate_scrolling (screen, matrix, window_size, lines_below, | |||
| 95 | at the I'th line of the lines we are considering, | 95 | at the I'th line of the lines we are considering, |
| 96 | where I is origin 1 (as it is below). */ | 96 | where I is origin 1 (as it is below). */ |
| 97 | int *first_insert_cost | 97 | int *first_insert_cost |
| 98 | = &SCREEN_INSERT_COST (screen)[screen_height - 1 - lines_moved]; | 98 | = &FRAME_INSERT_COST (frame)[frame_height - 1 - lines_moved]; |
| 99 | int *first_delete_cost | 99 | int *first_delete_cost |
| 100 | = &SCREEN_DELETE_COST (screen)[screen_height - 1 - lines_moved]; | 100 | = &FRAME_DELETE_COST (frame)[frame_height - 1 - lines_moved]; |
| 101 | int *next_insert_cost | 101 | int *next_insert_cost |
| 102 | = &SCREEN_INSERTN_COST (screen)[screen_height - 1 - lines_moved]; | 102 | = &FRAME_INSERTN_COST (frame)[frame_height - 1 - lines_moved]; |
| 103 | int *next_delete_cost | 103 | int *next_delete_cost |
| 104 | = &SCREEN_DELETEN_COST (screen)[screen_height - 1 - lines_moved]; | 104 | = &FRAME_DELETEN_COST (frame)[frame_height - 1 - lines_moved]; |
| 105 | 105 | ||
| 106 | /* Discourage long scrolls on fast lines. | 106 | /* Discourage long scrolls on fast lines. |
| 107 | Don't scroll nearly a full screen height unless it saves | 107 | Don't scroll nearly a full frame height unless it saves |
| 108 | at least 1/4 second. */ | 108 | at least 1/4 second. */ |
| 109 | int extra_cost = baud_rate / (10 * 4 * SCREEN_HEIGHT (screen)); | 109 | int extra_cost = baud_rate / (10 * 4 * FRAME_HEIGHT (frame)); |
| 110 | 110 | ||
| 111 | /* initialize the top left corner of the matrix */ | 111 | /* initialize the top left corner of the matrix */ |
| 112 | matrix->writecost = 0; | 112 | matrix->writecost = 0; |
| @@ -140,8 +140,8 @@ calculate_scrolling (screen, matrix, window_size, lines_below, | |||
| 140 | matrix[j].insertcount = 0; | 140 | matrix[j].insertcount = 0; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | /* `i' represents the vpos among new screen contents. | 143 | /* `i' represents the vpos among new frame contents. |
| 144 | `j' represents the vpos among the old screen contents. */ | 144 | `j' represents the vpos among the old frame contents. */ |
| 145 | p = matrix + window_size + 2; /* matrix [1, 1] */ | 145 | p = matrix + window_size + 2; /* matrix [1, 1] */ |
| 146 | for (i = 1; i <= window_size; i++, p++) | 146 | for (i = 1; i <= window_size; i++, p++) |
| 147 | for (j = 1; j <= window_size; j++, p++) | 147 | for (j = 1; j <= window_size; j++, p++) |
| @@ -216,20 +216,20 @@ calculate_scrolling (screen, matrix, window_size, lines_below, | |||
| 216 | 216 | ||
| 217 | /* Perform insert-lines and delete-lines operations | 217 | /* Perform insert-lines and delete-lines operations |
| 218 | according to the costs in the matrix. | 218 | according to the costs in the matrix. |
| 219 | Updates the contents of the screen to record what was done. */ | 219 | Updates the contents of the frame to record what was done. */ |
| 220 | 220 | ||
| 221 | static void | 221 | static void |
| 222 | do_scrolling (screen, matrix, window_size, unchanged_at_top) | 222 | do_scrolling (frame, matrix, window_size, unchanged_at_top) |
| 223 | SCREEN_PTR screen; | 223 | FRAME_PTR frame; |
| 224 | struct matrix_elt *matrix; | 224 | struct matrix_elt *matrix; |
| 225 | int window_size; | 225 | int window_size; |
| 226 | int unchanged_at_top; | 226 | int unchanged_at_top; |
| 227 | { | 227 | { |
| 228 | register struct matrix_elt *p; | 228 | register struct matrix_elt *p; |
| 229 | register int i, j; | 229 | register int i, j; |
| 230 | register struct screen_glyphs *current_screen; | 230 | register struct frame_glyphs *current_frame; |
| 231 | /* temp_screen->enable[i] means line i has been moved to current_screen. */ | 231 | /* temp_frame->enable[i] means line i has been moved to current_frame. */ |
| 232 | register struct screen_glyphs *temp_screen; | 232 | register struct frame_glyphs *temp_frame; |
| 233 | struct queue { int count, pos; } *queue; | 233 | struct queue { int count, pos; } *queue; |
| 234 | int offset = unchanged_at_top; | 234 | int offset = unchanged_at_top; |
| 235 | int qi = 0; | 235 | int qi = 0; |
| @@ -237,37 +237,37 @@ do_scrolling (screen, matrix, window_size, unchanged_at_top) | |||
| 237 | register int tem; | 237 | register int tem; |
| 238 | int next; | 238 | int next; |
| 239 | 239 | ||
| 240 | queue = (struct queue *) alloca (SCREEN_HEIGHT (screen) | 240 | queue = (struct queue *) alloca (FRAME_HEIGHT (frame) |
| 241 | * sizeof (struct queue)); | 241 | * sizeof (struct queue)); |
| 242 | 242 | ||
| 243 | current_screen = SCREEN_CURRENT_GLYPHS (screen); | 243 | current_frame = FRAME_CURRENT_GLYPHS (frame); |
| 244 | temp_screen = SCREEN_TEMP_GLYPHS (screen); | 244 | temp_frame = FRAME_TEMP_GLYPHS (frame); |
| 245 | 245 | ||
| 246 | bcopy (current_screen->glyphs, temp_screen->glyphs, | 246 | bcopy (current_frame->glyphs, temp_frame->glyphs, |
| 247 | current_screen->height * sizeof (GLYPH *)); | 247 | current_frame->height * sizeof (GLYPH *)); |
| 248 | bcopy (current_screen->used, temp_screen->used, | 248 | bcopy (current_frame->used, temp_frame->used, |
| 249 | current_screen->height * sizeof (int)); | 249 | current_frame->height * sizeof (int)); |
| 250 | bcopy (current_screen->highlight, temp_screen->highlight, | 250 | bcopy (current_frame->highlight, temp_frame->highlight, |
| 251 | current_screen->height * sizeof (char)); | 251 | current_frame->height * sizeof (char)); |
| 252 | bzero (temp_screen->enable, temp_screen->height * sizeof (char)); | 252 | bzero (temp_frame->enable, temp_frame->height * sizeof (char)); |
| 253 | bcopy (current_screen->bufp, temp_screen->bufp, | 253 | bcopy (current_frame->bufp, temp_frame->bufp, |
| 254 | current_screen->height * sizeof (int)); | 254 | current_frame->height * sizeof (int)); |
| 255 | 255 | ||
| 256 | #ifdef HAVE_X_WINDOWS | 256 | #ifdef HAVE_X_WINDOWS |
| 257 | if (SCREEN_IS_X (screen)) | 257 | if (FRAME_IS_X (frame)) |
| 258 | { | 258 | { |
| 259 | bcopy (current_screen->nruns, temp_screen->nruns, | 259 | bcopy (current_frame->nruns, temp_frame->nruns, |
| 260 | current_screen->height * sizeof (int)); | 260 | current_frame->height * sizeof (int)); |
| 261 | bcopy (current_screen->face_list, temp_screen->face_list, | 261 | bcopy (current_frame->face_list, temp_frame->face_list, |
| 262 | current_screen->height * sizeof (struct run *)); | 262 | current_frame->height * sizeof (struct run *)); |
| 263 | bcopy (current_screen->top_left_x, temp_screen->top_left_x, | 263 | bcopy (current_frame->top_left_x, temp_frame->top_left_x, |
| 264 | current_screen->height * sizeof (short)); | 264 | current_frame->height * sizeof (short)); |
| 265 | bcopy (current_screen->top_left_y, temp_screen->top_left_y, | 265 | bcopy (current_frame->top_left_y, temp_frame->top_left_y, |
| 266 | current_screen->height * sizeof (short)); | 266 | current_frame->height * sizeof (short)); |
| 267 | bcopy (current_screen->pix_width, temp_screen->pix_width, | 267 | bcopy (current_frame->pix_width, temp_frame->pix_width, |
| 268 | current_screen->height * sizeof (short)); | 268 | current_frame->height * sizeof (short)); |
| 269 | bcopy (current_screen->pix_height, temp_screen->pix_height, | 269 | bcopy (current_frame->pix_height, temp_frame->pix_height, |
| 270 | current_screen->height * sizeof (short)); | 270 | current_frame->height * sizeof (short)); |
| 271 | } | 271 | } |
| 272 | #endif | 272 | #endif |
| 273 | 273 | ||
| @@ -300,14 +300,14 @@ do_scrolling (screen, matrix, window_size, unchanged_at_top) | |||
| 300 | { | 300 | { |
| 301 | /* Best thing done here is no insert or delete */ | 301 | /* Best thing done here is no insert or delete */ |
| 302 | /* Old line at vpos j-1 ends up at vpos i-1 */ | 302 | /* Old line at vpos j-1 ends up at vpos i-1 */ |
| 303 | current_screen->glyphs[i + offset - 1] | 303 | current_frame->glyphs[i + offset - 1] |
| 304 | = temp_screen->glyphs[j + offset - 1]; | 304 | = temp_frame->glyphs[j + offset - 1]; |
| 305 | current_screen->used[i + offset - 1] | 305 | current_frame->used[i + offset - 1] |
| 306 | = temp_screen->used[j + offset - 1]; | 306 | = temp_frame->used[j + offset - 1]; |
| 307 | current_screen->highlight[i + offset - 1] | 307 | current_frame->highlight[i + offset - 1] |
| 308 | = temp_screen->highlight[j + offset - 1]; | 308 | = temp_frame->highlight[j + offset - 1]; |
| 309 | 309 | ||
| 310 | temp_screen->enable[j + offset - 1] = 1; | 310 | temp_frame->enable[j + offset - 1] = 1; |
| 311 | i--; | 311 | i--; |
| 312 | j--; | 312 | j--; |
| 313 | } | 313 | } |
| @@ -329,14 +329,14 @@ do_scrolling (screen, matrix, window_size, unchanged_at_top) | |||
| 329 | /* Mark the inserted lines as clear, | 329 | /* Mark the inserted lines as clear, |
| 330 | and put into them the line-contents strings | 330 | and put into them the line-contents strings |
| 331 | that were discarded during the deletions. | 331 | that were discarded during the deletions. |
| 332 | Those are the ones for which temp_screen->enable was not set. */ | 332 | Those are the ones for which temp_frame->enable was not set. */ |
| 333 | tem = queue[i].pos; | 333 | tem = queue[i].pos; |
| 334 | for (j = tem + queue[i].count - 1; j >= tem; j--) | 334 | for (j = tem + queue[i].count - 1; j >= tem; j--) |
| 335 | { | 335 | { |
| 336 | current_screen->enable[j] = 0; | 336 | current_frame->enable[j] = 0; |
| 337 | while (temp_screen->enable[next]) | 337 | while (temp_frame->enable[next]) |
| 338 | next++; | 338 | next++; |
| 339 | current_screen->glyphs[j] = temp_screen->glyphs[next++]; | 339 | current_frame->glyphs[j] = temp_frame->glyphs[next++]; |
| 340 | } | 340 | } |
| 341 | } | 341 | } |
| 342 | 342 | ||
| @@ -345,9 +345,9 @@ do_scrolling (screen, matrix, window_size, unchanged_at_top) | |||
| 345 | } | 345 | } |
| 346 | 346 | ||
| 347 | void | 347 | void |
| 348 | scrolling_1 (screen, window_size, unchanged_at_top, unchanged_at_bottom, | 348 | scrolling_1 (frame, window_size, unchanged_at_top, unchanged_at_bottom, |
| 349 | draw_cost, old_hash, new_hash, free_at_end) | 349 | draw_cost, old_hash, new_hash, free_at_end) |
| 350 | SCREEN_PTR screen; | 350 | FRAME_PTR frame; |
| 351 | int window_size, unchanged_at_top, unchanged_at_bottom; | 351 | int window_size, unchanged_at_top, unchanged_at_bottom; |
| 352 | int *draw_cost; | 352 | int *draw_cost; |
| 353 | int *old_hash; | 353 | int *old_hash; |
| @@ -358,13 +358,13 @@ scrolling_1 (screen, window_size, unchanged_at_top, unchanged_at_bottom, | |||
| 358 | matrix = ((struct matrix_elt *) | 358 | matrix = ((struct matrix_elt *) |
| 359 | alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); | 359 | alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); |
| 360 | 360 | ||
| 361 | calculate_scrolling (screen, matrix, window_size, unchanged_at_bottom, | 361 | calculate_scrolling (frame, matrix, window_size, unchanged_at_bottom, |
| 362 | draw_cost, old_hash, new_hash, | 362 | draw_cost, old_hash, new_hash, |
| 363 | free_at_end); | 363 | free_at_end); |
| 364 | do_scrolling (screen, matrix, window_size, unchanged_at_top); | 364 | do_scrolling (frame, matrix, window_size, unchanged_at_top); |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | /* Return number of lines in common between current and desired screen contents | 367 | /* Return number of lines in common between current and desired frame contents |
| 368 | described to us only as vectors of hash codes OLDHASH and NEWHASH. | 368 | described to us only as vectors of hash codes OLDHASH and NEWHASH. |
| 369 | Consider only vpos range START to END (not including END). | 369 | Consider only vpos range START to END (not including END). |
| 370 | Ignore short lines on the assumption that | 370 | Ignore short lines on the assumption that |
| @@ -427,17 +427,17 @@ scrolling_max_lines_saved (start, end, oldhash, newhash, cost) | |||
| 427 | starting with vpos FROM, up to but not including vpos TO, | 427 | starting with vpos FROM, up to but not including vpos TO, |
| 428 | down by AMOUNT lines (AMOUNT may be negative). | 428 | down by AMOUNT lines (AMOUNT may be negative). |
| 429 | These are the same arguments that might be given to | 429 | These are the same arguments that might be given to |
| 430 | scroll_screen_lines to perform this scrolling. */ | 430 | scroll_frame_lines to perform this scrolling. */ |
| 431 | 431 | ||
| 432 | scroll_cost (screen, from, to, amount) | 432 | scroll_cost (frame, from, to, amount) |
| 433 | SCREEN_PTR screen; | 433 | FRAME_PTR frame; |
| 434 | int from, to, amount; | 434 | int from, to, amount; |
| 435 | { | 435 | { |
| 436 | /* Compute how many lines, at bottom of screen, | 436 | /* Compute how many lines, at bottom of frame, |
| 437 | will not be involved in actual motion. */ | 437 | will not be involved in actual motion. */ |
| 438 | int limit = to; | 438 | int limit = to; |
| 439 | int offset; | 439 | int offset; |
| 440 | int height = SCREEN_HEIGHT (screen); | 440 | int height = FRAME_HEIGHT (frame); |
| 441 | 441 | ||
| 442 | if (amount == 0) | 442 | if (amount == 0) |
| 443 | return 0; | 443 | return 0; |
| @@ -458,28 +458,28 @@ scroll_cost (screen, from, to, amount) | |||
| 458 | offset = height - limit; | 458 | offset = height - limit; |
| 459 | 459 | ||
| 460 | return | 460 | return |
| 461 | (SCREEN_INSERT_COST (screen)[offset + from] | 461 | (FRAME_INSERT_COST (frame)[offset + from] |
| 462 | + (amount - 1) * SCREEN_INSERTN_COST (screen)[offset + from] | 462 | + (amount - 1) * FRAME_INSERTN_COST (frame)[offset + from] |
| 463 | + SCREEN_DELETEN_COST (screen)[offset + to] | 463 | + FRAME_DELETEN_COST (frame)[offset + to] |
| 464 | + (amount - 1) * SCREEN_DELETE_COST (screen)[offset + to]); | 464 | + (amount - 1) * FRAME_DELETE_COST (frame)[offset + to]); |
| 465 | } | 465 | } |
| 466 | 466 | ||
| 467 | /* Calculate the line insertion/deletion | 467 | /* Calculate the line insertion/deletion |
| 468 | overhead and multiply factor values */ | 468 | overhead and multiply factor values */ |
| 469 | 469 | ||
| 470 | static void | 470 | static void |
| 471 | line_ins_del (screen, ov1, pf1, ovn, pfn, ov, mf) | 471 | line_ins_del (frame, ov1, pf1, ovn, pfn, ov, mf) |
| 472 | SCREEN_PTR screen; | 472 | FRAME_PTR frame; |
| 473 | int ov1, ovn; | 473 | int ov1, ovn; |
| 474 | int pf1, pfn; | 474 | int pf1, pfn; |
| 475 | register int *ov, *mf; | 475 | register int *ov, *mf; |
| 476 | { | 476 | { |
| 477 | register int i; | 477 | register int i; |
| 478 | register int screen_height = SCREEN_HEIGHT (screen); | 478 | register int frame_height = FRAME_HEIGHT (frame); |
| 479 | register int insert_overhead = ov1 * 10; | 479 | register int insert_overhead = ov1 * 10; |
| 480 | register int next_insert_cost = ovn * 10; | 480 | register int next_insert_cost = ovn * 10; |
| 481 | 481 | ||
| 482 | for (i = screen_height-1; i >= 0; i--) | 482 | for (i = frame_height-1; i >= 0; i--) |
| 483 | { | 483 | { |
| 484 | mf[i] = next_insert_cost / 10; | 484 | mf[i] = next_insert_cost / 10; |
| 485 | next_insert_cost += pfn; | 485 | next_insert_cost += pfn; |
| @@ -489,29 +489,29 @@ line_ins_del (screen, ov1, pf1, ovn, pfn, ov, mf) | |||
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | static void | 491 | static void |
| 492 | ins_del_costs (screen, | 492 | ins_del_costs (frame, |
| 493 | one_line_string, multi_string, | 493 | one_line_string, multi_string, |
| 494 | setup_string, cleanup_string, | 494 | setup_string, cleanup_string, |
| 495 | costvec, ncostvec, coefficient) | 495 | costvec, ncostvec, coefficient) |
| 496 | SCREEN_PTR screen; | 496 | FRAME_PTR frame; |
| 497 | char *one_line_string, *multi_string; | 497 | char *one_line_string, *multi_string; |
| 498 | char *setup_string, *cleanup_string; | 498 | char *setup_string, *cleanup_string; |
| 499 | int *costvec, *ncostvec; | 499 | int *costvec, *ncostvec; |
| 500 | int coefficient; | 500 | int coefficient; |
| 501 | { | 501 | { |
| 502 | if (multi_string) | 502 | if (multi_string) |
| 503 | line_ins_del (screen, | 503 | line_ins_del (frame, |
| 504 | string_cost (multi_string) * coefficient, | 504 | string_cost (multi_string) * coefficient, |
| 505 | per_line_cost (multi_string) * coefficient, | 505 | per_line_cost (multi_string) * coefficient, |
| 506 | 0, 0, costvec, ncostvec); | 506 | 0, 0, costvec, ncostvec); |
| 507 | else if (one_line_string) | 507 | else if (one_line_string) |
| 508 | line_ins_del (screen, | 508 | line_ins_del (frame, |
| 509 | string_cost (setup_string) + string_cost (cleanup_string), 0, | 509 | string_cost (setup_string) + string_cost (cleanup_string), 0, |
| 510 | string_cost (one_line_string), | 510 | string_cost (one_line_string), |
| 511 | per_line_cost (one_line_string), | 511 | per_line_cost (one_line_string), |
| 512 | costvec, ncostvec); | 512 | costvec, ncostvec); |
| 513 | else | 513 | else |
| 514 | line_ins_del (screen, | 514 | line_ins_del (frame, |
| 515 | 9999, 0, 9999, 0, | 515 | 9999, 0, 9999, 0, |
| 516 | costvec, ncostvec); | 516 | costvec, ncostvec); |
| 517 | } | 517 | } |
| @@ -519,7 +519,7 @@ ins_del_costs (screen, | |||
| 519 | /* Calculate the insert and delete line costs. | 519 | /* Calculate the insert and delete line costs. |
| 520 | Note that this is done even when running with a window system | 520 | Note that this is done even when running with a window system |
| 521 | because we want to know how long scrolling takes (and avoid it). | 521 | because we want to know how long scrolling takes (and avoid it). |
| 522 | This must be redone whenever the screen height changes. | 522 | This must be redone whenever the frame height changes. |
| 523 | 523 | ||
| 524 | We keep the ID costs in a precomputed array based on the position | 524 | We keep the ID costs in a precomputed array based on the position |
| 525 | at which the I or D is performed. Also, there are two kinds of ID | 525 | at which the I or D is performed. Also, there are two kinds of ID |
| @@ -528,71 +528,71 @@ ins_del_costs (screen, | |||
| 528 | only) and those that must repeatedly insert one line. | 528 | only) and those that must repeatedly insert one line. |
| 529 | 529 | ||
| 530 | The cost to insert N lines at line L is | 530 | The cost to insert N lines at line L is |
| 531 | [tt.t_ILov + (screen_height + 1 - L) * tt.t_ILpf] + | 531 | [tt.t_ILov + (frame_height + 1 - L) * tt.t_ILpf] + |
| 532 | N * [tt.t_ILnov + (screen_height + 1 - L) * tt.t_ILnpf] | 532 | N * [tt.t_ILnov + (frame_height + 1 - L) * tt.t_ILnpf] |
| 533 | 533 | ||
| 534 | ILov represents the basic insert line overhead. ILpf is the padding | 534 | ILov represents the basic insert line overhead. ILpf is the padding |
| 535 | required to allow the terminal time to move a line: insertion at line | 535 | required to allow the terminal time to move a line: insertion at line |
| 536 | L changes (screen_height + 1 - L) lines. | 536 | L changes (frame_height + 1 - L) lines. |
| 537 | 537 | ||
| 538 | The first bracketed expression above is the overhead; the second is | 538 | The first bracketed expression above is the overhead; the second is |
| 539 | the multiply factor. Both are dependent only on the position at | 539 | the multiply factor. Both are dependent only on the position at |
| 540 | which the insert is performed. We store the overhead in | 540 | which the insert is performed. We store the overhead in |
| 541 | SCREEN_INSERT_COST (screen) and the multiply factor in | 541 | FRAME_INSERT_COST (frame) and the multiply factor in |
| 542 | SCREEN_INSERTN_COST (screen). Note however that any insertion | 542 | FRAME_INSERTN_COST (frame). Note however that any insertion |
| 543 | must include at least one multiply factor. Rather than compute this | 543 | must include at least one multiply factor. Rather than compute this |
| 544 | as SCREEN_INSERT_COST (screen)[line]+SCREEN_INSERTN_COST (screen)[line], | 544 | as FRAME_INSERT_COST (frame)[line]+FRAME_INSERTN_COST (frame)[line], |
| 545 | we add SCREEN_INSERTN_COST (screen) into SCREEN_INSERT_COST (screen). | 545 | we add FRAME_INSERTN_COST (frame) into FRAME_INSERT_COST (frame). |
| 546 | This is reasonable because of the particular algorithm used in calcM. | 546 | This is reasonable because of the particular algorithm used in calcM. |
| 547 | 547 | ||
| 548 | Deletion is essentially the same as insertion. | 548 | Deletion is essentially the same as insertion. |
| 549 | */ | 549 | */ |
| 550 | 550 | ||
| 551 | do_line_insertion_deletion_costs (screen, | 551 | do_line_insertion_deletion_costs (frame, |
| 552 | ins_line_string, multi_ins_string, | 552 | ins_line_string, multi_ins_string, |
| 553 | del_line_string, multi_del_string, | 553 | del_line_string, multi_del_string, |
| 554 | setup_string, cleanup_string, coefficient) | 554 | setup_string, cleanup_string, coefficient) |
| 555 | SCREEN_PTR screen; | 555 | FRAME_PTR frame; |
| 556 | char *ins_line_string, *multi_ins_string; | 556 | char *ins_line_string, *multi_ins_string; |
| 557 | char *del_line_string, *multi_del_string; | 557 | char *del_line_string, *multi_del_string; |
| 558 | char *setup_string, *cleanup_string; | 558 | char *setup_string, *cleanup_string; |
| 559 | int coefficient; | 559 | int coefficient; |
| 560 | { | 560 | { |
| 561 | if (SCREEN_INSERT_COST (screen) != 0) | 561 | if (FRAME_INSERT_COST (frame) != 0) |
| 562 | { | 562 | { |
| 563 | SCREEN_INSERT_COST (screen) = | 563 | FRAME_INSERT_COST (frame) = |
| 564 | (int *) xrealloc (SCREEN_INSERT_COST (screen), | 564 | (int *) xrealloc (FRAME_INSERT_COST (frame), |
| 565 | SCREEN_HEIGHT (screen) * sizeof (int)); | 565 | FRAME_HEIGHT (frame) * sizeof (int)); |
| 566 | SCREEN_DELETEN_COST (screen) = | 566 | FRAME_DELETEN_COST (frame) = |
| 567 | (int *) xrealloc (SCREEN_DELETEN_COST (screen), | 567 | (int *) xrealloc (FRAME_DELETEN_COST (frame), |
| 568 | SCREEN_HEIGHT (screen) * sizeof (int)); | 568 | FRAME_HEIGHT (frame) * sizeof (int)); |
| 569 | SCREEN_INSERTN_COST (screen) = | 569 | FRAME_INSERTN_COST (frame) = |
| 570 | (int *) xrealloc (SCREEN_INSERTN_COST (screen), | 570 | (int *) xrealloc (FRAME_INSERTN_COST (frame), |
| 571 | SCREEN_HEIGHT (screen) * sizeof (int)); | 571 | FRAME_HEIGHT (frame) * sizeof (int)); |
| 572 | SCREEN_DELETE_COST (screen) = | 572 | FRAME_DELETE_COST (frame) = |
| 573 | (int *) xrealloc (SCREEN_DELETE_COST (screen), | 573 | (int *) xrealloc (FRAME_DELETE_COST (frame), |
| 574 | SCREEN_HEIGHT (screen) * sizeof (int)); | 574 | FRAME_HEIGHT (frame) * sizeof (int)); |
| 575 | } | 575 | } |
| 576 | else | 576 | else |
| 577 | { | 577 | { |
| 578 | SCREEN_INSERT_COST (screen) = | 578 | FRAME_INSERT_COST (frame) = |
| 579 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 579 | (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); |
| 580 | SCREEN_DELETEN_COST (screen) = | 580 | FRAME_DELETEN_COST (frame) = |
| 581 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 581 | (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); |
| 582 | SCREEN_INSERTN_COST (screen) = | 582 | FRAME_INSERTN_COST (frame) = |
| 583 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 583 | (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); |
| 584 | SCREEN_DELETE_COST (screen) = | 584 | FRAME_DELETE_COST (frame) = |
| 585 | (int *) xmalloc (SCREEN_HEIGHT (screen) * sizeof (int)); | 585 | (int *) xmalloc (FRAME_HEIGHT (frame) * sizeof (int)); |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | ins_del_costs (screen, | 588 | ins_del_costs (frame, |
| 589 | ins_line_string, multi_ins_string, | 589 | ins_line_string, multi_ins_string, |
| 590 | setup_string, cleanup_string, | 590 | setup_string, cleanup_string, |
| 591 | SCREEN_INSERT_COST (screen), SCREEN_INSERTN_COST (screen), | 591 | FRAME_INSERT_COST (frame), FRAME_INSERTN_COST (frame), |
| 592 | coefficient); | 592 | coefficient); |
| 593 | ins_del_costs (screen, | 593 | ins_del_costs (frame, |
| 594 | del_line_string, multi_del_string, | 594 | del_line_string, multi_del_string, |
| 595 | setup_string, cleanup_string, | 595 | setup_string, cleanup_string, |
| 596 | SCREEN_DELETEN_COST (screen), SCREEN_DELETE_COST (screen), | 596 | FRAME_DELETEN_COST (frame), FRAME_DELETE_COST (frame), |
| 597 | coefficient); | 597 | coefficient); |
| 598 | } | 598 | } |
diff --git a/src/sunfns.c b/src/sunfns.c index 7c637e670f0..d870c7e4090 100644 --- a/src/sunfns.c +++ b/src/sunfns.c | |||
| @@ -46,14 +46,14 @@ who first discovered the Menu_Base_Kludge. | |||
| 46 | #include "buffer.h" | 46 | #include "buffer.h" |
| 47 | #include "termhooks.h" | 47 | #include "termhooks.h" |
| 48 | 48 | ||
| 49 | /* conversion to/from character & screen coordinates */ | 49 | /* conversion to/from character & frame coordinates */ |
| 50 | /* From Gosling Emacs SunWindow driver by Chris Torek */ | 50 | /* From Gosling Emacs SunWindow driver by Chris Torek */ |
| 51 | 51 | ||
| 52 | /* Chars to screen coords. Note that we speak in zero origin. */ | 52 | /* Chars to frame coords. Note that we speak in zero origin. */ |
| 53 | #define CtoSX(cx) ((cx) * Sun_Font_Xsize) | 53 | #define CtoSX(cx) ((cx) * Sun_Font_Xsize) |
| 54 | #define CtoSY(cy) ((cy) * Sun_Font_Ysize) | 54 | #define CtoSY(cy) ((cy) * Sun_Font_Ysize) |
| 55 | 55 | ||
| 56 | /* Screen coords to chars */ | 56 | /* Frame coords to chars */ |
| 57 | #define StoCX(sx) ((sx) / Sun_Font_Xsize) | 57 | #define StoCX(sx) ((sx) / Sun_Font_Xsize) |
| 58 | #define StoCY(sy) ((sy) / Sun_Font_Ysize) | 58 | #define StoCY(sy) ((sy) / Sun_Font_Ysize) |
| 59 | 59 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index 5c3bdfc232e..7283f7d9e06 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -133,7 +133,7 @@ extern char *sys_errlist[]; | |||
| 133 | 133 | ||
| 134 | extern int quit_char; | 134 | extern int quit_char; |
| 135 | 135 | ||
| 136 | #include "screen.h" | 136 | #include "frame.h" |
| 137 | #include "window.h" | 137 | #include "window.h" |
| 138 | #include "termhooks.h" | 138 | #include "termhooks.h" |
| 139 | #include "termchar.h" | 139 | #include "termchar.h" |
| @@ -897,7 +897,7 @@ init_sys_modes () | |||
| 897 | EMACS_SET_TTY (input_fd, &tty, 0); | 897 | EMACS_SET_TTY (input_fd, &tty, 0); |
| 898 | 898 | ||
| 899 | /* This code added to insure that, if flow-control is not to be used, | 899 | /* This code added to insure that, if flow-control is not to be used, |
| 900 | we have an unlocked screen at the start. */ | 900 | we have an unlocked terminal at the start. */ |
| 901 | 901 | ||
| 902 | #ifdef TCXONC | 902 | #ifdef TCXONC |
| 903 | if (!flow_control) ioctl (0, TCXONC, 1); | 903 | if (!flow_control) ioctl (0, TCXONC, 1); |
| @@ -966,10 +966,10 @@ init_sys_modes () | |||
| 966 | } | 966 | } |
| 967 | else | 967 | else |
| 968 | { | 968 | { |
| 969 | screen_garbaged = 1; | 969 | frame_garbaged = 1; |
| 970 | #ifdef MULTI_SCREEN | 970 | #ifdef MULTI_FRAME |
| 971 | if (SCREENP (Vterminal_screen)) | 971 | if (FRAMEP (Vterminal_frame)) |
| 972 | SCREEN_GARBAGED_P (XSCREEN (Vterminal_screen)) = 1; | 972 | FRAME_GARBAGED_P (XFRAME (Vterminal_frame)) = 1; |
| 973 | #endif | 973 | #endif |
| 974 | } | 974 | } |
| 975 | 975 | ||
| @@ -991,7 +991,7 @@ tabs_safe_p () | |||
| 991 | Store number of lines into *heightp and width into *widthp. | 991 | Store number of lines into *heightp and width into *widthp. |
| 992 | If zero or a negative number is stored, the value is not valid. */ | 992 | If zero or a negative number is stored, the value is not valid. */ |
| 993 | 993 | ||
| 994 | get_screen_size (widthp, heightp) | 994 | get_frame_size (widthp, heightp) |
| 995 | int *widthp, *heightp; | 995 | int *widthp, *heightp; |
| 996 | { | 996 | { |
| 997 | 997 | ||
| @@ -1044,7 +1044,7 @@ get_screen_size (widthp, heightp) | |||
| 1044 | 1044 | ||
| 1045 | 1045 | ||
| 1046 | /* Prepare the terminal for exiting Emacs; move the cursor to the | 1046 | /* Prepare the terminal for exiting Emacs; move the cursor to the |
| 1047 | bottom of the screen, turn off interrupt-driven I/O, etc. */ | 1047 | bottom of the frame, turn off interrupt-driven I/O, etc. */ |
| 1048 | reset_sys_modes () | 1048 | reset_sys_modes () |
| 1049 | { | 1049 | { |
| 1050 | if (noninteractive) | 1050 | if (noninteractive) |
| @@ -1056,10 +1056,10 @@ reset_sys_modes () | |||
| 1056 | return; | 1056 | return; |
| 1057 | if (read_socket_hook || !EQ (Vwindow_system, Qnil)) | 1057 | if (read_socket_hook || !EQ (Vwindow_system, Qnil)) |
| 1058 | return; | 1058 | return; |
| 1059 | cursor_to (SCREEN_HEIGHT (selected_screen) - 1, 0); | 1059 | cursor_to (FRAME_HEIGHT (selected_frame) - 1, 0); |
| 1060 | clear_end_of_line (SCREEN_WIDTH (selected_screen)); | 1060 | clear_end_of_line (FRAME_WIDTH (selected_frame)); |
| 1061 | /* clear_end_of_line may move the cursor */ | 1061 | /* clear_end_of_line may move the cursor */ |
| 1062 | cursor_to (SCREEN_HEIGHT (selected_screen) - 1, 0); | 1062 | cursor_to (FRAME_HEIGHT (selected_frame) - 1, 0); |
| 1063 | #ifdef IBMR2AIX | 1063 | #ifdef IBMR2AIX |
| 1064 | { | 1064 | { |
| 1065 | /* HFT devices normally use ^J as a LF/CR. We forced it to | 1065 | /* HFT devices normally use ^J as a LF/CR. We forced it to |
| @@ -1233,7 +1233,7 @@ kbd_input_ast () | |||
| 1233 | struct input_event e; | 1233 | struct input_event e; |
| 1234 | e.kind = ascii_keystroke; | 1234 | e.kind = ascii_keystroke; |
| 1235 | XSET (buf[i].code, Lisp_Int, cbuf[i]); | 1235 | XSET (buf[i].code, Lisp_Int, cbuf[i]); |
| 1236 | e.screen = selected_screen; | 1236 | e.frame = selected_frame; |
| 1237 | kbd_buffer_store_event (&e); | 1237 | kbd_buffer_store_event (&e); |
| 1238 | } | 1238 | } |
| 1239 | 1239 | ||
| @@ -1729,7 +1729,7 @@ read_input_waiting () | |||
| 1729 | 1729 | ||
| 1730 | /* Scan the chars for C-g and store them in kbd_buffer. */ | 1730 | /* Scan the chars for C-g and store them in kbd_buffer. */ |
| 1731 | e.kind = ascii_keystroke; | 1731 | e.kind = ascii_keystroke; |
| 1732 | e.screen = selected_screen; | 1732 | e.frame = selected_frame; |
| 1733 | for (i = 0; i < nread; i++) | 1733 | for (i = 0; i < nread; i++) |
| 1734 | { | 1734 | { |
| 1735 | XSET (e.code, Lisp_Int, buf[i]); | 1735 | XSET (e.code, Lisp_Int, buf[i]); |
| @@ -3881,7 +3881,7 @@ rename_sans_version (from,to) | |||
| 3881 | stat = sys$dassgn (chan); | 3881 | stat = sys$dassgn (chan); |
| 3882 | if (!stat) | 3882 | if (!stat) |
| 3883 | lib$signal (stat); | 3883 | lib$signal (stat); |
| 3884 | strcpy (vms_file_written, to_esn); /* We will write this to the screen*/ | 3884 | strcpy (vms_file_written, to_esn); /* We will write this to the terminal*/ |
| 3885 | return 0; | 3885 | return 0; |
| 3886 | } | 3886 | } |
| 3887 | 3887 | ||
diff --git a/src/termchar.h b/src/termchar.h index 7a93d762bb4..7741292695e 100644 --- a/src/termchar.h +++ b/src/termchar.h | |||
| @@ -30,14 +30,14 @@ extern int line_ins_del_ok; /* Terminal can insert and delete lines */ | |||
| 30 | extern int char_ins_del_ok; /* Terminal can insert and delete chars */ | 30 | extern int char_ins_del_ok; /* Terminal can insert and delete chars */ |
| 31 | extern int scroll_region_ok; /* Terminal supports setting the scroll | 31 | extern int scroll_region_ok; /* Terminal supports setting the scroll |
| 32 | window */ | 32 | window */ |
| 33 | extern int memory_below_screen; /* Terminal remembers lines scrolled | 33 | extern int memory_below_frame; /* Terminal remembers lines scrolled |
| 34 | off bottom */ | 34 | off bottom */ |
| 35 | extern int fast_clear_end_of_line; /* Terminal has a `ce' string */ | 35 | extern int fast_clear_end_of_line; /* Terminal has a `ce' string */ |
| 36 | 36 | ||
| 37 | extern int dont_calculate_costs; /* Nonzero means don't bother computing | 37 | extern int dont_calculate_costs; /* Nonzero means don't bother computing |
| 38 | various cost tables; we won't use them. */ | 38 | various cost tables; we won't use them. */ |
| 39 | 39 | ||
| 40 | /* Nonzero means no need to redraw the entire screen on resuming | 40 | /* Nonzero means no need to redraw the entire frame on resuming |
| 41 | a suspended Emacs. This is useful on terminals with multiple pages, | 41 | a suspended Emacs. This is useful on terminals with multiple pages, |
| 42 | where one page is used for Emacs and another for all else. */ | 42 | where one page is used for Emacs and another for all else. */ |
| 43 | extern int no_redraw_on_reenter; | 43 | extern int no_redraw_on_reenter; |
diff --git a/src/termhooks.h b/src/termhooks.h index 5b5cac7315e..83df0203f01 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -23,7 +23,7 @@ extern int (*cursor_to_hook) (); | |||
| 23 | extern int (*raw_cursor_to_hook) (); | 23 | extern int (*raw_cursor_to_hook) (); |
| 24 | 24 | ||
| 25 | extern int (*clear_to_end_hook) (); | 25 | extern int (*clear_to_end_hook) (); |
| 26 | extern int (*clear_screen_hook) (); | 26 | extern int (*clear_frame_hook) (); |
| 27 | extern int (*clear_end_of_line_hook) (); | 27 | extern int (*clear_end_of_line_hook) (); |
| 28 | 28 | ||
| 29 | extern int (*ins_del_lines_hook) (); | 29 | extern int (*ins_del_lines_hook) (); |
| @@ -47,7 +47,7 @@ extern int (*read_socket_hook) (); | |||
| 47 | 47 | ||
| 48 | /* Return the current position of the mouse. This should clear | 48 | /* Return the current position of the mouse. This should clear |
| 49 | mouse_moved until the next motion event arrives. */ | 49 | mouse_moved until the next motion event arrives. */ |
| 50 | extern void (*mouse_position_hook) ( /* SCREEN_PTR *s, | 50 | extern void (*mouse_position_hook) ( /* FRAME_PTR *f, |
| 51 | Lisp_Object *x, | 51 | Lisp_Object *x, |
| 52 | Lisp_Object *y, | 52 | Lisp_Object *y, |
| 53 | unsigned long *time */ ); | 53 | unsigned long *time */ ); |
| @@ -57,10 +57,10 @@ extern void (*mouse_position_hook) ( /* SCREEN_PTR *s, | |||
| 57 | hook should clear this. */ | 57 | hook should clear this. */ |
| 58 | extern int mouse_moved; | 58 | extern int mouse_moved; |
| 59 | 59 | ||
| 60 | /* When a screen's focus redirection is changed, this hook tells the | 60 | /* When a frame's focus redirection is changed, this hook tells the |
| 61 | window system code to re-decide where to put the highlight. Under | 61 | window system code to re-decide where to put the highlight. Under |
| 62 | X, this means that Emacs lies about where the focus is. */ | 62 | X, this means that Emacs lies about where the focus is. */ |
| 63 | extern void (*screen_rehighlight_hook) ( /* void */ ); | 63 | extern void (*frame_rehighlight_hook) ( /* void */ ); |
| 64 | 64 | ||
| 65 | /* If nonzero, send all terminal output characters to this stream also. */ | 65 | /* If nonzero, send all terminal output characters to this stream also. */ |
| 66 | extern FILE *termscript; | 66 | extern FILE *termscript; |
| @@ -82,7 +82,7 @@ struct input_event { | |||
| 82 | no_event, /* nothing happened. This should never | 82 | no_event, /* nothing happened. This should never |
| 83 | actually appear in the event queue. */ | 83 | actually appear in the event queue. */ |
| 84 | ascii_keystroke, /* The ASCII code is in .code. | 84 | ascii_keystroke, /* The ASCII code is in .code. |
| 85 | .screen is the screen in which the key | 85 | .frame is the frame in which the key |
| 86 | was typed. | 86 | was typed. |
| 87 | Note that this includes meta-keys, and | 87 | Note that this includes meta-keys, and |
| 88 | the modifiers field of the event | 88 | the modifiers field of the event |
| @@ -97,7 +97,7 @@ struct input_event { | |||
| 97 | should feel free to add missing keys. | 97 | should feel free to add missing keys. |
| 98 | .modifiers holds the state of the | 98 | .modifiers holds the state of the |
| 99 | modifier keys. | 99 | modifier keys. |
| 100 | .screen is the screen in which the key | 100 | .frame is the frame in which the key |
| 101 | was typed. | 101 | was typed. |
| 102 | .timestamp gives a timestamp (in | 102 | .timestamp gives a timestamp (in |
| 103 | milliseconds) for the keystroke. */ | 103 | milliseconds) for the keystroke. */ |
| @@ -106,7 +106,7 @@ struct input_event { | |||
| 106 | modifier keys. | 106 | modifier keys. |
| 107 | .x and .y give the mouse position, | 107 | .x and .y give the mouse position, |
| 108 | in characters, within the window. | 108 | in characters, within the window. |
| 109 | .screen gives the screen the mouse | 109 | .frame gives the frame the mouse |
| 110 | click occurred in. | 110 | click occurred in. |
| 111 | .timestamp gives a timestamp (in | 111 | .timestamp gives a timestamp (in |
| 112 | milliseconds) for the click. */ | 112 | milliseconds) for the click. */ |
| @@ -121,14 +121,14 @@ struct input_event { | |||
| 121 | .x gives the distance from the start | 121 | .x gives the distance from the start |
| 122 | of the scroll bar of the click; .y gives | 122 | of the scroll bar of the click; .y gives |
| 123 | the total length of the scroll bar. | 123 | the total length of the scroll bar. |
| 124 | .screen gives the screen the click | 124 | .frame gives the frame the click |
| 125 | should apply to. | 125 | should apply to. |
| 126 | .timestamp gives a timestamp (in | 126 | .timestamp gives a timestamp (in |
| 127 | milliseconds) for the click. */ | 127 | milliseconds) for the click. */ |
| 128 | #if 0 | 128 | #if 0 |
| 129 | screen_selected, /* The user has moved the focus to another | 129 | frame_selected, /* The user has moved the focus to another |
| 130 | screen. | 130 | frame. |
| 131 | .screen is the screen that should become | 131 | .frame is the frame that should become |
| 132 | selected at the next convenient time. */ | 132 | selected at the next convenient time. */ |
| 133 | #endif | 133 | #endif |
| 134 | } kind; | 134 | } kind; |
| @@ -137,15 +137,15 @@ struct input_event { | |||
| 137 | Lisp_Object part; | 137 | Lisp_Object part; |
| 138 | 138 | ||
| 139 | /* This is obviously wrong, but I'm not sure what else I should do. | 139 | /* This is obviously wrong, but I'm not sure what else I should do. |
| 140 | Obviously, this should be a SCREEN_PTR. But that would require that | 140 | Obviously, this should be a FRAME_PTR. But that would require that |
| 141 | every file which #includes this one should also #include "screen.h", | 141 | every file which #includes this one should also #include "frame.h", |
| 142 | which would mean that files like cm.c and other innocents would be | 142 | which would mean that files like cm.c and other innocents would be |
| 143 | dragged into the set of screen.h users. Maybe the definition of this | 143 | dragged into the set of frame.h users. Maybe the definition of this |
| 144 | structure should be elsewhere? In its own file? */ | 144 | structure should be elsewhere? In its own file? */ |
| 145 | #ifdef MULTI_SCREEN | 145 | #ifdef MULTI_FRAME |
| 146 | struct screen *screen; | 146 | struct frame *frame; |
| 147 | #else | 147 | #else |
| 148 | int screen; | 148 | int frame; |
| 149 | #endif | 149 | #endif |
| 150 | int modifiers; /* See enum below for interpretation. */ | 150 | int modifiers; /* See enum below for interpretation. */ |
| 151 | 151 | ||