comparison src/eval.c @ 867:804517e16990

[xemacs-hg @ 2002-06-05 09:54:39 by ben] Textual renaming: text/char names abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization. [a] distinguish between "charptr" when it refers to operations on the pointer itself and when it refers to operations on text; and [b] use consistent naming for everything referring to internal format, i.e. Itext == text in internal format Ibyte == a byte in such text Ichar == a char as represented in internal character format thus e.g. set_charptr_emchar -> set_itext_ichar The pre and post tags on either side of this change are: pre-internal-format-textual-renaming post-internal-format-textual-renaming See the Internals Manual for details of exactly how this was done, how to handle the change in your workspace, etc.
author ben
date Wed, 05 Jun 2002 09:58:45 +0000
parents 2b6fa2618f76
children 79c6ff3eef26
comparison
equal deleted inserted replaced
866:613552a02607 867:804517e16990
419 419
420 static void 420 static void
421 print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) 421 print_subr (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
422 { 422 {
423 Lisp_Subr *subr = XSUBR (obj); 423 Lisp_Subr *subr = XSUBR (obj);
424 const CIntbyte *header = 424 const CIbyte *header =
425 (subr->max_args == UNEVALLED) ? "#<special-form " : "#<subr "; 425 (subr->max_args == UNEVALLED) ? "#<special-form " : "#<subr ";
426 const CIntbyte *name = subr_name (subr); 426 const CIbyte *name = subr_name (subr);
427 const CIntbyte *trailer = subr->prompt ? " (interactive)>" : ">"; 427 const CIbyte *trailer = subr->prompt ? " (interactive)>" : ">";
428 428
429 if (print_readably) 429 if (print_readably)
430 printing_unreadable_object ("%s%s%s", header, name, trailer); 430 printing_unreadable_object ("%s%s%s", header, name, trailer);
431 431
432 write_c_string (printcharfun, header); 432 write_c_string (printcharfun, header);
2452 2452
2453 /* Out of REASON and FROB, return a list of elements suitable for passing 2453 /* Out of REASON and FROB, return a list of elements suitable for passing
2454 to signal_error_1(). */ 2454 to signal_error_1(). */
2455 2455
2456 Lisp_Object 2456 Lisp_Object
2457 build_error_data (const CIntbyte *reason, Lisp_Object frob) 2457 build_error_data (const CIbyte *reason, Lisp_Object frob)
2458 { 2458 {
2459 if (EQ (frob, Qunbound)) 2459 if (EQ (frob, Qunbound))
2460 frob = Qnil; 2460 frob = Qnil;
2461 else if (CONSP (frob) && EQ (XCAR (frob), Qunbound)) 2461 else if (CONSP (frob) && EQ (XCAR (frob), Qunbound))
2462 frob = XCDR (frob); 2462 frob = XCDR (frob);
2467 else 2467 else
2468 return Fcons (build_msg_string (reason), frob); 2468 return Fcons (build_msg_string (reason), frob);
2469 } 2469 }
2470 2470
2471 DOESNT_RETURN 2471 DOESNT_RETURN
2472 signal_error (Lisp_Object type, const CIntbyte *reason, Lisp_Object frob) 2472 signal_error (Lisp_Object type, const CIbyte *reason, Lisp_Object frob)
2473 { 2473 {
2474 signal_error_1 (type, build_error_data (reason, frob)); 2474 signal_error_1 (type, build_error_data (reason, frob));
2475 } 2475 }
2476 2476
2477 void 2477 void
2478 maybe_signal_error (Lisp_Object type, const CIntbyte *reason, 2478 maybe_signal_error (Lisp_Object type, const CIbyte *reason,
2479 Lisp_Object frob, Lisp_Object class, 2479 Lisp_Object frob, Lisp_Object class,
2480 Error_Behavior errb) 2480 Error_Behavior errb)
2481 { 2481 {
2482 /* Optimization: */ 2482 /* Optimization: */
2483 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2483 if (ERRB_EQ (errb, ERROR_ME_NOT))
2484 return; 2484 return;
2485 maybe_signal_error_1 (type, build_error_data (reason, frob), class, errb); 2485 maybe_signal_error_1 (type, build_error_data (reason, frob), class, errb);
2486 } 2486 }
2487 2487
2488 Lisp_Object 2488 Lisp_Object
2489 signal_continuable_error (Lisp_Object type, const CIntbyte *reason, 2489 signal_continuable_error (Lisp_Object type, const CIbyte *reason,
2490 Lisp_Object frob) 2490 Lisp_Object frob)
2491 { 2491 {
2492 return Fsignal (type, build_error_data (reason, frob)); 2492 return Fsignal (type, build_error_data (reason, frob));
2493 } 2493 }
2494 2494
2495 Lisp_Object 2495 Lisp_Object
2496 maybe_signal_continuable_error (Lisp_Object type, const CIntbyte *reason, 2496 maybe_signal_continuable_error (Lisp_Object type, const CIbyte *reason,
2497 Lisp_Object frob, Lisp_Object class, 2497 Lisp_Object frob, Lisp_Object class,
2498 Error_Behavior errb) 2498 Error_Behavior errb)
2499 { 2499 {
2500 /* Optimization: */ 2500 /* Optimization: */
2501 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2501 if (ERRB_EQ (errb, ERROR_ME_NOT))
2513 is three objects, a string and two related Lisp objects. 2513 is three objects, a string and two related Lisp objects.
2514 (The equivalent could be accomplished using the class 2 functions, 2514 (The equivalent could be accomplished using the class 2 functions,
2515 but these are more convenient in this particular case.) */ 2515 but these are more convenient in this particular case.) */
2516 2516
2517 DOESNT_RETURN 2517 DOESNT_RETURN
2518 signal_error_2 (Lisp_Object type, const CIntbyte *reason, 2518 signal_error_2 (Lisp_Object type, const CIbyte *reason,
2519 Lisp_Object frob0, Lisp_Object frob1) 2519 Lisp_Object frob0, Lisp_Object frob1)
2520 { 2520 {
2521 signal_error_1 (type, list3 (build_msg_string (reason), frob0, 2521 signal_error_1 (type, list3 (build_msg_string (reason), frob0,
2522 frob1)); 2522 frob1));
2523 } 2523 }
2524 2524
2525 void 2525 void
2526 maybe_signal_error_2 (Lisp_Object type, const CIntbyte *reason, 2526 maybe_signal_error_2 (Lisp_Object type, const CIbyte *reason,
2527 Lisp_Object frob0, Lisp_Object frob1, 2527 Lisp_Object frob0, Lisp_Object frob1,
2528 Lisp_Object class, Error_Behavior errb) 2528 Lisp_Object class, Error_Behavior errb)
2529 { 2529 {
2530 /* Optimization: */ 2530 /* Optimization: */
2531 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2531 if (ERRB_EQ (errb, ERROR_ME_NOT))
2533 maybe_signal_error_1 (type, list3 (build_msg_string (reason), frob0, 2533 maybe_signal_error_1 (type, list3 (build_msg_string (reason), frob0,
2534 frob1), class, errb); 2534 frob1), class, errb);
2535 } 2535 }
2536 2536
2537 Lisp_Object 2537 Lisp_Object
2538 signal_continuable_error_2 (Lisp_Object type, const CIntbyte *reason, 2538 signal_continuable_error_2 (Lisp_Object type, const CIbyte *reason,
2539 Lisp_Object frob0, Lisp_Object frob1) 2539 Lisp_Object frob0, Lisp_Object frob1)
2540 { 2540 {
2541 return Fsignal (type, list3 (build_msg_string (reason), frob0, 2541 return Fsignal (type, list3 (build_msg_string (reason), frob0,
2542 frob1)); 2542 frob1));
2543 } 2543 }
2544 2544
2545 Lisp_Object 2545 Lisp_Object
2546 maybe_signal_continuable_error_2 (Lisp_Object type, const CIntbyte *reason, 2546 maybe_signal_continuable_error_2 (Lisp_Object type, const CIbyte *reason,
2547 Lisp_Object frob0, Lisp_Object frob1, 2547 Lisp_Object frob0, Lisp_Object frob1,
2548 Lisp_Object class, Error_Behavior errb) 2548 Lisp_Object class, Error_Behavior errb)
2549 { 2549 {
2550 /* Optimization: */ 2550 /* Optimization: */
2551 if (ERRB_EQ (errb, ERROR_ME_NOT)) 2551 if (ERRB_EQ (errb, ERROR_ME_NOT))
2561 /* Class 4: Printf-like functions that signal an error. 2561 /* Class 4: Printf-like functions that signal an error.
2562 These functions signal an error of a specified type, whose data 2562 These functions signal an error of a specified type, whose data
2563 is a single string, created using the arguments. */ 2563 is a single string, created using the arguments. */
2564 2564
2565 DOESNT_RETURN 2565 DOESNT_RETURN
2566 signal_ferror (Lisp_Object type, const CIntbyte *fmt, ...) 2566 signal_ferror (Lisp_Object type, const CIbyte *fmt, ...)
2567 { 2567 {
2568 Lisp_Object obj; 2568 Lisp_Object obj;
2569 va_list args; 2569 va_list args;
2570 2570
2571 va_start (args, fmt); 2571 va_start (args, fmt);
2576 signal_error (type, 0, obj); 2576 signal_error (type, 0, obj);
2577 } 2577 }
2578 2578
2579 void 2579 void
2580 maybe_signal_ferror (Lisp_Object type, Lisp_Object class, Error_Behavior errb, 2580 maybe_signal_ferror (Lisp_Object type, Lisp_Object class, Error_Behavior errb,
2581 const CIntbyte *fmt, ...) 2581 const CIbyte *fmt, ...)
2582 { 2582 {
2583 Lisp_Object obj; 2583 Lisp_Object obj;
2584 va_list args; 2584 va_list args;
2585 2585
2586 /* Optimization: */ 2586 /* Optimization: */
2594 /* Fsignal GC-protects its args */ 2594 /* Fsignal GC-protects its args */
2595 maybe_signal_error (type, 0, obj, class, errb); 2595 maybe_signal_error (type, 0, obj, class, errb);
2596 } 2596 }
2597 2597
2598 Lisp_Object 2598 Lisp_Object
2599 signal_continuable_ferror (Lisp_Object type, const CIntbyte *fmt, ...) 2599 signal_continuable_ferror (Lisp_Object type, const CIbyte *fmt, ...)
2600 { 2600 {
2601 Lisp_Object obj; 2601 Lisp_Object obj;
2602 va_list args; 2602 va_list args;
2603 2603
2604 va_start (args, fmt); 2604 va_start (args, fmt);
2609 return Fsignal (type, list1 (obj)); 2609 return Fsignal (type, list1 (obj));
2610 } 2610 }
2611 2611
2612 Lisp_Object 2612 Lisp_Object
2613 maybe_signal_continuable_ferror (Lisp_Object type, Lisp_Object class, 2613 maybe_signal_continuable_ferror (Lisp_Object type, Lisp_Object class,
2614 Error_Behavior errb, const CIntbyte *fmt, ...) 2614 Error_Behavior errb, const CIbyte *fmt, ...)
2615 { 2615 {
2616 Lisp_Object obj; 2616 Lisp_Object obj;
2617 va_list args; 2617 va_list args;
2618 2618
2619 /* Optimization: */ 2619 /* Optimization: */
2642 elements, the first of which is Qunbound), and these functions are 2642 elements, the first of which is Qunbound), and these functions are
2643 not commonly used. 2643 not commonly used.
2644 */ 2644 */
2645 2645
2646 DOESNT_RETURN 2646 DOESNT_RETURN
2647 signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob, const CIntbyte *fmt, 2647 signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob, const CIbyte *fmt,
2648 ...) 2648 ...)
2649 { 2649 {
2650 Lisp_Object obj; 2650 Lisp_Object obj;
2651 va_list args; 2651 va_list args;
2652 2652
2659 } 2659 }
2660 2660
2661 void 2661 void
2662 maybe_signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob, 2662 maybe_signal_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
2663 Lisp_Object class, Error_Behavior errb, 2663 Lisp_Object class, Error_Behavior errb,
2664 const CIntbyte *fmt, ...) 2664 const CIbyte *fmt, ...)
2665 { 2665 {
2666 Lisp_Object obj; 2666 Lisp_Object obj;
2667 va_list args; 2667 va_list args;
2668 2668
2669 /* Optimization: */ 2669 /* Optimization: */
2679 errb); 2679 errb);
2680 } 2680 }
2681 2681
2682 Lisp_Object 2682 Lisp_Object
2683 signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob, 2683 signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
2684 const CIntbyte *fmt, ...) 2684 const CIbyte *fmt, ...)
2685 { 2685 {
2686 Lisp_Object obj; 2686 Lisp_Object obj;
2687 va_list args; 2687 va_list args;
2688 2688
2689 va_start (args, fmt); 2689 va_start (args, fmt);
2696 2696
2697 Lisp_Object 2697 Lisp_Object
2698 maybe_signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob, 2698 maybe_signal_continuable_ferror_with_frob (Lisp_Object type, Lisp_Object frob,
2699 Lisp_Object class, 2699 Lisp_Object class,
2700 Error_Behavior errb, 2700 Error_Behavior errb,
2701 const CIntbyte *fmt, ...) 2701 const CIbyte *fmt, ...)
2702 { 2702 {
2703 Lisp_Object obj; 2703 Lisp_Object obj;
2704 va_list args; 2704 va_list args;
2705 2705
2706 /* Optimization: */ 2706 /* Optimization: */
2784 { 2784 {
2785 signal_error (Qcircular_property_list, 0, list); 2785 signal_error (Qcircular_property_list, 0, list);
2786 } 2786 }
2787 2787
2788 DOESNT_RETURN 2788 DOESNT_RETURN
2789 syntax_error (const CIntbyte *reason, Lisp_Object frob) 2789 syntax_error (const CIbyte *reason, Lisp_Object frob)
2790 { 2790 {
2791 signal_error (Qsyntax_error, reason, frob); 2791 signal_error (Qsyntax_error, reason, frob);
2792 } 2792 }
2793 2793
2794 DOESNT_RETURN 2794 DOESNT_RETURN
2795 syntax_error_2 (const CIntbyte *reason, Lisp_Object frob1, Lisp_Object frob2) 2795 syntax_error_2 (const CIbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
2796 { 2796 {
2797 signal_error_2 (Qsyntax_error, reason, frob1, frob2); 2797 signal_error_2 (Qsyntax_error, reason, frob1, frob2);
2798 } 2798 }
2799 2799
2800 void 2800 void
2801 maybe_syntax_error (const CIntbyte *reason, Lisp_Object frob, 2801 maybe_syntax_error (const CIbyte *reason, Lisp_Object frob,
2802 Lisp_Object class, Error_Behavior errb) 2802 Lisp_Object class, Error_Behavior errb)
2803 { 2803 {
2804 maybe_signal_error (Qsyntax_error, reason, frob, class, errb); 2804 maybe_signal_error (Qsyntax_error, reason, frob, class, errb);
2805 } 2805 }
2806 2806
2807 DOESNT_RETURN 2807 DOESNT_RETURN
2808 sferror (const CIntbyte *reason, Lisp_Object frob) 2808 sferror (const CIbyte *reason, Lisp_Object frob)
2809 { 2809 {
2810 signal_error (Qstructure_formation_error, reason, frob); 2810 signal_error (Qstructure_formation_error, reason, frob);
2811 } 2811 }
2812 2812
2813 DOESNT_RETURN 2813 DOESNT_RETURN
2814 sferror_2 (const CIntbyte *reason, Lisp_Object frob1, Lisp_Object frob2) 2814 sferror_2 (const CIbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
2815 { 2815 {
2816 signal_error_2 (Qstructure_formation_error, reason, frob1, frob2); 2816 signal_error_2 (Qstructure_formation_error, reason, frob1, frob2);
2817 } 2817 }
2818 2818
2819 void 2819 void
2820 maybe_sferror (const CIntbyte *reason, Lisp_Object frob, 2820 maybe_sferror (const CIbyte *reason, Lisp_Object frob,
2821 Lisp_Object class, Error_Behavior errb) 2821 Lisp_Object class, Error_Behavior errb)
2822 { 2822 {
2823 maybe_signal_error (Qstructure_formation_error, reason, frob, class, errb); 2823 maybe_signal_error (Qstructure_formation_error, reason, frob, class, errb);
2824 } 2824 }
2825 2825
2826 DOESNT_RETURN 2826 DOESNT_RETURN
2827 invalid_argument (const CIntbyte *reason, Lisp_Object frob) 2827 invalid_argument (const CIbyte *reason, Lisp_Object frob)
2828 { 2828 {
2829 signal_error (Qinvalid_argument, reason, frob); 2829 signal_error (Qinvalid_argument, reason, frob);
2830 } 2830 }
2831 2831
2832 DOESNT_RETURN 2832 DOESNT_RETURN
2833 invalid_argument_2 (const CIntbyte *reason, Lisp_Object frob1, 2833 invalid_argument_2 (const CIbyte *reason, Lisp_Object frob1,
2834 Lisp_Object frob2) 2834 Lisp_Object frob2)
2835 { 2835 {
2836 signal_error_2 (Qinvalid_argument, reason, frob1, frob2); 2836 signal_error_2 (Qinvalid_argument, reason, frob1, frob2);
2837 } 2837 }
2838 2838
2839 void 2839 void
2840 maybe_invalid_argument (const CIntbyte *reason, Lisp_Object frob, 2840 maybe_invalid_argument (const CIbyte *reason, Lisp_Object frob,
2841 Lisp_Object class, Error_Behavior errb) 2841 Lisp_Object class, Error_Behavior errb)
2842 { 2842 {
2843 maybe_signal_error (Qinvalid_argument, reason, frob, class, errb); 2843 maybe_signal_error (Qinvalid_argument, reason, frob, class, errb);
2844 } 2844 }
2845 2845
2846 DOESNT_RETURN 2846 DOESNT_RETURN
2847 invalid_constant (const CIntbyte *reason, Lisp_Object frob) 2847 invalid_constant (const CIbyte *reason, Lisp_Object frob)
2848 { 2848 {
2849 signal_error (Qinvalid_constant, reason, frob); 2849 signal_error (Qinvalid_constant, reason, frob);
2850 } 2850 }
2851 2851
2852 DOESNT_RETURN 2852 DOESNT_RETURN
2853 invalid_constant_2 (const CIntbyte *reason, Lisp_Object frob1, 2853 invalid_constant_2 (const CIbyte *reason, Lisp_Object frob1,
2854 Lisp_Object frob2) 2854 Lisp_Object frob2)
2855 { 2855 {
2856 signal_error_2 (Qinvalid_constant, reason, frob1, frob2); 2856 signal_error_2 (Qinvalid_constant, reason, frob1, frob2);
2857 } 2857 }
2858 2858
2859 void 2859 void
2860 maybe_invalid_constant (const CIntbyte *reason, Lisp_Object frob, 2860 maybe_invalid_constant (const CIbyte *reason, Lisp_Object frob,
2861 Lisp_Object class, Error_Behavior errb) 2861 Lisp_Object class, Error_Behavior errb)
2862 { 2862 {
2863 maybe_signal_error (Qinvalid_constant, reason, frob, class, errb); 2863 maybe_signal_error (Qinvalid_constant, reason, frob, class, errb);
2864 } 2864 }
2865 2865
2866 DOESNT_RETURN 2866 DOESNT_RETURN
2867 invalid_operation (const CIntbyte *reason, Lisp_Object frob) 2867 invalid_operation (const CIbyte *reason, Lisp_Object frob)
2868 { 2868 {
2869 signal_error (Qinvalid_operation, reason, frob); 2869 signal_error (Qinvalid_operation, reason, frob);
2870 } 2870 }
2871 2871
2872 DOESNT_RETURN 2872 DOESNT_RETURN
2873 invalid_operation_2 (const CIntbyte *reason, Lisp_Object frob1, 2873 invalid_operation_2 (const CIbyte *reason, Lisp_Object frob1,
2874 Lisp_Object frob2) 2874 Lisp_Object frob2)
2875 { 2875 {
2876 signal_error_2 (Qinvalid_operation, reason, frob1, frob2); 2876 signal_error_2 (Qinvalid_operation, reason, frob1, frob2);
2877 } 2877 }
2878 2878
2879 void 2879 void
2880 maybe_invalid_operation (const CIntbyte *reason, Lisp_Object frob, 2880 maybe_invalid_operation (const CIbyte *reason, Lisp_Object frob,
2881 Lisp_Object class, Error_Behavior errb) 2881 Lisp_Object class, Error_Behavior errb)
2882 { 2882 {
2883 maybe_signal_error (Qinvalid_operation, reason, frob, class, errb); 2883 maybe_signal_error (Qinvalid_operation, reason, frob, class, errb);
2884 } 2884 }
2885 2885
2886 DOESNT_RETURN 2886 DOESNT_RETURN
2887 invalid_change (const CIntbyte *reason, Lisp_Object frob) 2887 invalid_change (const CIbyte *reason, Lisp_Object frob)
2888 { 2888 {
2889 signal_error (Qinvalid_change, reason, frob); 2889 signal_error (Qinvalid_change, reason, frob);
2890 } 2890 }
2891 2891
2892 DOESNT_RETURN 2892 DOESNT_RETURN
2893 invalid_change_2 (const CIntbyte *reason, Lisp_Object frob1, Lisp_Object frob2) 2893 invalid_change_2 (const CIbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
2894 { 2894 {
2895 signal_error_2 (Qinvalid_change, reason, frob1, frob2); 2895 signal_error_2 (Qinvalid_change, reason, frob1, frob2);
2896 } 2896 }
2897 2897
2898 void 2898 void
2899 maybe_invalid_change (const CIntbyte *reason, Lisp_Object frob, 2899 maybe_invalid_change (const CIbyte *reason, Lisp_Object frob,
2900 Lisp_Object class, Error_Behavior errb) 2900 Lisp_Object class, Error_Behavior errb)
2901 { 2901 {
2902 maybe_signal_error (Qinvalid_change, reason, frob, class, errb); 2902 maybe_signal_error (Qinvalid_change, reason, frob, class, errb);
2903 } 2903 }
2904 2904
2905 DOESNT_RETURN 2905 DOESNT_RETURN
2906 invalid_state (const CIntbyte *reason, Lisp_Object frob) 2906 invalid_state (const CIbyte *reason, Lisp_Object frob)
2907 { 2907 {
2908 signal_error (Qinvalid_state, reason, frob); 2908 signal_error (Qinvalid_state, reason, frob);
2909 } 2909 }
2910 2910
2911 DOESNT_RETURN 2911 DOESNT_RETURN
2912 invalid_state_2 (const CIntbyte *reason, Lisp_Object frob1, Lisp_Object frob2) 2912 invalid_state_2 (const CIbyte *reason, Lisp_Object frob1, Lisp_Object frob2)
2913 { 2913 {
2914 signal_error_2 (Qinvalid_state, reason, frob1, frob2); 2914 signal_error_2 (Qinvalid_state, reason, frob1, frob2);
2915 } 2915 }
2916 2916
2917 void 2917 void
2918 maybe_invalid_state (const CIntbyte *reason, Lisp_Object frob, 2918 maybe_invalid_state (const CIbyte *reason, Lisp_Object frob,
2919 Lisp_Object class, Error_Behavior errb) 2919 Lisp_Object class, Error_Behavior errb)
2920 { 2920 {
2921 maybe_signal_error (Qinvalid_state, reason, frob, class, errb); 2921 maybe_signal_error (Qinvalid_state, reason, frob, class, errb);
2922 } 2922 }
2923 2923
2924 DOESNT_RETURN 2924 DOESNT_RETURN
2925 wtaerror (const CIntbyte *reason, Lisp_Object frob) 2925 wtaerror (const CIbyte *reason, Lisp_Object frob)
2926 { 2926 {
2927 signal_error (Qwrong_type_argument, reason, frob); 2927 signal_error (Qwrong_type_argument, reason, frob);
2928 } 2928 }
2929 2929
2930 DOESNT_RETURN 2930 DOESNT_RETURN
2931 stack_overflow (const CIntbyte *reason, Lisp_Object frob) 2931 stack_overflow (const CIbyte *reason, Lisp_Object frob)
2932 { 2932 {
2933 signal_error (Qstack_overflow, reason, frob); 2933 signal_error (Qstack_overflow, reason, frob);
2934 } 2934 }
2935 2935
2936 DOESNT_RETURN 2936 DOESNT_RETURN
2937 out_of_memory (const CIntbyte *reason, Lisp_Object frob) 2937 out_of_memory (const CIbyte *reason, Lisp_Object frob)
2938 { 2938 {
2939 signal_error (Qout_of_memory, reason, frob); 2939 signal_error (Qout_of_memory, reason, frob);
2940 } 2940 }
2941 2941
2942 DOESNT_RETURN 2942 DOESNT_RETURN
2943 printing_unreadable_object (const CIntbyte *fmt, ...) 2943 printing_unreadable_object (const CIbyte *fmt, ...)
2944 { 2944 {
2945 Lisp_Object obj; 2945 Lisp_Object obj;
2946 va_list args; 2946 va_list args;
2947 2947
2948 va_start (args, fmt); 2948 va_start (args, fmt);
4700 Lisp_Object error_conditions; 4700 Lisp_Object error_conditions;
4701 Lisp_Object data; 4701 Lisp_Object data;
4702 Lisp_Object backtrace; 4702 Lisp_Object backtrace;
4703 Lisp_Object warning_class; 4703 Lisp_Object warning_class;
4704 4704
4705 const CIntbyte *warning_string; 4705 const CIbyte *warning_string;
4706 Lisp_Object (*fun) (void *); 4706 Lisp_Object (*fun) (void *);
4707 void *arg; 4707 void *arg;
4708 }; 4708 };
4709 4709
4710 static Lisp_Object 4710 static Lisp_Object
4904 invalid throw), Qunbound is returned. Otherwise the return value 4904 invalid throw), Qunbound is returned. Otherwise the return value
4905 from the call to (*fun) (arg) is returned. */ 4905 from the call to (*fun) (arg) is returned. */
4906 4906
4907 Lisp_Object 4907 Lisp_Object
4908 call_trapping_problems (Lisp_Object warning_class, 4908 call_trapping_problems (Lisp_Object warning_class,
4909 const CIntbyte *warning_string, 4909 const CIbyte *warning_string,
4910 int flags, 4910 int flags,
4911 struct call_trapping_problems_result *problem, 4911 struct call_trapping_problems_result *problem,
4912 Lisp_Object (*fun) (void *), 4912 Lisp_Object (*fun) (void *),
4913 void *arg) 4913 void *arg)
4914 { 4914 {
5074 5074
5075 /* #### document me. */ 5075 /* #### document me. */
5076 5076
5077 Lisp_Object 5077 Lisp_Object
5078 va_call_trapping_problems (Lisp_Object warning_class, 5078 va_call_trapping_problems (Lisp_Object warning_class,
5079 const CIntbyte *warning_string, 5079 const CIbyte *warning_string,
5080 int flags, 5080 int flags,
5081 struct call_trapping_problems_result *problem, 5081 struct call_trapping_problems_result *problem,
5082 lisp_fn_t fun, int nargs, ...) 5082 lisp_fn_t fun, int nargs, ...)
5083 { 5083 {
5084 va_list vargs; 5084 va_list vargs;
5185 return Ffuncall (p->nargs, p->args); 5185 return Ffuncall (p->nargs, p->args);
5186 } 5186 }
5187 5187
5188 static Lisp_Object 5188 static Lisp_Object
5189 calln_trapping_problems (Lisp_Object warning_class, 5189 calln_trapping_problems (Lisp_Object warning_class,
5190 const CIntbyte *warning_string, int flags, 5190 const CIbyte *warning_string, int flags,
5191 struct call_trapping_problems_result *problem, 5191 struct call_trapping_problems_result *problem,
5192 int nargs, Lisp_Object *args) 5192 int nargs, Lisp_Object *args)
5193 { 5193 {
5194 struct calln_trapping_problems foo; 5194 struct calln_trapping_problems foo;
5195 struct gcpro gcpro1; 5195 struct gcpro gcpro1;
5225 5225
5226 /* #### fix these functions to follow the calling convention of 5226 /* #### fix these functions to follow the calling convention of
5227 call_trapping_problems! */ 5227 call_trapping_problems! */
5228 5228
5229 Lisp_Object 5229 Lisp_Object
5230 call0_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5230 call0_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5231 int flags) 5231 int flags)
5232 { 5232 {
5233 return calln_trapping_problems (Qerror, warning_string, flags, 0, 1, 5233 return calln_trapping_problems (Qerror, warning_string, flags, 0, 1,
5234 &function); 5234 &function);
5235 } 5235 }
5236 5236
5237 Lisp_Object 5237 Lisp_Object
5238 call1_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5238 call1_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5239 Lisp_Object object, int flags) 5239 Lisp_Object object, int flags)
5240 { 5240 {
5241 Lisp_Object args[2]; 5241 Lisp_Object args[2];
5242 5242
5243 args[0] = function; 5243 args[0] = function;
5246 return calln_trapping_problems (Qerror, warning_string, flags, 0, 2, 5246 return calln_trapping_problems (Qerror, warning_string, flags, 0, 2,
5247 args); 5247 args);
5248 } 5248 }
5249 5249
5250 Lisp_Object 5250 Lisp_Object
5251 call2_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5251 call2_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5252 Lisp_Object object1, Lisp_Object object2, 5252 Lisp_Object object1, Lisp_Object object2,
5253 int flags) 5253 int flags)
5254 { 5254 {
5255 Lisp_Object args[3]; 5255 Lisp_Object args[3];
5256 5256
5261 return calln_trapping_problems (Qerror, warning_string, flags, 0, 3, 5261 return calln_trapping_problems (Qerror, warning_string, flags, 0, 3,
5262 args); 5262 args);
5263 } 5263 }
5264 5264
5265 Lisp_Object 5265 Lisp_Object
5266 call3_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5266 call3_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5267 Lisp_Object object1, Lisp_Object object2, 5267 Lisp_Object object1, Lisp_Object object2,
5268 Lisp_Object object3, int flags) 5268 Lisp_Object object3, int flags)
5269 { 5269 {
5270 Lisp_Object args[4]; 5270 Lisp_Object args[4];
5271 5271
5277 return calln_trapping_problems (Qerror, warning_string, flags, 0, 4, 5277 return calln_trapping_problems (Qerror, warning_string, flags, 0, 4,
5278 args); 5278 args);
5279 } 5279 }
5280 5280
5281 Lisp_Object 5281 Lisp_Object
5282 call4_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5282 call4_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5283 Lisp_Object object1, Lisp_Object object2, 5283 Lisp_Object object1, Lisp_Object object2,
5284 Lisp_Object object3, Lisp_Object object4, 5284 Lisp_Object object3, Lisp_Object object4,
5285 int flags) 5285 int flags)
5286 { 5286 {
5287 Lisp_Object args[5]; 5287 Lisp_Object args[5];
5295 return calln_trapping_problems (Qerror, warning_string, flags, 0, 5, 5295 return calln_trapping_problems (Qerror, warning_string, flags, 0, 5,
5296 args); 5296 args);
5297 } 5297 }
5298 5298
5299 Lisp_Object 5299 Lisp_Object
5300 call5_trapping_problems (const CIntbyte *warning_string, Lisp_Object function, 5300 call5_trapping_problems (const CIbyte *warning_string, Lisp_Object function,
5301 Lisp_Object object1, Lisp_Object object2, 5301 Lisp_Object object1, Lisp_Object object2,
5302 Lisp_Object object3, Lisp_Object object4, 5302 Lisp_Object object3, Lisp_Object object4,
5303 Lisp_Object object5, int flags) 5303 Lisp_Object object5, int flags)
5304 { 5304 {
5305 Lisp_Object args[6]; 5305 Lisp_Object args[6];
5332 5332
5333 /* #### fix these functions to follow the calling convention of 5333 /* #### fix these functions to follow the calling convention of
5334 call_trapping_problems! */ 5334 call_trapping_problems! */
5335 5335
5336 Lisp_Object 5336 Lisp_Object
5337 eval_in_buffer_trapping_problems (const CIntbyte *warning_string, 5337 eval_in_buffer_trapping_problems (const CIbyte *warning_string,
5338 struct buffer *buf, Lisp_Object form, 5338 struct buffer *buf, Lisp_Object form,
5339 int flags) 5339 int flags)
5340 { 5340 {
5341 struct eval_in_buffer_trapping_problems p; 5341 struct eval_in_buffer_trapping_problems p;
5342 Lisp_Object buffer = wrap_buffer (buf); 5342 Lisp_Object buffer = wrap_buffer (buf);
5349 eval_in_buffer_trapping_problems_1, 5349 eval_in_buffer_trapping_problems_1,
5350 &p)); 5350 &p));
5351 } 5351 }
5352 5352
5353 Lisp_Object 5353 Lisp_Object
5354 run_hook_trapping_problems (const CIntbyte *warning_string, 5354 run_hook_trapping_problems (const CIbyte *warning_string,
5355 Lisp_Object hook_symbol, 5355 Lisp_Object hook_symbol,
5356 int flags) 5356 int flags)
5357 { 5357 {
5358 return run_hook_with_args_trapping_problems (warning_string, 1, &hook_symbol, 5358 return run_hook_with_args_trapping_problems (warning_string, 1, &hook_symbol,
5359 RUN_HOOKS_TO_COMPLETION, 5359 RUN_HOOKS_TO_COMPLETION,
5371 5371
5372 /* Same as run_hook_trapping_problems() but also set the hook to nil 5372 /* Same as run_hook_trapping_problems() but also set the hook to nil
5373 if an error occurs (but not a quit). */ 5373 if an error occurs (but not a quit). */
5374 5374
5375 Lisp_Object 5375 Lisp_Object
5376 safe_run_hook_trapping_problems (const CIntbyte *warning_string, 5376 safe_run_hook_trapping_problems (const CIbyte *warning_string,
5377 Lisp_Object hook_symbol, 5377 Lisp_Object hook_symbol,
5378 int flags) 5378 int flags)
5379 { 5379 {
5380 Lisp_Object tem; 5380 Lisp_Object tem;
5381 struct gcpro gcpro1, gcpro2; 5381 struct gcpro gcpro1, gcpro2;
5418 5418
5419 /* #### fix these functions to follow the calling convention of 5419 /* #### fix these functions to follow the calling convention of
5420 call_trapping_problems! */ 5420 call_trapping_problems! */
5421 5421
5422 Lisp_Object 5422 Lisp_Object
5423 run_hook_with_args_in_buffer_trapping_problems (const CIntbyte *warning_string, 5423 run_hook_with_args_in_buffer_trapping_problems (const CIbyte *warning_string,
5424 struct buffer *buf, int nargs, 5424 struct buffer *buf, int nargs,
5425 Lisp_Object *args, 5425 Lisp_Object *args,
5426 enum run_hooks_condition cond, 5426 enum run_hooks_condition cond,
5427 int flags) 5427 int flags)
5428 { 5428 {
5455 run_hook_with_args_in_buffer_trapping_problems_1, 5455 run_hook_with_args_in_buffer_trapping_problems_1,
5456 &diversity_and_distrust)); 5456 &diversity_and_distrust));
5457 } 5457 }
5458 5458
5459 Lisp_Object 5459 Lisp_Object
5460 run_hook_with_args_trapping_problems (const CIntbyte *warning_string, 5460 run_hook_with_args_trapping_problems (const CIbyte *warning_string,
5461 int nargs, 5461 int nargs,
5462 Lisp_Object *args, 5462 Lisp_Object *args,
5463 enum run_hooks_condition cond, 5463 enum run_hooks_condition cond,
5464 int flags) 5464 int flags)
5465 { 5465 {
5466 return run_hook_with_args_in_buffer_trapping_problems 5466 return run_hook_with_args_in_buffer_trapping_problems
5467 (warning_string, current_buffer, nargs, args, cond, flags); 5467 (warning_string, current_buffer, nargs, args, cond, flags);
5468 } 5468 }
5469 5469
5470 Lisp_Object 5470 Lisp_Object
5471 va_run_hook_with_args_trapping_problems (const CIntbyte *warning_string, 5471 va_run_hook_with_args_trapping_problems (const CIbyte *warning_string,
5472 Lisp_Object hook_var, 5472 Lisp_Object hook_var,
5473 int nargs, ...) 5473 int nargs, ...)
5474 { 5474 {
5475 /* This function can GC */ 5475 /* This function can GC */
5476 struct gcpro gcpro1; 5476 struct gcpro gcpro1;
5491 (warning_string, current_buffer, nargs + 1, funcall_args, 5491 (warning_string, current_buffer, nargs + 1, funcall_args,
5492 RUN_HOOKS_TO_COMPLETION, flags)); 5492 RUN_HOOKS_TO_COMPLETION, flags));
5493 } 5493 }
5494 5494
5495 Lisp_Object 5495 Lisp_Object
5496 va_run_hook_with_args_in_buffer_trapping_problems (const CIntbyte * 5496 va_run_hook_with_args_in_buffer_trapping_problems (const CIbyte *
5497 warning_string, 5497 warning_string,
5498 struct buffer *buf, 5498 struct buffer *buf,
5499 Lisp_Object hook_var, 5499 Lisp_Object hook_var,
5500 int nargs, ...) 5500 int nargs, ...)
5501 { 5501 {
6177 An alternative approach is to just pass some non-string type of 6177 An alternative approach is to just pass some non-string type of
6178 Lisp_Object to warn_when_safe_lispobj(); `prin1-to-string' will 6178 Lisp_Object to warn_when_safe_lispobj(); `prin1-to-string' will
6179 automatically be called when it is safe to do so. */ 6179 automatically be called when it is safe to do so. */
6180 6180
6181 void 6181 void
6182 warn_when_safe (Lisp_Object class, Lisp_Object level, const CIntbyte *fmt, ...) 6182 warn_when_safe (Lisp_Object class, Lisp_Object level, const CIbyte *fmt, ...)
6183 { 6183 {
6184 Lisp_Object obj; 6184 Lisp_Object obj;
6185 va_list args; 6185 va_list args;
6186 6186
6187 /* Don't even generate debug warnings if they're going to be discarded, 6187 /* Don't even generate debug warnings if they're going to be discarded,