Mercurial > emacs
comparison src/data.c @ 90533:8a8e69664178
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 343-356)
- Update from CVS
- Update for ERC 5.1.3.
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 113-115)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-90
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 19 Jul 2006 00:42:56 +0000 |
parents | c156f6a9e7b5 7febc7ff0f0d |
children | dbe3f29e61d6 |
comparison
equal
deleted
inserted
replaced
90532:e22cf6d2400c | 90533:8a8e69664178 |
---|---|
103 | 103 |
104 void | 104 void |
105 circular_list_error (list) | 105 circular_list_error (list) |
106 Lisp_Object list; | 106 Lisp_Object list; |
107 { | 107 { |
108 Fsignal (Qcircular_list, list); | 108 xsignal (Qcircular_list, list); |
109 } | 109 } |
110 | 110 |
111 | 111 |
112 Lisp_Object | 112 Lisp_Object |
113 wrong_type_argument (predicate, value) | 113 wrong_type_argument (predicate, value) |
114 register Lisp_Object predicate, value; | 114 register Lisp_Object predicate, value; |
115 { | 115 { |
116 register Lisp_Object tem; | 116 /* If VALUE is not even a valid Lisp object, abort here |
117 do | 117 where we can get a backtrace showing where it came from. */ |
118 { | 118 if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) |
119 /* If VALUE is not even a valid Lisp object, abort here | 119 abort (); |
120 where we can get a backtrace showing where it came from. */ | 120 |
121 if ((unsigned int) XGCTYPE (value) >= Lisp_Type_Limit) | 121 xsignal2 (Qwrong_type_argument, predicate, value); |
122 abort (); | |
123 | |
124 value = Fsignal (Qwrong_type_argument, Fcons (predicate, Fcons (value, Qnil))); | |
125 tem = call1 (predicate, value); | |
126 } | |
127 while (NILP (tem)); | |
128 /* This function is marked as NO_RETURN, gcc would warn if it has a | |
129 return statement or if falls off the function. Other compilers | |
130 warn if no return statement is present. */ | |
131 #ifndef __GNUC__ | |
132 return value; | |
133 #else | |
134 abort (); | |
135 #endif | |
136 } | 122 } |
137 | 123 |
138 void | 124 void |
139 pure_write_error () | 125 pure_write_error () |
140 { | 126 { |
143 | 129 |
144 void | 130 void |
145 args_out_of_range (a1, a2) | 131 args_out_of_range (a1, a2) |
146 Lisp_Object a1, a2; | 132 Lisp_Object a1, a2; |
147 { | 133 { |
148 while (1) | 134 xsignal2 (Qargs_out_of_range, a1, a2); |
149 Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Qnil))); | |
150 } | 135 } |
151 | 136 |
152 void | 137 void |
153 args_out_of_range_3 (a1, a2, a3) | 138 args_out_of_range_3 (a1, a2, a3) |
154 Lisp_Object a1, a2, a3; | 139 Lisp_Object a1, a2, a3; |
155 { | 140 { |
156 while (1) | 141 xsignal3 (Qargs_out_of_range, a1, a2, a3); |
157 Fsignal (Qargs_out_of_range, Fcons (a1, Fcons (a2, Fcons (a3, Qnil)))); | |
158 } | 142 } |
159 | 143 |
160 /* On some machines, XINT needs a temporary location. | 144 /* On some machines, XINT needs a temporary location. |
161 Here it is, in case it is needed. */ | 145 Here it is, in case it is needed. */ |
162 | 146 |
392 DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, | 376 DEFUN ("arrayp", Farrayp, Sarrayp, 1, 1, 0, |
393 doc: /* Return t if OBJECT is an array (string or vector). */) | 377 doc: /* Return t if OBJECT is an array (string or vector). */) |
394 (object) | 378 (object) |
395 Lisp_Object object; | 379 Lisp_Object object; |
396 { | 380 { |
397 if (VECTORP (object) || STRINGP (object) | 381 if (ARRAYP (object)) |
398 || CHAR_TABLE_P (object) || BOOL_VECTOR_P (object)) | |
399 return Qt; | 382 return Qt; |
400 return Qnil; | 383 return Qnil; |
401 } | 384 } |
402 | 385 |
403 DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, | 386 DEFUN ("sequencep", Fsequencep, Ssequencep, 1, 1, 0, |
404 doc: /* Return t if OBJECT is a sequence (list or array). */) | 387 doc: /* Return t if OBJECT is a sequence (list or array). */) |
405 (object) | 388 (object) |
406 register Lisp_Object object; | 389 register Lisp_Object object; |
407 { | 390 { |
408 if (CONSP (object) || NILP (object) || VECTORP (object) || STRINGP (object) | 391 if (CONSP (object) || NILP (object) || ARRAYP (object)) |
409 || CHAR_TABLE_P (object) || BOOL_VECTOR_P (object)) | |
410 return Qt; | 392 return Qt; |
411 return Qnil; | 393 return Qnil; |
412 } | 394 } |
413 | 395 |
414 DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, | 396 DEFUN ("bufferp", Fbufferp, Sbufferp, 1, 1, 0, |
534 See Info node `(elisp)Cons Cells' for a discussion of related basic | 516 See Info node `(elisp)Cons Cells' for a discussion of related basic |
535 Lisp concepts such as car, cdr, cons cell and list. */) | 517 Lisp concepts such as car, cdr, cons cell and list. */) |
536 (list) | 518 (list) |
537 register Lisp_Object list; | 519 register Lisp_Object list; |
538 { | 520 { |
539 while (1) | 521 return CAR (list); |
540 { | |
541 if (CONSP (list)) | |
542 return XCAR (list); | |
543 else if (EQ (list, Qnil)) | |
544 return Qnil; | |
545 else | |
546 list = wrong_type_argument (Qlistp, list); | |
547 } | |
548 } | 522 } |
549 | 523 |
550 DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, | 524 DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, |
551 doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) | 525 doc: /* Return the car of OBJECT if it is a cons cell, or else nil. */) |
552 (object) | 526 (object) |
553 Lisp_Object object; | 527 Lisp_Object object; |
554 { | 528 { |
555 if (CONSP (object)) | 529 return CAR_SAFE (object); |
556 return XCAR (object); | |
557 else | |
558 return Qnil; | |
559 } | 530 } |
560 | 531 |
561 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, | 532 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, |
562 doc: /* Return the cdr of LIST. If arg is nil, return nil. | 533 doc: /* Return the cdr of LIST. If arg is nil, return nil. |
563 Error if arg is not nil and not a cons cell. See also `cdr-safe'. | 534 Error if arg is not nil and not a cons cell. See also `cdr-safe'. |
565 See Info node `(elisp)Cons Cells' for a discussion of related basic | 536 See Info node `(elisp)Cons Cells' for a discussion of related basic |
566 Lisp concepts such as cdr, car, cons cell and list. */) | 537 Lisp concepts such as cdr, car, cons cell and list. */) |
567 (list) | 538 (list) |
568 register Lisp_Object list; | 539 register Lisp_Object list; |
569 { | 540 { |
570 while (1) | 541 return CDR (list); |
571 { | |
572 if (CONSP (list)) | |
573 return XCDR (list); | |
574 else if (EQ (list, Qnil)) | |
575 return Qnil; | |
576 else | |
577 list = wrong_type_argument (Qlistp, list); | |
578 } | |
579 } | 542 } |
580 | 543 |
581 DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, | 544 DEFUN ("cdr-safe", Fcdr_safe, Scdr_safe, 1, 1, 0, |
582 doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) | 545 doc: /* Return the cdr of OBJECT if it is a cons cell, or else nil. */) |
583 (object) | 546 (object) |
584 Lisp_Object object; | 547 Lisp_Object object; |
585 { | 548 { |
586 if (CONSP (object)) | 549 return CDR_SAFE (object); |
587 return XCDR (object); | |
588 else | |
589 return Qnil; | |
590 } | 550 } |
591 | 551 |
592 DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | 552 DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, |
593 doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) | 553 doc: /* Set the car of CELL to be NEWCAR. Returns NEWCAR. */) |
594 (cell, newcar) | 554 (cell, newcar) |
595 register Lisp_Object cell, newcar; | 555 register Lisp_Object cell, newcar; |
596 { | 556 { |
597 if (!CONSP (cell)) | 557 CHECK_CONS (cell); |
598 cell = wrong_type_argument (Qconsp, cell); | |
599 | |
600 CHECK_IMPURE (cell); | 558 CHECK_IMPURE (cell); |
601 XSETCAR (cell, newcar); | 559 XSETCAR (cell, newcar); |
602 return newcar; | 560 return newcar; |
603 } | 561 } |
604 | 562 |
605 DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | 563 DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, |
606 doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) | 564 doc: /* Set the cdr of CELL to be NEWCDR. Returns NEWCDR. */) |
607 (cell, newcdr) | 565 (cell, newcdr) |
608 register Lisp_Object cell, newcdr; | 566 register Lisp_Object cell, newcdr; |
609 { | 567 { |
610 if (!CONSP (cell)) | 568 CHECK_CONS (cell); |
611 cell = wrong_type_argument (Qconsp, cell); | |
612 | |
613 CHECK_IMPURE (cell); | 569 CHECK_IMPURE (cell); |
614 XSETCDR (cell, newcdr); | 570 XSETCDR (cell, newcdr); |
615 return newcdr; | 571 return newcdr; |
616 } | 572 } |
617 | 573 |
649 (symbol) | 605 (symbol) |
650 register Lisp_Object symbol; | 606 register Lisp_Object symbol; |
651 { | 607 { |
652 CHECK_SYMBOL (symbol); | 608 CHECK_SYMBOL (symbol); |
653 if (XSYMBOL (symbol)->constant) | 609 if (XSYMBOL (symbol)->constant) |
654 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 610 xsignal1 (Qsetting_constant, symbol); |
655 Fset (symbol, Qunbound); | 611 Fset (symbol, Qunbound); |
656 return symbol; | 612 return symbol; |
657 } | 613 } |
658 | 614 |
659 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, | 615 DEFUN ("fmakunbound", Ffmakunbound, Sfmakunbound, 1, 1, 0, |
662 (symbol) | 618 (symbol) |
663 register Lisp_Object symbol; | 619 register Lisp_Object symbol; |
664 { | 620 { |
665 CHECK_SYMBOL (symbol); | 621 CHECK_SYMBOL (symbol); |
666 if (NILP (symbol) || EQ (symbol, Qt)) | 622 if (NILP (symbol) || EQ (symbol, Qt)) |
667 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 623 xsignal1 (Qsetting_constant, symbol); |
668 XSYMBOL (symbol)->function = Qunbound; | 624 XSYMBOL (symbol)->function = Qunbound; |
669 return symbol; | 625 return symbol; |
670 } | 626 } |
671 | 627 |
672 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 628 DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
673 doc: /* Return SYMBOL's function definition. Error if that is void. */) | 629 doc: /* Return SYMBOL's function definition. Error if that is void. */) |
674 (symbol) | 630 (symbol) |
675 register Lisp_Object symbol; | 631 register Lisp_Object symbol; |
676 { | 632 { |
677 CHECK_SYMBOL (symbol); | 633 CHECK_SYMBOL (symbol); |
678 if (EQ (XSYMBOL (symbol)->function, Qunbound)) | 634 if (!EQ (XSYMBOL (symbol)->function, Qunbound)) |
679 return Fsignal (Qvoid_function, Fcons (symbol, Qnil)); | 635 return XSYMBOL (symbol)->function; |
680 return XSYMBOL (symbol)->function; | 636 xsignal1 (Qvoid_function, symbol); |
681 } | 637 } |
682 | 638 |
683 DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, | 639 DEFUN ("symbol-plist", Fsymbol_plist, Ssymbol_plist, 1, 1, 0, |
684 doc: /* Return SYMBOL's property list. */) | 640 doc: /* Return SYMBOL's property list. */) |
685 (symbol) | 641 (symbol) |
706 (symbol, definition) | 662 (symbol, definition) |
707 register Lisp_Object symbol, definition; | 663 register Lisp_Object symbol, definition; |
708 { | 664 { |
709 CHECK_SYMBOL (symbol); | 665 CHECK_SYMBOL (symbol); |
710 if (NILP (symbol) || EQ (symbol, Qt)) | 666 if (NILP (symbol) || EQ (symbol, Qt)) |
711 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 667 xsignal1 (Qsetting_constant, symbol); |
712 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) | 668 if (!NILP (Vautoload_queue) && !EQ (XSYMBOL (symbol)->function, Qunbound)) |
713 Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), | 669 Vautoload_queue = Fcons (Fcons (symbol, XSYMBOL (symbol)->function), |
714 Vautoload_queue); | 670 Vautoload_queue); |
715 XSYMBOL (symbol)->function = definition; | 671 XSYMBOL (symbol)->function = definition; |
716 /* Handle automatic advice activation */ | 672 /* Handle automatic advice activation */ |
762 function with `&rest' args, or `unevalled' for a special form. */) | 718 function with `&rest' args, or `unevalled' for a special form. */) |
763 (subr) | 719 (subr) |
764 Lisp_Object subr; | 720 Lisp_Object subr; |
765 { | 721 { |
766 short minargs, maxargs; | 722 short minargs, maxargs; |
767 if (!SUBRP (subr)) | 723 CHECK_SUBR (subr); |
768 wrong_type_argument (Qsubrp, subr); | |
769 minargs = XSUBR (subr)->min_args; | 724 minargs = XSUBR (subr)->min_args; |
770 maxargs = XSUBR (subr)->max_args; | 725 maxargs = XSUBR (subr)->max_args; |
771 if (maxargs == MANY) | 726 if (maxargs == MANY) |
772 return Fcons (make_number (minargs), Qmany); | 727 return Fcons (make_number (minargs), Qmany); |
773 else if (maxargs == UNEVALLED) | 728 else if (maxargs == UNEVALLED) |
781 SUBR must be a built-in function. */) | 736 SUBR must be a built-in function. */) |
782 (subr) | 737 (subr) |
783 Lisp_Object subr; | 738 Lisp_Object subr; |
784 { | 739 { |
785 const char *name; | 740 const char *name; |
786 if (!SUBRP (subr)) | 741 CHECK_SUBR (subr); |
787 wrong_type_argument (Qsubrp, subr); | |
788 name = XSUBR (subr)->symbol_name; | 742 name = XSUBR (subr)->symbol_name; |
789 return make_string (name, strlen (name)); | 743 return make_string (name, strlen (name)); |
790 } | 744 } |
791 | 745 |
792 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | 746 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, |
850 | 804 |
851 hare = XSYMBOL (hare)->value; | 805 hare = XSYMBOL (hare)->value; |
852 tortoise = XSYMBOL (tortoise)->value; | 806 tortoise = XSYMBOL (tortoise)->value; |
853 | 807 |
854 if (EQ (hare, tortoise)) | 808 if (EQ (hare, tortoise)) |
855 Fsignal (Qcyclic_variable_indirection, Fcons (symbol, Qnil)); | 809 xsignal1 (Qcyclic_variable_indirection, symbol); |
856 } | 810 } |
857 | 811 |
858 return hare; | 812 return hare; |
859 } | 813 } |
860 | 814 |
1151 Lisp_Object symbol; | 1105 Lisp_Object symbol; |
1152 { | 1106 { |
1153 Lisp_Object val; | 1107 Lisp_Object val; |
1154 | 1108 |
1155 val = find_symbol_value (symbol); | 1109 val = find_symbol_value (symbol); |
1156 if (EQ (val, Qunbound)) | 1110 if (!EQ (val, Qunbound)) |
1157 return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | |
1158 else | |
1159 return val; | 1111 return val; |
1112 | |
1113 xsignal1 (Qvoid_variable, symbol); | |
1160 } | 1114 } |
1161 | 1115 |
1162 DEFUN ("set", Fset, Sset, 2, 2, 0, | 1116 DEFUN ("set", Fset, Sset, 2, 2, 0, |
1163 doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) | 1117 doc: /* Set SYMBOL's value to NEWVAL, and return NEWVAL. */) |
1164 (symbol, newval) | 1118 (symbol, newval) |
1218 | 1172 |
1219 CHECK_SYMBOL (symbol); | 1173 CHECK_SYMBOL (symbol); |
1220 if (SYMBOL_CONSTANT_P (symbol) | 1174 if (SYMBOL_CONSTANT_P (symbol) |
1221 && (NILP (Fkeywordp (symbol)) | 1175 && (NILP (Fkeywordp (symbol)) |
1222 || !EQ (newval, SYMBOL_VALUE (symbol)))) | 1176 || !EQ (newval, SYMBOL_VALUE (symbol)))) |
1223 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); | 1177 xsignal1 (Qsetting_constant, symbol); |
1224 | 1178 |
1225 innercontents = valcontents = SYMBOL_VALUE (symbol); | 1179 innercontents = valcontents = SYMBOL_VALUE (symbol); |
1226 | 1180 |
1227 if (BUFFER_OBJFWDP (valcontents)) | 1181 if (BUFFER_OBJFWDP (valcontents)) |
1228 { | 1182 { |
1412 Lisp_Object symbol; | 1366 Lisp_Object symbol; |
1413 { | 1367 { |
1414 register Lisp_Object value; | 1368 register Lisp_Object value; |
1415 | 1369 |
1416 value = default_value (symbol); | 1370 value = default_value (symbol); |
1417 if (EQ (value, Qunbound)) | 1371 if (!EQ (value, Qunbound)) |
1418 return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | 1372 return value; |
1419 return value; | 1373 |
1374 xsignal1 (Qvoid_variable, symbol); | |
1420 } | 1375 } |
1421 | 1376 |
1422 DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, | 1377 DEFUN ("set-default", Fset_default, Sset_default, 2, 2, 0, |
1423 doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. | 1378 doc: /* Set SYMBOL's default value to VALUE. SYMBOL and VALUE are evaluated. |
1424 The default value is seen in buffers that do not have their own values | 1379 The default value is seen in buffers that do not have their own values |
1926 hare = XSYMBOL (hare)->function; | 1881 hare = XSYMBOL (hare)->function; |
1927 | 1882 |
1928 tortoise = XSYMBOL (tortoise)->function; | 1883 tortoise = XSYMBOL (tortoise)->function; |
1929 | 1884 |
1930 if (EQ (hare, tortoise)) | 1885 if (EQ (hare, tortoise)) |
1931 Fsignal (Qcyclic_function_indirection, Fcons (object, Qnil)); | 1886 xsignal1 (Qcyclic_function_indirection, object); |
1932 } | 1887 } |
1933 | 1888 |
1934 return hare; | 1889 return hare; |
1935 } | 1890 } |
1936 | 1891 |
1946 register Lisp_Object object; | 1901 register Lisp_Object object; |
1947 Lisp_Object noerror; | 1902 Lisp_Object noerror; |
1948 { | 1903 { |
1949 Lisp_Object result; | 1904 Lisp_Object result; |
1950 | 1905 |
1951 result = indirect_function (object); | 1906 /* Optimize for no indirection. */ |
1952 | 1907 result = object; |
1953 if (EQ (result, Qunbound)) | 1908 if (SYMBOLP (result) && !EQ (result, Qunbound) |
1954 return (NILP (noerror) | 1909 && (result = XSYMBOL (result)->function, SYMBOLP (result))) |
1955 ? Fsignal (Qvoid_function, Fcons (object, Qnil)) | 1910 result = indirect_function (result); |
1956 : Qnil); | 1911 if (!EQ (result, Qunbound)) |
1957 return result; | 1912 return result; |
1913 | |
1914 if (NILP (noerror)) | |
1915 xsignal1 (Qvoid_function, object); | |
1916 | |
1917 return Qnil; | |
1958 } | 1918 } |
1959 | 1919 |
1960 /* Extract and set vector and string elements */ | 1920 /* Extract and set vector and string elements */ |
1961 | 1921 |
1962 DEFUN ("aref", Faref, Saref, 2, 2, 0, | 1922 DEFUN ("aref", Faref, Saref, 2, 2, 0, |
2026 { | 1986 { |
2027 register int idxval; | 1987 register int idxval; |
2028 | 1988 |
2029 CHECK_NUMBER (idx); | 1989 CHECK_NUMBER (idx); |
2030 idxval = XINT (idx); | 1990 idxval = XINT (idx); |
2031 if (!VECTORP (array) && !STRINGP (array) && !BOOL_VECTOR_P (array) | 1991 CHECK_ARRAY (array, Qarrayp); |
2032 && ! CHAR_TABLE_P (array)) | |
2033 array = wrong_type_argument (Qarrayp, array); | |
2034 CHECK_IMPURE (array); | 1992 CHECK_IMPURE (array); |
2035 | 1993 |
2036 if (VECTORP (array)) | 1994 if (VECTORP (array)) |
2037 { | 1995 { |
2038 if (idxval < 0 || idxval >= XVECTOR (array)->size) | 1996 if (idxval < 0 || idxval >= XVECTOR (array)->size) |
2338 else | 2296 else |
2339 { | 2297 { |
2340 CHECK_NUMBER (base); | 2298 CHECK_NUMBER (base); |
2341 b = XINT (base); | 2299 b = XINT (base); |
2342 if (b < 2 || b > 16) | 2300 if (b < 2 || b > 16) |
2343 Fsignal (Qargs_out_of_range, Fcons (base, Qnil)); | 2301 xsignal1 (Qargs_out_of_range, base); |
2344 } | 2302 } |
2345 | 2303 |
2346 /* Skip any whitespace at the front of the number. Some versions of | 2304 /* Skip any whitespace at the front of the number. Some versions of |
2347 atoi do this anyway, so we might as well make Emacs lisp consistent. */ | 2305 atoi do this anyway, so we might as well make Emacs lisp consistent. */ |
2348 p = SDATA (string); | 2306 p = SDATA (string); |
2450 if (!argnum) | 2408 if (!argnum) |
2451 accum = next; | 2409 accum = next; |
2452 else | 2410 else |
2453 { | 2411 { |
2454 if (next == 0) | 2412 if (next == 0) |
2455 Fsignal (Qarith_error, Qnil); | 2413 xsignal0 (Qarith_error); |
2456 accum /= next; | 2414 accum /= next; |
2457 } | 2415 } |
2458 break; | 2416 break; |
2459 case Alogand: | 2417 case Alogand: |
2460 accum &= next; | 2418 accum &= next; |
2523 if (!argnum) | 2481 if (!argnum) |
2524 accum = next; | 2482 accum = next; |
2525 else | 2483 else |
2526 { | 2484 { |
2527 if (! IEEE_FLOATING_POINT && next == 0) | 2485 if (! IEEE_FLOATING_POINT && next == 0) |
2528 Fsignal (Qarith_error, Qnil); | 2486 xsignal0 (Qarith_error); |
2529 accum /= next; | 2487 accum /= next; |
2530 } | 2488 } |
2531 break; | 2489 break; |
2532 case Alogand: | 2490 case Alogand: |
2533 case Alogior: | 2491 case Alogior: |
2605 | 2563 |
2606 CHECK_NUMBER_COERCE_MARKER (x); | 2564 CHECK_NUMBER_COERCE_MARKER (x); |
2607 CHECK_NUMBER_COERCE_MARKER (y); | 2565 CHECK_NUMBER_COERCE_MARKER (y); |
2608 | 2566 |
2609 if (XFASTINT (y) == 0) | 2567 if (XFASTINT (y) == 0) |
2610 Fsignal (Qarith_error, Qnil); | 2568 xsignal0 (Qarith_error); |
2611 | 2569 |
2612 XSETINT (val, XINT (x) % XINT (y)); | 2570 XSETINT (val, XINT (x) % XINT (y)); |
2613 return val; | 2571 return val; |
2614 } | 2572 } |
2615 | 2573 |
2654 | 2612 |
2655 i1 = XINT (x); | 2613 i1 = XINT (x); |
2656 i2 = XINT (y); | 2614 i2 = XINT (y); |
2657 | 2615 |
2658 if (i2 == 0) | 2616 if (i2 == 0) |
2659 Fsignal (Qarith_error, Qnil); | 2617 xsignal0 (Qarith_error); |
2660 | 2618 |
2661 i1 %= i2; | 2619 i1 %= i2; |
2662 | 2620 |
2663 /* If the "remainder" comes out with the wrong sign, fix it. */ | 2621 /* If the "remainder" comes out with the wrong sign, fix it. */ |
2664 if (i2 < 0 ? i1 > 0 : i1 < 0) | 2622 if (i2 < 0 ? i1 > 0 : i1 < 0) |
3258 #else /* not BSD4_1 */ | 3216 #else /* not BSD4_1 */ |
3259 sigsetmask (SIGEMPTYMASK); | 3217 sigsetmask (SIGEMPTYMASK); |
3260 #endif /* not BSD4_1 */ | 3218 #endif /* not BSD4_1 */ |
3261 | 3219 |
3262 SIGNAL_THREAD_CHECK (signo); | 3220 SIGNAL_THREAD_CHECK (signo); |
3263 Fsignal (Qarith_error, Qnil); | 3221 xsignal0 (Qarith_error); |
3264 } | 3222 } |
3265 | 3223 |
3266 void | 3224 void |
3267 init_data () | 3225 init_data () |
3268 { | 3226 { |