aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-08-22 16:02:16 -0400
committerChong Yidong2010-08-22 16:02:16 -0400
commitb0126eac41487b9bca5af5cbb2212ff5b2c58b80 (patch)
tree680ba932d259776ebfdb6d424fa8f668e1001f7c /src
parentb613941ba003bbf5024415ac4f8c2a0e12434751 (diff)
parentbc7d7ea63ba9d98b3ecc3b6decf4392a651dcbfb (diff)
downloademacs-b0126eac41487b9bca5af5cbb2212ff5b2c58b80.tar.gz
emacs-b0126eac41487b9bca5af5cbb2212ff5b2c58b80.zip
Merge changes from emacs-23 branch.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog25
-rw-r--r--src/doc.c28
-rw-r--r--src/eval.c27
-rw-r--r--src/s/hpux10-20.h7
4 files changed, 63 insertions, 24 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 58941cc39ba..485099c7bf1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,28 @@
12010-08-22 Andreas Schwab <schwab@linux-m68k.org>
2
3 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
4 instead of SAFE_ALLOCA.
5
62010-08-22 Chong Yidong <cyd@stupidchicken.com>
7
8 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA
9 (Bug#6214).
10
112010-08-22 Jan Djärv <jan.h.d@swipnet.se>
12
13 * doc.c (Fsnarf_documentation): Set skip_file only if p[1] is S.
14
152010-08-22 Jan Djärv <jan.h.d@swipnet.se>
16
17 * doc.c (Fsnarf_documentation): Initialize skip_file before
18 build-files test.
19
202010-08-22 Peter O'Gorman <pogma@thewrittenword.com> (tiny change)
21
22 * s/hpux10-20.h (HAVE_TERMIOS, NO_TERMIO, ORDINARY_LINK): New
23 definitions.
24 (HAVE_TERMIO): Remove.
25
12010-08-22 Eli Zaretskii <eliz@gnu.org> 262010-08-22 Eli Zaretskii <eliz@gnu.org>
2 27
3 * deps.mk (sysdep.o, msdos.o): Depend on sysselect.h. 28 * deps.mk (sysdep.o, msdos.o): Depend on sysselect.h.
diff --git a/src/doc.c b/src/doc.c
index 9a7001eb01d..a8601d930d0 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -622,24 +622,28 @@ the same file name is found in the `doc-directory'. */)
622 p = buf; 622 p = buf;
623 end = buf + (filled < 512 ? filled : filled - 128); 623 end = buf + (filled < 512 ? filled : filled - 128);
624 while (p != end && *p != '\037') p++; 624 while (p != end && *p != '\037') p++;
625 /* p points to ^_Ffunctionname\n or ^_Vvarname\n. */ 625 /* p points to ^_Ffunctionname\n or ^_Vvarname\n or ^_Sfilename\n. */
626 if (p != end) 626 if (p != end)
627 { 627 {
628 end = strchr (p, '\n'); 628 end = strchr (p, '\n');
629 629
630 /* See if this is a file name, and if it is a file in build-files. */ 630 /* See if this is a file name, and if it is a file in build-files. */
631 if (p[1] == 'S' && end - p > 4 && end[-2] == '.' 631 if (p[1] == 'S')
632 && (end[-1] == 'o' || end[-1] == 'c'))
633 { 632 {
634 int len = end - p - 2; 633 skip_file = 0;
635 char *fromfile = alloca (len + 1); 634 if (end - p > 4 && end[-2] == '.'
636 strncpy (fromfile, &p[2], len); 635 && (end[-1] == 'o' || end[-1] == 'c'))
637 fromfile[len] = 0; 636 {
638 if (fromfile[len-1] == 'c') 637 int len = end - p - 2;
639 fromfile[len-1] = 'o'; 638 char *fromfile = alloca (len + 1);
640 639 strncpy (fromfile, &p[2], len);
641 skip_file = NILP (Fmember (build_string (fromfile), 640 fromfile[len] = 0;
642 Vbuild_files)); 641 if (fromfile[len-1] == 'c')
642 fromfile[len-1] = 'o';
643
644 skip_file = NILP (Fmember (build_string (fromfile),
645 Vbuild_files));
646 }
643 } 647 }
644 648
645 sym = oblookup (Vobarray, p + 2, 649 sym = oblookup (Vobarray, p + 2,
diff --git a/src/eval.c b/src/eval.c
index 5c6b268187b..89d353cf7cb 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1011,12 +1011,13 @@ usage: (let VARLIST BODY...) */)
1011 int count = SPECPDL_INDEX (); 1011 int count = SPECPDL_INDEX ();
1012 register int argnum; 1012 register int argnum;
1013 struct gcpro gcpro1, gcpro2; 1013 struct gcpro gcpro1, gcpro2;
1014 USE_SAFE_ALLOCA;
1014 1015
1015 varlist = Fcar (args); 1016 varlist = Fcar (args);
1016 1017
1017 /* Make space to hold the values to give the bound variables */ 1018 /* Make space to hold the values to give the bound variables */
1018 elt = Flength (varlist); 1019 elt = Flength (varlist);
1019 temps = (Lisp_Object *) alloca (XFASTINT (elt) * sizeof (Lisp_Object)); 1020 SAFE_ALLOCA_LISP (temps, XFASTINT (elt));
1020 1021
1021 /* Compute the values and store them in `temps' */ 1022 /* Compute the values and store them in `temps' */
1022 1023
@@ -1049,6 +1050,7 @@ usage: (let VARLIST BODY...) */)
1049 } 1050 }
1050 1051
1051 elt = Fprogn (Fcdr (args)); 1052 elt = Fprogn (Fcdr (args));
1053 SAFE_FREE ();
1052 return unbind_to (count, elt); 1054 return unbind_to (count, elt);
1053} 1055}
1054 1056
@@ -2301,8 +2303,9 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2301 /* Pass a vector of evaluated arguments */ 2303 /* Pass a vector of evaluated arguments */
2302 Lisp_Object *vals; 2304 Lisp_Object *vals;
2303 register int argnum = 0; 2305 register int argnum = 0;
2306 USE_SAFE_ALLOCA;
2304 2307
2305 vals = (Lisp_Object *) alloca (XINT (numargs) * sizeof (Lisp_Object)); 2308 SAFE_ALLOCA_LISP (vals, XINT (numargs));
2306 2309
2307 GCPRO3 (args_left, fun, fun); 2310 GCPRO3 (args_left, fun, fun);
2308 gcpro3.var = vals; 2311 gcpro3.var = vals;
@@ -2320,6 +2323,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
2320 2323
2321 val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); 2324 val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals);
2322 UNGCPRO; 2325 UNGCPRO;
2326 SAFE_FREE ();
2323 goto done; 2327 goto done;
2324 } 2328 }
2325 2329
@@ -2430,8 +2434,9 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2430 register int i, numargs; 2434 register int i, numargs;
2431 register Lisp_Object spread_arg; 2435 register Lisp_Object spread_arg;
2432 register Lisp_Object *funcall_args; 2436 register Lisp_Object *funcall_args;
2433 Lisp_Object fun; 2437 Lisp_Object fun, retval;
2434 struct gcpro gcpro1; 2438 struct gcpro gcpro1;
2439 USE_SAFE_ALLOCA;
2435 2440
2436 fun = args [0]; 2441 fun = args [0];
2437 funcall_args = 0; 2442 funcall_args = 0;
@@ -2470,8 +2475,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2470 { 2475 {
2471 /* Avoid making funcall cons up a yet another new vector of arguments 2476 /* Avoid making funcall cons up a yet another new vector of arguments
2472 by explicitly supplying nil's for optional values */ 2477 by explicitly supplying nil's for optional values */
2473 funcall_args = (Lisp_Object *) alloca ((1 + XSUBR (fun)->max_args) 2478 SAFE_ALLOCA_LISP (funcall_args, 1 + XSUBR (fun)->max_args);
2474 * sizeof (Lisp_Object));
2475 for (i = numargs; i < XSUBR (fun)->max_args;) 2479 for (i = numargs; i < XSUBR (fun)->max_args;)
2476 funcall_args[++i] = Qnil; 2480 funcall_args[++i] = Qnil;
2477 GCPRO1 (*funcall_args); 2481 GCPRO1 (*funcall_args);
@@ -2483,8 +2487,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2483 function itself as well as its arguments. */ 2487 function itself as well as its arguments. */
2484 if (!funcall_args) 2488 if (!funcall_args)
2485 { 2489 {
2486 funcall_args = (Lisp_Object *) alloca ((1 + numargs) 2490 SAFE_ALLOCA_LISP (funcall_args, 1 + numargs);
2487 * sizeof (Lisp_Object));
2488 GCPRO1 (*funcall_args); 2491 GCPRO1 (*funcall_args);
2489 gcpro1.nvars = 1 + numargs; 2492 gcpro1.nvars = 1 + numargs;
2490 } 2493 }
@@ -2500,7 +2503,11 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2500 } 2503 }
2501 2504
2502 /* By convention, the caller needs to gcpro Ffuncall's args. */ 2505 /* By convention, the caller needs to gcpro Ffuncall's args. */
2503 RETURN_UNGCPRO (Ffuncall (gcpro1.nvars, funcall_args)); 2506 retval = Ffuncall (gcpro1.nvars, funcall_args);
2507 UNGCPRO;
2508 SAFE_FREE ();
2509
2510 return retval;
2504} 2511}
2505 2512
2506/* Run hook variables in various ways. */ 2513/* Run hook variables in various ways. */
@@ -3065,9 +3072,10 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag)
3065 struct gcpro gcpro1, gcpro2, gcpro3; 3072 struct gcpro gcpro1, gcpro2, gcpro3;
3066 register int i; 3073 register int i;
3067 register Lisp_Object tem; 3074 register Lisp_Object tem;
3075 USE_SAFE_ALLOCA;
3068 3076
3069 numargs = Flength (args); 3077 numargs = Flength (args);
3070 arg_vector = (Lisp_Object *) alloca (XINT (numargs) * sizeof (Lisp_Object)); 3078 SAFE_ALLOCA_LISP (arg_vector, XINT (numargs));
3071 args_left = args; 3079 args_left = args;
3072 3080
3073 GCPRO3 (*arg_vector, args_left, fun); 3081 GCPRO3 (*arg_vector, args_left, fun);
@@ -3096,6 +3104,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, int eval_flag)
3096 tem = call_debugger (Fcons (Qexit, Fcons (tem, Qnil))); 3104 tem = call_debugger (Fcons (Qexit, Fcons (tem, Qnil)));
3097 /* Don't do it again when we return to eval. */ 3105 /* Don't do it again when we return to eval. */
3098 backtrace_list->debug_on_exit = 0; 3106 backtrace_list->debug_on_exit = 0;
3107 SAFE_FREE ();
3099 return tem; 3108 return tem;
3100} 3109}
3101 3110
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h
index ee0fa9abe02..d34ff16104b 100644
--- a/src/s/hpux10-20.h
+++ b/src/s/hpux10-20.h
@@ -35,9 +35,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
35 if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */ 35 if system supports pty's. 'p' means it is /dev/ptym/ptyp0 */
36#define FIRST_PTY_LETTER 'p' 36#define FIRST_PTY_LETTER 'p'
37 37
38/* Define HAVE_TERMIO if the system provides sysV-style ioctls 38#define HAVE_TERMIOS
39 for terminal control. */ 39#define NO_TERMIO
40#define HAVE_TERMIO 40
41#define ORDINARY_LINK
41 42
42/* Define HAVE_PTYS if the system supports pty devices. */ 43/* Define HAVE_PTYS if the system supports pty devices. */
43#define HAVE_PTYS 44#define HAVE_PTYS