aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-01 17:52:03 -0800
committerPaul Eggert2011-03-01 17:52:03 -0800
commitba46f4d85a6938273f52a8cdf7e09d9afee61d7f (patch)
tree606ec46b703532d463ccddf287f0053430eb1f4a /src
parentd9d0d182da35312ed0d7a9859b9c6a03994d86d8 (diff)
parent0dc3e4109e0c41bbf5fdcae0ff1156162719693e (diff)
downloademacs-ba46f4d85a6938273f52a8cdf7e09d9afee61d7f.tar.gz
emacs-ba46f4d85a6938273f52a8cdf7e09d9afee61d7f.zip
Merge from mainline.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog52
-rw-r--r--src/ChangeLog.104
-rw-r--r--src/ChangeLog.36
-rw-r--r--src/character.c2
-rw-r--r--src/dired.c6
-rw-r--r--src/dispextern.h2
-rw-r--r--src/dispnew.c126
-rw-r--r--src/editfns.c2
-rw-r--r--src/frame.c24
-rw-r--r--src/frame.h8
-rw-r--r--src/keymap.c2
-rw-r--r--src/msdos.c15
-rw-r--r--src/msdos.h5
-rw-r--r--src/s/msdos.h6
-rw-r--r--src/scroll.c5
-rw-r--r--src/w32.c19
-rw-r--r--src/w32proc.c2
-rw-r--r--src/w32term.c2
18 files changed, 186 insertions, 102 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a8de7268673..388e8c251d1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,55 @@
12011-02-27 Chong Yidong <cyd@stupidchicken.com>
2
3 * frame.c (store_frame_param): Don't store value directly in
4 buffer_list and buried_buffer_list; copy the list and remove dead
5 buffers (Bug#7898).
6
72011-02-27 Eli Zaretskii <eliz@gnu.org>
8
9 * msdos.c (readlink) [DJGPP < 2.04]: New stub function.
10
11 * msdos.h: (readlink) [DJGPP < 2.04]: Declare prototype.
12
13 * w32.c (symlink, readlink): New stub functions.
14
152011-02-27 Paul Eggert <eggert@cs.ucla.edu>
16
17 * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
18 This avoids a gcc warning in some configurations.
19
20 * frame.c (x_set_screen_gamma): Rename local to avoid shadowing.
21
22 * frame.h: Avoid gcc -Wmissing-prototypes diagnostics.
23 (set_menu_bar_lines, x_get_resource_string): New decls.
24 * msdos.c (set_menu_bar_lines): Omit decl.
25
26 * dispextern.h (struct glyph): Make u.img_id int, not unsigned.
27 It's always given int values and used as an int. This suppresses
28 a gcc "comparison of unsigned expression >= 0" warning in some
29 configurations.
30
31 * dispnew.c: Rename locals to avoid shadowing.
32 (update_text_area, scrolling_window, update_frame_1): Rename locals.
33
342011-02-26 Paul Eggert <eggert@cs.ucla.edu>
35
36 * dispnew.c: Fix problems uncovered by gcc -Wstrict-prototypes.
37 (copy_glyph_row_contents): Remove; not used.
38 (frame_row_to_window, check_current_matrix_flags):
39 (window_change_signal): Now static, since they're not used elsewhere.
40 (check_current_matrix_flags): Surround with "#if 0", since its
41 only use is in a comment. Maybe both the comment and the "#if 0"
42 stuff should be removed?
43
44 * dispnew.c: Fix problem uncovered by gcc -Wunused-variable.
45 (adjust_frame_glyphs_for_window_redisplay): Make 'w' local to the
46 contexts that actually need it.
47
482011-02-26 Eli Zaretskii <eliz@gnu.org>
49
50 * s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
51 (lstat): Define for DJGPP < 2.04.
52
12011-02-25 Paul Eggert <eggert@cs.ucla.edu> 532011-02-25 Paul Eggert <eggert@cs.ucla.edu>
2 54
3 Simplify symlink portability workaround. 55 Simplify symlink portability workaround.
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 869ab5b07d8..6152b4c76af 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -20002,7 +20002,7 @@
20002 20002
20003 * w32reg.c (w32_get_rdb_resource): New function. 20003 * w32reg.c (w32_get_rdb_resource): New function.
20004 (x_get_string_resource): Use it, so resources passed with -xrm 20004 (x_get_string_resource): Use it, so resources passed with -xrm
20005 supercede the ones in the registry. 20005 supersede the ones in the registry.
20006 20006
200072003-03-04 Jan Djärv <jan.h.d@swipnet.se> 200072003-03-04 Jan Djärv <jan.h.d@swipnet.se>
20008 20008
@@ -25474,7 +25474,7 @@
25474 recursive call unless that arg is non-nil. 25474 recursive call unless that arg is non-nil.
25475 (where_is_internal): New argument no_remap. Callers changed. 25475 (where_is_internal): New argument no_remap. Callers changed.
25476 Call recursively to find original key bindings for a remapped 25476 Call recursively to find original key bindings for a remapped
25477 comand unless that arg is non-nil. 25477 command unless that arg is non-nil.
25478 (Fwhere_is_internal): New optional argument NO-REMAP. 25478 (Fwhere_is_internal): New optional argument NO-REMAP.
25479 Doc updated. Callers changed. Pass arg to where_is_internal. 25479 Doc updated. Callers changed. Pass arg to where_is_internal.
25480 25480
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index a361142faae..beb7a0a2ae1 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -7023,7 +7023,7 @@
7023 * fileio.c: There are two versions of Fexpand_file_name defined 7023 * fileio.c: There are two versions of Fexpand_file_name defined
7024 here; the latter is inside a `#if 0' clause. Change its DEFUN to 7024 here; the latter is inside a `#if 0' clause. Change its DEFUN to
7025 a DEAFUN, so that its docstring doesn't make it into the DOC file 7025 a DEAFUN, so that its docstring doesn't make it into the DOC file
7026 and supercede the real docstring. 7026 and supersede the real docstring.
7027 7027
7028 * callint.c (Fcall_interactively): For the 'K' interactive spec, 7028 * callint.c (Fcall_interactively): For the 'K' interactive spec,
7029 set varies[i] to -1, indicating that the mouse click should be 7029 set varies[i] to -1, indicating that the mouse click should be
@@ -11142,7 +11142,7 @@
11142 wait_reading_process_input, instead of just the first two. 11142 wait_reading_process_input, instead of just the first two.
11143 11143
11144 * process.c (wait_reading_process_input): Remove support for 11144 * process.c (wait_reading_process_input): Remove support for
11145 only waiting for mouse input, since that has been superceded. 11145 only waiting for mouse input, since that has been superseded.
11146 This removes X dependencies from process.c, and eliminates some 11146 This removes X dependencies from process.c, and eliminates some
11147 references to code that should only exist when using X10. 11147 references to code that should only exist when using X10.
11148 11148
@@ -11450,7 +11450,7 @@
11450 11450
11451 * minibuf.c (temp_echo_area_glyphs): Clear echo_area_glyphs and 11451 * minibuf.c (temp_echo_area_glyphs): Clear echo_area_glyphs and
11452 previous_echo_glyphs, so the message we're displaying will 11452 previous_echo_glyphs, so the message we're displaying will
11453 supercede any existing message. 11453 supersede any existing message.
11454 11454
11455 * keyboard.c: Removed external declaration of echo_area_glyphs, 11455 * keyboard.c: Removed external declaration of echo_area_glyphs,
11456 since it's declared in window.h. 11456 since it's declared in window.h.
diff --git a/src/character.c b/src/character.c
index f12c4f28d31..6f3312fec29 100644
--- a/src/character.c
+++ b/src/character.c
@@ -761,7 +761,7 @@ str_as_unibyte (unsigned char *str, EMACS_INT bytes)
761 corresponding byte and store in DST. CHARS is the number of 761 corresponding byte and store in DST. CHARS is the number of
762 characters in SRC. The value is the number of bytes stored in DST. 762 characters in SRC. The value is the number of bytes stored in DST.
763 Usually, the value is the same as CHARS, but is less than it if SRC 763 Usually, the value is the same as CHARS, but is less than it if SRC
764 contains a non-ASCII, non-eight-bit characater. If ACCEPT_LATIN_1 764 contains a non-ASCII, non-eight-bit character. If ACCEPT_LATIN_1
765 is nonzero, a Latin-1 character is accepted and converted to a byte 765 is nonzero, a Latin-1 character is accepted and converted to a byte
766 of that character code. 766 of that character code.
767 Note: Currently the arg ACCEPT_LATIN_1 is not used. */ 767 Note: Currently the arg ACCEPT_LATIN_1 is not used. */
diff --git a/src/dired.c b/src/dired.c
index ce2a3d105e5..96063680d4d 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -937,7 +937,11 @@ so last access time will always be midnight of that day. */)
937 Lisp_Object dirname; 937 Lisp_Object dirname;
938 struct stat sdir; 938 struct stat sdir;
939#endif /* BSD4_2 */ 939#endif /* BSD4_2 */
940 char modes[12]; 940
941 /* An array to hold the mode string generated by filemodestring,
942 including its terminating space and null byte. */
943 char modes[sizeof "-rwxr-xr-x "];
944
941 Lisp_Object handler; 945 Lisp_Object handler;
942 struct gcpro gcpro1; 946 struct gcpro gcpro1;
943 char *uname = NULL, *gname = NULL; 947 char *uname = NULL, *gname = NULL;
diff --git a/src/dispextern.h b/src/dispextern.h
index 6bb0c3a6aae..37ae7ee5fd5 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -431,7 +431,7 @@ struct glyph
431 } cmp; 431 } cmp;
432 432
433 /* Image ID for image glyphs (type == IMAGE_GLYPH). */ 433 /* Image ID for image glyphs (type == IMAGE_GLYPH). */
434 unsigned img_id; 434 int img_id;
435 435
436 /* Sub-structure for type == STRETCH_GLYPH. */ 436 /* Sub-structure for type == STRETCH_GLYPH. */
437 struct 437 struct
diff --git a/src/dispnew.c b/src/dispnew.c
index 4e068bde536..1408bea2fc6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1129,32 +1129,6 @@ copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
1129} 1129}
1130 1130
1131 1131
1132/* Copy contents of glyph row FROM to glyph row TO. Glyph pointers in
1133 TO and FROM are left unchanged. Glyph contents are copied from the
1134 glyph memory of FROM to the glyph memory of TO. Increment buffer
1135 positions in row TO by DELTA/ DELTA_BYTES. */
1136
1137void
1138copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from,
1139 EMACS_INT delta, EMACS_INT delta_bytes)
1140{
1141 int area;
1142
1143 /* This is like a structure assignment TO = FROM, except that
1144 glyph pointers in the rows are left unchanged. */
1145 copy_row_except_pointers (to, from);
1146
1147 /* Copy glyphs from FROM to TO. */
1148 for (area = 0; area < LAST_AREA; ++area)
1149 if (from->used[area])
1150 memcpy (to->glyphs[area], from->glyphs[area],
1151 from->used[area] * sizeof (struct glyph));
1152
1153 /* Increment buffer positions in TO by DELTA. */
1154 increment_row_positions (to, delta, delta_bytes);
1155}
1156
1157
1158/* Assign glyph row FROM to glyph row TO. This works like a structure 1132/* Assign glyph row FROM to glyph row TO. This works like a structure
1159 assignment TO = FROM, except that glyph pointers are not copied but 1133 assignment TO = FROM, except that glyph pointers are not copied but
1160 exchanged between TO and FROM. Pointers must be exchanged to avoid 1134 exchanged between TO and FROM. Pointers must be exchanged to avoid
@@ -2223,8 +2197,6 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
2223static void 2197static void
2224adjust_frame_glyphs_for_window_redisplay (struct frame *f) 2198adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2225{ 2199{
2226 struct window *w;
2227
2228 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); 2200 xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
2229 2201
2230 /* Allocate/reallocate window matrices. */ 2202 /* Allocate/reallocate window matrices. */
@@ -2236,6 +2208,7 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2236#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK) 2208#if ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
2237 { 2209 {
2238 /* Allocate a dummy window if not already done. */ 2210 /* Allocate a dummy window if not already done. */
2211 struct window *w;
2239 if (NILP (f->menu_bar_window)) 2212 if (NILP (f->menu_bar_window))
2240 { 2213 {
2241 f->menu_bar_window = make_window (); 2214 f->menu_bar_window = make_window ();
@@ -2258,23 +2231,26 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f)
2258#endif /* HAVE_X_WINDOWS */ 2231#endif /* HAVE_X_WINDOWS */
2259 2232
2260#ifndef USE_GTK 2233#ifndef USE_GTK
2261 /* Allocate/ reallocate matrices of the tool bar window. If we 2234 {
2262 don't have a tool bar window yet, make one. */ 2235 /* Allocate/ reallocate matrices of the tool bar window. If we
2263 if (NILP (f->tool_bar_window)) 2236 don't have a tool bar window yet, make one. */
2264 { 2237 struct window *w;
2265 f->tool_bar_window = make_window (); 2238 if (NILP (f->tool_bar_window))
2239 {
2240 f->tool_bar_window = make_window ();
2241 w = XWINDOW (f->tool_bar_window);
2242 XSETFRAME (w->frame, f);
2243 w->pseudo_window_p = 1;
2244 }
2245 else
2266 w = XWINDOW (f->tool_bar_window); 2246 w = XWINDOW (f->tool_bar_window);
2267 XSETFRAME (w->frame, f);
2268 w->pseudo_window_p = 1;
2269 }
2270 else
2271 w = XWINDOW (f->tool_bar_window);
2272 2247
2273 XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f)); 2248 XSETFASTINT (w->top_line, FRAME_MENU_BAR_LINES (f));
2274 XSETFASTINT (w->left_col, 0); 2249 XSETFASTINT (w->left_col, 0);
2275 XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f)); 2250 XSETFASTINT (w->total_lines, FRAME_TOOL_BAR_LINES (f));
2276 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f)); 2251 XSETFASTINT (w->total_cols, FRAME_TOTAL_COLS (f));
2277 allocate_matrices_for_window_redisplay (w); 2252 allocate_matrices_for_window_redisplay (w);
2253 }
2278#endif 2254#endif
2279} 2255}
2280 2256
@@ -2924,7 +2900,7 @@ sync_window_with_frame_matrix_rows (struct window *w)
2924/* Return the window in the window tree rooted in W containing frame 2900/* Return the window in the window tree rooted in W containing frame
2925 row ROW. Value is null if none is found. */ 2901 row ROW. Value is null if none is found. */
2926 2902
2927struct window * 2903static struct window *
2928frame_row_to_window (struct window *w, int row) 2904frame_row_to_window (struct window *w, int row)
2929{ 2905{
2930 struct window *found = NULL; 2906 struct window *found = NULL;
@@ -3562,12 +3538,12 @@ redraw_overlapping_rows (struct window *w, int yb)
3562#endif /* HAVE_WINDOW_SYSTEM */ 3538#endif /* HAVE_WINDOW_SYSTEM */
3563 3539
3564 3540
3565#ifdef GLYPH_DEBUG 3541#if defined GLYPH_DEBUG && 0
3566 3542
3567/* Check that no row in the current matrix of window W is enabled 3543/* Check that no row in the current matrix of window W is enabled
3568 which is below what's displayed in the window. */ 3544 which is below what's displayed in the window. */
3569 3545
3570void 3546static void
3571check_current_matrix_flags (struct window *w) 3547check_current_matrix_flags (struct window *w)
3572{ 3548{
3573 int last_seen_p = 0; 3549 int last_seen_p = 0;
@@ -4014,7 +3990,7 @@ update_text_area (struct window *w, int vpos)
4014 { 3990 {
4015 /* Otherwise clear to the end of the old row. Everything 3991 /* Otherwise clear to the end of the old row. Everything
4016 after that position should be clear already. */ 3992 after that position should be clear already. */
4017 int x; 3993 int xlim;
4018 3994
4019 if (i >= desired_row->used[TEXT_AREA]) 3995 if (i >= desired_row->used[TEXT_AREA])
4020 rif->cursor_to (vpos, i, desired_row->y, 3996 rif->cursor_to (vpos, i, desired_row->y,
@@ -4031,11 +4007,11 @@ update_text_area (struct window *w, int vpos)
4031 : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA]))) 4007 : (w->phys_cursor.hpos >= desired_row->used[TEXT_AREA])))
4032 { 4008 {
4033 w->phys_cursor_on_p = 0; 4009 w->phys_cursor_on_p = 0;
4034 x = -1; 4010 xlim = -1;
4035 } 4011 }
4036 else 4012 else
4037 x = current_row->pixel_width; 4013 xlim = current_row->pixel_width;
4038 rif->clear_end_of_line (x); 4014 rif->clear_end_of_line (xlim);
4039 changed_p = 1; 4015 changed_p = 1;
4040 } 4016 }
4041 } 4017 }
@@ -4491,7 +4467,7 @@ scrolling_window (struct window *w, int header_line_p)
4491 && old_lines[i]->old_uses == 1 4467 && old_lines[i]->old_uses == 1
4492 && old_lines[i]->new_uses == 1) 4468 && old_lines[i]->new_uses == 1)
4493 { 4469 {
4494 int j, k; 4470 int p, q;
4495 int new_line = old_lines[i]->new_line_number; 4471 int new_line = old_lines[i]->new_line_number;
4496 struct run *run = run_pool + run_idx++; 4472 struct run *run = run_pool + run_idx++;
4497 4473
@@ -4504,33 +4480,33 @@ scrolling_window (struct window *w, int header_line_p)
4504 run->height = MATRIX_ROW (current_matrix, i)->height; 4480 run->height = MATRIX_ROW (current_matrix, i)->height;
4505 4481
4506 /* Extend backward. */ 4482 /* Extend backward. */
4507 j = i - 1; 4483 p = i - 1;
4508 k = new_line - 1; 4484 q = new_line - 1;
4509 while (j > first_old 4485 while (p > first_old
4510 && k > first_new 4486 && q > first_new
4511 && old_lines[j] == new_lines[k]) 4487 && old_lines[p] == new_lines[q])
4512 { 4488 {
4513 int h = MATRIX_ROW (current_matrix, j)->height; 4489 int h = MATRIX_ROW (current_matrix, p)->height;
4514 --run->current_vpos; 4490 --run->current_vpos;
4515 --run->desired_vpos; 4491 --run->desired_vpos;
4516 ++run->nrows; 4492 ++run->nrows;
4517 run->height += h; 4493 run->height += h;
4518 run->desired_y -= h; 4494 run->desired_y -= h;
4519 run->current_y -= h; 4495 run->current_y -= h;
4520 --j, --k; 4496 --p, --q;
4521 } 4497 }
4522 4498
4523 /* Extend forward. */ 4499 /* Extend forward. */
4524 j = i + 1; 4500 p = i + 1;
4525 k = new_line + 1; 4501 q = new_line + 1;
4526 while (j < last_old 4502 while (p < last_old
4527 && k < last_new 4503 && q < last_new
4528 && old_lines[j] == new_lines[k]) 4504 && old_lines[p] == new_lines[q])
4529 { 4505 {
4530 int h = MATRIX_ROW (current_matrix, j)->height; 4506 int h = MATRIX_ROW (current_matrix, p)->height;
4531 ++run->nrows; 4507 ++run->nrows;
4532 run->height += h; 4508 run->height += h;
4533 ++j, ++k; 4509 ++p, ++q;
4534 } 4510 }
4535 4511
4536 /* Insert run into list of all runs. Order runs by copied 4512 /* Insert run into list of all runs. Order runs by copied
@@ -4538,11 +4514,11 @@ scrolling_window (struct window *w, int header_line_p)
4538 be copied because they are already in place. This is done 4514 be copied because they are already in place. This is done
4539 because we can avoid calling update_window_line in this 4515 because we can avoid calling update_window_line in this
4540 case. */ 4516 case. */
4541 for (j = 0; j < nruns && runs[j]->height > run->height; ++j) 4517 for (p = 0; p < nruns && runs[p]->height > run->height; ++p)
4542 ; 4518 ;
4543 for (k = nruns; k > j; --k) 4519 for (q = nruns; q > p; --q)
4544 runs[k] = runs[k - 1]; 4520 runs[q] = runs[q - 1];
4545 runs[j] = run; 4521 runs[p] = run;
4546 ++nruns; 4522 ++nruns;
4547 4523
4548 i += run->nrows; 4524 i += run->nrows;
@@ -4639,7 +4615,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
4639 struct glyph_matrix *current_matrix = f->current_matrix; 4615 struct glyph_matrix *current_matrix = f->current_matrix;
4640 struct glyph_matrix *desired_matrix = f->desired_matrix; 4616 struct glyph_matrix *desired_matrix = f->desired_matrix;
4641 int i; 4617 int i;
4642 int pause; 4618 int pause_p;
4643 int preempt_count = baud_rate / 2400 + 1; 4619 int preempt_count = baud_rate / 2400 + 1;
4644 4620
4645 xassert (current_matrix && desired_matrix); 4621 xassert (current_matrix && desired_matrix);
@@ -4653,7 +4629,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
4653#if !PERIODIC_PREEMPTION_CHECKING 4629#if !PERIODIC_PREEMPTION_CHECKING
4654 if (!force_p && detect_input_pending_ignore_squeezables ()) 4630 if (!force_p && detect_input_pending_ignore_squeezables ())
4655 { 4631 {
4656 pause = 1; 4632 pause_p = 1;
4657 goto do_pause; 4633 goto do_pause;
4658 } 4634 }
4659#endif 4635#endif
@@ -4733,10 +4709,10 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
4733 } 4709 }
4734 } 4710 }
4735 4711
4736 pause = (i < FRAME_LINES (f) - 1) ? i : 0; 4712 pause_p = (i < FRAME_LINES (f) - 1) ? i : 0;
4737 4713
4738 /* Now just clean up termcap drivers and set cursor, etc. */ 4714 /* Now just clean up termcap drivers and set cursor, etc. */
4739 if (!pause) 4715 if (!pause_p)
4740 { 4716 {
4741 if ((cursor_in_echo_area 4717 if ((cursor_in_echo_area
4742 /* If we are showing a message instead of the mini-buffer, 4718 /* If we are showing a message instead of the mini-buffer,
@@ -4837,7 +4813,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
4837#endif 4813#endif
4838 4814
4839 clear_desired_matrices (f); 4815 clear_desired_matrices (f);
4840 return pause; 4816 return pause_p;
4841} 4817}
4842 4818
4843 4819
@@ -5594,7 +5570,7 @@ marginal_area_string (struct window *w, enum window_part part,
5594 5570
5595#ifdef SIGWINCH 5571#ifdef SIGWINCH
5596 5572
5597SIGTYPE 5573static SIGTYPE
5598window_change_signal (int signalnum) /* If we don't have an argument, */ 5574window_change_signal (int signalnum) /* If we don't have an argument, */
5599 /* some compilers complain in signal calls. */ 5575 /* some compilers complain in signal calls. */
5600{ 5576{
diff --git a/src/editfns.c b/src/editfns.c
index 5d6189f2a3c..28690e7c76d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3523,7 +3523,7 @@ usage: (format STRING &rest OBJECTS) */)
3523 int maybe_combine_byte; 3523 int maybe_combine_byte;
3524 char *this_format; 3524 char *this_format;
3525 /* Precision for each spec, or -1, a flag value meaning no precision 3525 /* Precision for each spec, or -1, a flag value meaning no precision
3526 was given in that spec. Element 0, corresonding to the format 3526 was given in that spec. Element 0, corresponding to the format
3527 string itself, will not be used. Element NARGS, corresponding to 3527 string itself, will not be used. Element NARGS, corresponding to
3528 no argument, *will* be assigned to in the case that a `%' and `.' 3528 no argument, *will* be assigned to in the case that a `%' and `.'
3529 occur after the final format specifier. */ 3529 occur after the final format specifier. */
diff --git a/src/frame.c b/src/frame.c
index 56e0e7ec919..05938f3e1f0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2208,15 +2208,23 @@ store_frame_param (struct frame *f, Lisp_Object prop, Lisp_Object val)
2208 register Lisp_Object old_alist_elt; 2208 register Lisp_Object old_alist_elt;
2209 2209
2210 /* The buffer-list parameters are stored in a special place and not 2210 /* The buffer-list parameters are stored in a special place and not
2211 in the alist. */ 2211 in the alist. All buffers must be live. */
2212 if (EQ (prop, Qbuffer_list)) 2212 if (EQ (prop, Qbuffer_list))
2213 { 2213 {
2214 f->buffer_list = val; 2214 Lisp_Object list = Qnil;
2215 for (; CONSP (val); val = XCDR (val))
2216 if (!NILP (Fbuffer_live_p (XCAR (val))))
2217 list = Fcons (XCAR (val), list);
2218 f->buffer_list = Fnreverse (list);
2215 return; 2219 return;
2216 } 2220 }
2217 if (EQ (prop, Qburied_buffer_list)) 2221 if (EQ (prop, Qburied_buffer_list))
2218 { 2222 {
2219 f->buried_buffer_list = val; 2223 Lisp_Object list = Qnil;
2224 for (; CONSP (val); val = XCDR (val))
2225 if (!NILP (Fbuffer_live_p (XCAR (val))))
2226 list = Fcons (XCAR (val), list);
2227 f->buried_buffer_list = Fnreverse (list);
2220 return; 2228 return;
2221 } 2229 }
2222 2230
@@ -3275,12 +3283,12 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
3275 bgcolor = Fassq (Qbackground_color, f->param_alist); 3283 bgcolor = Fassq (Qbackground_color, f->param_alist);
3276 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor))) 3284 if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
3277 { 3285 {
3278 Lisp_Object index = Fget (Qbackground_color, Qx_frame_parameter); 3286 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
3279 if (NATNUMP (index) 3287 if (NATNUMP (parm_index)
3280 && (XFASTINT (index) 3288 && (XFASTINT (parm_index)
3281 < sizeof (frame_parms)/sizeof (frame_parms[0])) 3289 < sizeof (frame_parms)/sizeof (frame_parms[0]))
3282 && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) 3290 && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
3283 (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (index)]) 3291 (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
3284 (f, bgcolor, Qnil); 3292 (f, bgcolor, Qnil);
3285 } 3293 }
3286 3294
diff --git a/src/frame.h b/src/frame.h
index 9687e39a9fc..756e121f678 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -841,6 +841,7 @@ extern Lisp_Object Qnoelisp;
841 841
842extern struct frame *last_nonminibuf_frame; 842extern struct frame *last_nonminibuf_frame;
843 843
844extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
844extern struct frame *make_initial_frame (void); 845extern struct frame *make_initial_frame (void);
845extern struct frame *make_terminal_frame (struct terminal *); 846extern struct frame *make_terminal_frame (struct terminal *);
846extern struct frame *make_frame (int); 847extern struct frame *make_frame (int);
@@ -1131,17 +1132,20 @@ extern int x_figure_window_size (struct frame *, Lisp_Object, int);
1131extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object); 1132extern void x_set_alpha (struct frame *, Lisp_Object, Lisp_Object);
1132 1133
1133extern void validate_x_resource_name (void); 1134extern void validate_x_resource_name (void);
1134 1135
1135extern Lisp_Object display_x_get_resource (Display_Info *, 1136extern Lisp_Object display_x_get_resource (Display_Info *,
1136 Lisp_Object attribute, 1137 Lisp_Object attribute,
1137 Lisp_Object class, 1138 Lisp_Object class,
1138 Lisp_Object component, 1139 Lisp_Object component,
1139 Lisp_Object subclass); 1140 Lisp_Object subclass);
1140 1141
1142#if defined HAVE_X_WINDOWS && !defined USE_X_TOOLKIT
1143extern char *x_get_resource_string (const char *, const char *);
1144#endif
1145
1141/* In xmenu.c */ 1146/* In xmenu.c */
1142extern void set_frame_menubar (FRAME_PTR, int, int); 1147extern void set_frame_menubar (FRAME_PTR, int, int);
1143 1148
1144#endif /* HAVE_WINDOW_SYSTEM */ 1149#endif /* HAVE_WINDOW_SYSTEM */
1145 1150
1146#endif /* not EMACS_FRAME_H */ 1151#endif /* not EMACS_FRAME_H */
1147
diff --git a/src/keymap.c b/src/keymap.c
index 0e4715e4b8b..1fbb40f1270 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2756,7 +2756,7 @@ remapped command in the returned list. */)
2756 && !NILP (firstonly) 2756 && !NILP (firstonly)
2757 && !NILP (tem = Fget (definition, QCadvertised_binding))) 2757 && !NILP (tem = Fget (definition, QCadvertised_binding)))
2758 { 2758 {
2759 /* We have a list of advertized bindings. */ 2759 /* We have a list of advertised bindings. */
2760 while (CONSP (tem)) 2760 while (CONSP (tem))
2761 if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition)) 2761 if (EQ (shadow_lookup (keymaps, XCAR (tem), Qnil, 0), definition))
2762 return XCAR (tem); 2762 return XCAR (tem);
diff --git a/src/msdos.c b/src/msdos.c
index 8f0f6776aaa..261a09ac859 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -1389,8 +1389,6 @@ IT_delete_glyphs (struct frame *f, int n)
1389void 1389void
1390x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) 1390x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1391{ 1391{
1392 extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
1393
1394 set_menu_bar_lines (f, value, oldval); 1392 set_menu_bar_lines (f, value, oldval);
1395} 1393}
1396 1394
@@ -3922,6 +3920,18 @@ croak (char *badfunc)
3922 */ 3920 */
3923int setpgrp (void) {return 0; } 3921int setpgrp (void) {return 0; }
3924int setpriority (int x, int y, int z) { return 0; } 3922int setpriority (int x, int y, int z) { return 0; }
3923
3924#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
3925ssize_t
3926readlink (const char *name, char *dummy1, size_t dummy2)
3927{
3928 /* `access' is much faster than `stat' on MS-DOS. */
3929 if (access (name, F_OK) == 0)
3930 errno = EINVAL;
3931 return -1;
3932}
3933#endif
3934
3925 3935
3926#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 3936#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
3927 3937
@@ -4236,4 +4246,3 @@ This variable is used only by MS-DOS terminals. */);
4236} 4246}
4237 4247
4238#endif /* MSDOS */ 4248#endif /* MSDOS */
4239
diff --git a/src/msdos.h b/src/msdos.h
index 6b076c1722b..4bbe9b134de 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -40,6 +40,11 @@ void mouse_init (void);
40void mouse_on (void); 40void mouse_on (void);
41void mouse_off (void); 41void mouse_off (void);
42void mouse_moveto (int, int); 42void mouse_moveto (int, int);
43
44#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
45int readlink (const char *, char *, size_t);
46#endif
47
43 48
44#ifndef HAVE_X_WINDOWS 49#ifndef HAVE_X_WINDOWS
45/* Dummy types. */ 50/* Dummy types. */
diff --git a/src/s/msdos.h b/src/s/msdos.h
index 8debd28dccb..29ca0629899 100644
--- a/src/s/msdos.h
+++ b/src/s/msdos.h
@@ -80,6 +80,12 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
80 strtold, so use _strtold in all versions. */ 80 strtold, so use _strtold in all versions. */
81#define strtold _strtold 81#define strtold _strtold
82 82
83#if __DJGPP__ > 2 || __DJGPP_MINOR__ > 3
84# define HAVE_LSTAT 1
85#else
86# define lstat stat
87#endif
88
83/* End of gnulib-related stuff. */ 89/* End of gnulib-related stuff. */
84 90
85/* When $TERM is "internal" then this is substituted: */ 91/* When $TERM is "internal" then this is substituted: */
diff --git a/src/scroll.c b/src/scroll.c
index 08ae83eeee8..1343b89c41e 100644
--- a/src/scroll.c
+++ b/src/scroll.c
@@ -262,7 +262,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
262 for (k = 0; k < window_size; ++k) 262 for (k = 0; k < window_size; ++k)
263 copy_from[k] = -1; 263 copy_from[k] = -1;
264 264
265#define CHECK_BOUNDS \ 265#if GLYPH_DEBUG
266# define CHECK_BOUNDS \
266 do \ 267 do \
267 { \ 268 { \
268 int k; \ 269 int k; \
@@ -271,6 +272,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, struct m
271 || (copy_from[k] >= 0 && copy_from[k] < window_size)); \ 272 || (copy_from[k] >= 0 && copy_from[k] < window_size)); \
272 } \ 273 } \
273 while (0); 274 while (0);
275#endif
274 276
275 /* When j is advanced, this corresponds to deleted lines. 277 /* When j is advanced, this corresponds to deleted lines.
276 When i is advanced, this corresponds to inserted lines. */ 278 When i is advanced, this corresponds to inserted lines. */
@@ -1035,4 +1037,3 @@ do_line_insertion_deletion_costs (FRAME_PTR frame,
1035 FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame), 1037 FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame),
1036 coefficient); 1038 coefficient);
1037} 1039}
1038
diff --git a/src/w32.c b/src/w32.c
index d4f68544c1d..ae2373be46e 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -3614,6 +3614,25 @@ utime (const char *name, struct utimbuf *times)
3614} 3614}
3615 3615
3616 3616
3617/* Symlink-related functions that always fail. Used in fileio.c to
3618 avoid #ifdef's. */
3619int
3620symlink (char const *dummy1, char const *dummy2)
3621{
3622 errno = ENOSYS;
3623 return -1;
3624}
3625
3626ssize_t
3627readlink (const char *name, char *dummy1, size_t dummy2)
3628{
3629 /* `access' is much faster than `stat' on MS-Windows. */
3630 if (sys_access (name, 0) == 0)
3631 errno = EINVAL;
3632 return -1;
3633}
3634
3635
3617/* Support for browsing other processes and their attributes. See 3636/* Support for browsing other processes and their attributes. See
3618 process.c for the Lisp bindings. */ 3637 process.c for the Lisp bindings. */
3619 3638
diff --git a/src/w32proc.c b/src/w32proc.c
index 1c009c7f943..bb8b428ffe4 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -831,7 +831,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
831 831
832 Note that using backslash to escape embedded quotes requires 832 Note that using backslash to escape embedded quotes requires
833 additional special handling if an embedded quote is already 833 additional special handling if an embedded quote is already
834 preceeded by backslash, or if an arg requiring quoting ends with 834 preceded by backslash, or if an arg requiring quoting ends with
835 backslash. In such cases, the run of escape characters needs to be 835 backslash. In such cases, the run of escape characters needs to be
836 doubled. For consistency, we apply this special handling as long 836 doubled. For consistency, we apply this special handling as long
837 as the escape character is not quote. 837 as the escape character is not quote.
diff --git a/src/w32term.c b/src/w32term.c
index 692130b5140..67e853f21f0 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5941,7 +5941,7 @@ w32_initialize_display_info (Lisp_Object display_name)
5941 5941
5942} 5942}
5943 5943
5944/* Create an xrdb-style database of resources to supercede registry settings. 5944/* Create an xrdb-style database of resources to supersede registry settings.
5945 The database is just a concatenation of C strings, finished by an additional 5945 The database is just a concatenation of C strings, finished by an additional
5946 \0. The strings are submitted to some basic normalization, so 5946 \0. The strings are submitted to some basic normalization, so
5947 5947