diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:27 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:27 -0800 |
commit | c7d035ae1a729232579a0fe41ed5affa131d3623 (patch) | |
tree | fb387f7c2a8e01cf603d4c75fbbaa68f711df986 /rgx.c | |
parent | deda2c0fd8689349fea2a900199a76ff7ecb319e (diff) | |
download | scm-c7d035ae1a729232579a0fe41ed5affa131d3623.tar.gz scm-c7d035ae1a729232579a0fe41ed5affa131d3623.zip |
Import Upstream version 5d9upstream/5d9
Diffstat (limited to 'rgx.c')
-rw-r--r-- | rgx.c | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -55,7 +55,7 @@ #endif static char rcsid[] = - "$Id: rgx.c,v 1.15 2002/04/13 20:41:02 jaffer Exp $"; + "$Id: rgx.c,v 1.16 2002/11/25 20:34:31 jaffer Exp $"; #ifdef HAVE_ALLOCA # include <alloca.h> @@ -161,7 +161,7 @@ SCM lregerror(scode) int len; #endif SCM str; - ASSERT(INUMP(scode), scode, ARG1, s_regerror); + ASRTER(INUMP(scode), scode, ARG1, s_regerror); code = INUM(scode); if (code < 0) return makfromstr("Invalid code", sizeof("Invalid code")-1); @@ -192,8 +192,8 @@ SCM lregcomp(pattern, flags) char *err_msg; #endif - ASSERT(NIMP(pattern) && STRINGP(pattern), pattern, ARG1, s_regcomp); - ASSERT(UNBNDP(flags) || (NIMP(flags) && STRINGP(flags)), + ASRTER(NIMP(pattern) && STRINGP(pattern), pattern, ARG1, s_regcomp); + ASRTER(UNBNDP(flags) || (NIMP(flags) && STRINGP(flags)), flags, ARG2, s_regcomp); DEFER_INTS; z = must_malloc_cell((long)sizeof(regex_info), (SCM)tc16_rgx, s_regex); @@ -302,8 +302,8 @@ SCM lregexec(prog, str) ALLOCA_PROTECT; FIXUP_REGEXP(prog); - ASSERT(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regexec); - ASSERT(NIMP(str) && STRINGP(str), str, ARG2, s_regexec); + ASRTER(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regexec); + ASRTER(NIMP(str) && STRINGP(str), str, ARG2, s_regexec); #ifdef _GNU_SOURCE return lregsearchv(prog, str, EOL); @@ -334,8 +334,8 @@ SCM lregmatp(prog, str) SCM prog, str; { FIXUP_REGEXP(prog); - ASSERT(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regmatp); - ASSERT(NIMP(str) && STRINGP(str), str, ARG2, s_regmatp); + ASRTER(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regmatp); + ASRTER(NIMP(str) && STRINGP(str), str, ARG2, s_regmatp); #ifdef _GNU_SOURCE return (lregsearch(prog, str, EOL)==BOOL_F)?BOOL_F:BOOL_T; @@ -367,11 +367,11 @@ SCM lregsearchmatch(prog, str, args, search, vector) ALLOCA_PROTECT; FIXUP_REGEXP(prog); - ASSERT(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regsearch); - ASSERT(NIMP(str) && STRINGP(str), str, ARG2, s_regsearch); - ASSERT(len<=2, args, WNA, s_regsearch); - ASSERT((len<1)||(INUMP(CAR(args))), CAR(args), ARG3, s_regsearch); - ASSERT((len<2)||(INUMP(CAR(CDR(args)))), CAR(CDR(args)), ARG4, s_regsearch); + ASRTER(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_regsearch); + ASRTER(NIMP(str) && STRINGP(str), str, ARG2, s_regsearch); + ASRTER(len<=2, args, WNA, s_regsearch); + ASRTER((len<1)||(INUMP(CAR(args))), CAR(args), ARG3, s_regsearch); + ASRTER((len<2)||(INUMP(CAR(CDR(args)))), CAR(CDR(args)), ARG4, s_regsearch); start = (len>=1)?(INUM(CAR(args))):0; size = (len>=2)?(INUM(CAR(CDR(args)))):LENGTH(str); @@ -503,8 +503,8 @@ SCM stringsplitutil(prog, str, vector) SCM st_start, st_end; FIXUP_REGEXP(prog); - ASSERT(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_stringsplit); - ASSERT(NIMP(str) && STRINGP(str), str, ARG2, s_stringsplit); + ASRTER(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_stringsplit); + ASRTER(NIMP(str) && STRINGP(str), str, ARG2, s_stringsplit); substrings = EOL; anchor = 0; @@ -599,16 +599,16 @@ SCM lstringedit(prog, editspec, args) args_len = ilength(args); FIXUP_REGEXP(prog); - ASSERT(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_stringedit); - ASSERT(NIMP(editspec) && STRINGP(editspec), editspec, ARG2, s_stringedit); - ASSERT((args_len==1)||(args_len==2), args, WNA, s_stringedit); + ASRTER(NIMP(prog) && tc16_rgx==CAR(prog), prog, ARG1, s_stringedit); + ASRTER(NIMP(editspec) && STRINGP(editspec), editspec, ARG2, s_stringedit); + ASRTER((args_len==1)||(args_len==2), args, WNA, s_stringedit); str = CAR(args); - ASSERT(NIMP(str)&&STRINGP(str), str, ARG3, s_stringedit); + ASRTER(NIMP(str)&&STRINGP(str), str, ARG3, s_stringedit); if (args_len==2) { count = CAR(CDR(args)); - ASSERT(INUMP(count)||(count==BOOL_T), count, ARG4, s_stringedit); + ASRTER(INUMP(count)||(count==BOOL_T), count, ARG4, s_stringedit); } else count = MAKINUM(1); |