From b9bd8526f055eeef0acc42c269eb5ec67546159f Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Mon, 2 Aug 2004 16:14:04 +0000 Subject: * numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num, scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long): Discouraged by moving to discouraged.h and discouraged.c and reimplementing in terms of scm_from_* and scm_to_*. Changed all uses to the new scm_from_* and scm_to_* functions. --- libguile/regex-posix.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'libguile/regex-posix.c') diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 20d4e9274..7bc4dfa76 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -257,10 +257,12 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0, SCM_VECTOR_SET(mvec,0, str); for (i = 0; i < nmatches; ++i) if (matches[i].rm_so == -1) - SCM_VECTOR_SET(mvec,i+1, scm_cons (scm_from_int (-1), scm_from_int (-1))); + SCM_VECTOR_SET(mvec, i+1, + scm_cons (scm_from_int (-1), scm_from_int (-1))); else - SCM_VECTOR_SET(mvec,i+1,scm_cons (scm_long2num (matches[i].rm_so + offset), - scm_long2num (matches[i].rm_eo + offset))); + SCM_VECTOR_SET(mvec, i+1, + scm_cons (scm_from_long (matches[i].rm_so + offset), + scm_from_long (matches[i].rm_eo + offset))); } free (matches); SCM_ALLOW_INTS; @@ -282,14 +284,14 @@ scm_init_regex_posix () scm_set_smob_free (scm_tc16_regex, regex_free); /* Compilation flags. */ - scm_c_define ("regexp/basic", scm_long2num (REG_BASIC)); - scm_c_define ("regexp/extended", scm_long2num (REG_EXTENDED)); - scm_c_define ("regexp/icase", scm_long2num (REG_ICASE)); - scm_c_define ("regexp/newline", scm_long2num (REG_NEWLINE)); + scm_c_define ("regexp/basic", scm_from_long (REG_BASIC)); + scm_c_define ("regexp/extended", scm_from_long (REG_EXTENDED)); + scm_c_define ("regexp/icase", scm_from_long (REG_ICASE)); + scm_c_define ("regexp/newline", scm_from_long (REG_NEWLINE)); /* Execution flags. */ - scm_c_define ("regexp/notbol", scm_long2num (REG_NOTBOL)); - scm_c_define ("regexp/noteol", scm_long2num (REG_NOTEOL)); + scm_c_define ("regexp/notbol", scm_from_long (REG_NOTBOL)); + scm_c_define ("regexp/noteol", scm_from_long (REG_NOTEOL)); #include "libguile/regex-posix.x" -- cgit v1.2.3