comparison src/syntax.c @ 40656:cdfd4d09b79a

Update usage of CHECK_ macros (remove unused second argument).
author Pavel Jan?k <Pavel@Janik.cz>
date Fri, 02 Nov 2001 20:46:55 +0000
parents 0e7059267f7e
children 046e69b1b128
comparison
equal deleted inserted replaced
40655:45453187feeb 40656:cdfd4d09b79a
869 { 869 {
870 int char_int; 870 int char_int;
871 gl_state.current_syntax_table = current_buffer->syntax_table; 871 gl_state.current_syntax_table = current_buffer->syntax_table;
872 872
873 gl_state.use_global = 0; 873 gl_state.use_global = 0;
874 CHECK_NUMBER (character, 0); 874 CHECK_NUMBER (character);
875 char_int = XINT (character); 875 char_int = XINT (character);
876 return make_number (syntax_code_spec[(int) SYNTAX (char_int)]); 876 return make_number (syntax_code_spec[(int) SYNTAX (char_int)]);
877 } 877 }
878 878
879 DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0, 879 DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0,
882 Lisp_Object character; 882 Lisp_Object character;
883 { 883 {
884 int char_int, code; 884 int char_int, code;
885 gl_state.current_syntax_table = current_buffer->syntax_table; 885 gl_state.current_syntax_table = current_buffer->syntax_table;
886 gl_state.use_global = 0; 886 gl_state.use_global = 0;
887 CHECK_NUMBER (character, 0); 887 CHECK_NUMBER (character);
888 char_int = XINT (character); 888 char_int = XINT (character);
889 code = SYNTAX (char_int); 889 code = SYNTAX (char_int);
890 if (code == Sopen || code == Sclose) 890 if (code == Sopen || code == Sclose)
891 return SYNTAX_MATCH (char_int); 891 return SYNTAX_MATCH (char_int);
892 return Qnil; 892 return Qnil;
904 register unsigned char *p; 904 register unsigned char *p;
905 register enum syntaxcode code; 905 register enum syntaxcode code;
906 int val; 906 int val;
907 Lisp_Object match; 907 Lisp_Object match;
908 908
909 CHECK_STRING (string, 0); 909 CHECK_STRING (string);
910 910
911 p = XSTRING (string)->data; 911 p = XSTRING (string)->data;
912 code = (enum syntaxcode) syntax_spec_code[*p++]; 912 code = (enum syntaxcode) syntax_spec_code[*p++];
913 if (((int) code & 0377) == 0377) 913 if (((int) code & 0377) == 0377)
914 error ("invalid syntax description letter: %c", p[-1]); 914 error ("invalid syntax description letter: %c", p[-1]);
1010 between expressions. 1010 between expressions.
1011 usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */) 1011 usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */)
1012 (c, newentry, syntax_table) 1012 (c, newentry, syntax_table)
1013 Lisp_Object c, newentry, syntax_table; 1013 Lisp_Object c, newentry, syntax_table;
1014 { 1014 {
1015 CHECK_NUMBER (c, 0); 1015 CHECK_NUMBER (c);
1016 1016
1017 if (NILP (syntax_table)) 1017 if (NILP (syntax_table))
1018 syntax_table = current_buffer->syntax_table; 1018 syntax_table = current_buffer->syntax_table;
1019 else 1019 else
1020 check_syntax_table (syntax_table); 1020 check_syntax_table (syntax_table);
1313 `inhibit-field-text-motion' is non-nil. */) 1313 `inhibit-field-text-motion' is non-nil. */)
1314 (count) 1314 (count)
1315 Lisp_Object count; 1315 Lisp_Object count;
1316 { 1316 {
1317 int orig_val, val; 1317 int orig_val, val;
1318 CHECK_NUMBER (count, 0); 1318 CHECK_NUMBER (count);
1319 1319
1320 val = orig_val = scan_words (PT, XINT (count)); 1320 val = orig_val = scan_words (PT, XINT (count));
1321 if (! orig_val) 1321 if (! orig_val)
1322 val = XINT (count) > 0 ? ZV : BEGV; 1322 val = XINT (count) > 0 ? ZV : BEGV;
1323 1323
1397 int string_multibyte; 1397 int string_multibyte;
1398 int size_byte; 1398 int size_byte;
1399 unsigned char *str; 1399 unsigned char *str;
1400 int len; 1400 int len;
1401 1401
1402 CHECK_STRING (string, 0); 1402 CHECK_STRING (string);
1403 char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2); 1403 char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2);
1404 string_multibyte = STRING_MULTIBYTE (string); 1404 string_multibyte = STRING_MULTIBYTE (string);
1405 str = XSTRING (string)->data; 1405 str = XSTRING (string)->data;
1406 size_byte = STRING_BYTES (XSTRING (string)); 1406 size_byte = STRING_BYTES (XSTRING (string));
1407 1407
1425 } 1425 }
1426 1426
1427 if (NILP (lim)) 1427 if (NILP (lim))
1428 XSETINT (lim, forwardp ? ZV : BEGV); 1428 XSETINT (lim, forwardp ? ZV : BEGV);
1429 else 1429 else
1430 CHECK_NUMBER_COERCE_MARKER (lim, 0); 1430 CHECK_NUMBER_COERCE_MARKER (lim);
1431 1431
1432 /* In any case, don't allow scan outside bounds of buffer. */ 1432 /* In any case, don't allow scan outside bounds of buffer. */
1433 if (XINT (lim) > ZV) 1433 if (XINT (lim) > ZV)
1434 XSETFASTINT (lim, ZV); 1434 XSETFASTINT (lim, ZV);
1435 if (XINT (lim) < BEGV) 1435 if (XINT (lim) < BEGV)
1820 int found; 1820 int found;
1821 int count1; 1821 int count1;
1822 int out_charpos, out_bytepos; 1822 int out_charpos, out_bytepos;
1823 int dummy; 1823 int dummy;
1824 1824
1825 CHECK_NUMBER (count, 0); 1825 CHECK_NUMBER (count);
1826 count1 = XINT (count); 1826 count1 = XINT (count);
1827 stop = count1 > 0 ? ZV : BEGV; 1827 stop = count1 > 0 ? ZV : BEGV;
1828 1828
1829 immediate_quit = 1; 1829 immediate_quit = 1;
1830 QUIT; 1830 QUIT;
2404 and the depth is wrong, an error is signaled. 2404 and the depth is wrong, an error is signaled.
2405 If the depth is right but the count is not used up, nil is returned. */) 2405 If the depth is right but the count is not used up, nil is returned. */)
2406 (from, count, depth) 2406 (from, count, depth)
2407 Lisp_Object from, count, depth; 2407 Lisp_Object from, count, depth;
2408 { 2408 {
2409 CHECK_NUMBER (from, 0); 2409 CHECK_NUMBER (from);
2410 CHECK_NUMBER (count, 1); 2410 CHECK_NUMBER (count);
2411 CHECK_NUMBER (depth, 2); 2411 CHECK_NUMBER (depth);
2412 2412
2413 return scan_lists (XINT (from), XINT (count), XINT (depth), 0); 2413 return scan_lists (XINT (from), XINT (count), XINT (depth), 0);
2414 } 2414 }
2415 2415
2416 DEFUN ("scan-sexps", Fscan_sexps, Sscan_sexps, 2, 2, 0, 2416 DEFUN ("scan-sexps", Fscan_sexps, Sscan_sexps, 2, 2, 0,
2425 If the beginning or end is reached between groupings 2425 If the beginning or end is reached between groupings
2426 but before count is used up, nil is returned. */) 2426 but before count is used up, nil is returned. */)
2427 (from, count) 2427 (from, count)
2428 Lisp_Object from, count; 2428 Lisp_Object from, count;
2429 { 2429 {
2430 CHECK_NUMBER (from, 0); 2430 CHECK_NUMBER (from);
2431 CHECK_NUMBER (count, 1); 2431 CHECK_NUMBER (count);
2432 2432
2433 return scan_lists (XINT (from), XINT (count), 0, 1); 2433 return scan_lists (XINT (from), XINT (count), 0, 1);
2434 } 2434 }
2435 2435
2436 DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars, 2436 DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
2864 struct lisp_parse_state state; 2864 struct lisp_parse_state state;
2865 int target; 2865 int target;
2866 2866
2867 if (!NILP (targetdepth)) 2867 if (!NILP (targetdepth))
2868 { 2868 {
2869 CHECK_NUMBER (targetdepth, 3); 2869 CHECK_NUMBER (targetdepth);
2870 target = XINT (targetdepth); 2870 target = XINT (targetdepth);
2871 } 2871 }
2872 else 2872 else
2873 target = -100000; /* We won't reach this depth */ 2873 target = -100000; /* We won't reach this depth */
2874 2874