#define FUNC_NAME s_scm_read_history
{
SCM_VALIDATE_STRING (1,file);
- return SCM_NEGATE_BOOL (read_history (SCM_STRING_CHARS (file)));
+ return scm_from_bool (!read_history (SCM_STRING_CHARS (file)));
}
#undef FUNC_NAME
#define FUNC_NAME s_scm_write_history
{
SCM_VALIDATE_STRING (1,file);
- return SCM_NEGATE_BOOL (write_history (SCM_STRING_CHARS (file)));
+ return scm_from_bool (!write_history (SCM_STRING_CHARS (file)));
}
#undef FUNC_NAME
SCM_ASSERT (pred_tramp, pred, SCM_ARG1, FUNC_NAME);
for ( ; SCM_CONSP (lst1); lst1 = SCM_CDR (lst1))
- count += ! SCM_FALSEP (pred_tramp (pred, SCM_CAR (lst1)));
+ count += scm_is_true (pred_tramp (pred, SCM_CAR (lst1)));
end_lst1:
SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (lst1), lst1, SCM_ARG2, FUNC_NAME,
FUNC_NAME, "list");
break;
}
- count += ! SCM_FALSEP (pred_tramp
- (pred, SCM_CAR (lst1), SCM_CAR (lst2)));
+ count += scm_is_true (pred_tramp
+ (pred, SCM_CAR (lst1), SCM_CAR (lst2)));
lst1 = SCM_CDR (lst1);
lst2 = SCM_CDR (lst2);
}
SCM_SETCAR (l, SCM_CDR (lst)); /* keep rest of lst */
}
- count += ! SCM_FALSEP (scm_apply (pred, args, SCM_EOL));
+ count += scm_is_true (scm_apply (pred, args, SCM_EOL));
}
}
done:
for ( ; SCM_CONSP (lst); lst = SCM_CDR (lst))
{
- if (! SCM_FALSEP (equal_p (pred, x, SCM_CAR (lst))))
+ if (scm_is_true (equal_p (pred, x, SCM_CAR (lst))))
{
/* delete this element, so copy from keeplst (inclusive) to lst
(exclusive) onto ret */
SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
- if (! SCM_FALSEP (equal_p (pred, x, SCM_CAR (walk))))
+ if (scm_is_true (equal_p (pred, x, SCM_CAR (walk))))
*prev = SCM_CDR (walk);
else
prev = SCM_CDRLOC (walk);
/* loop searching ret upto lst */
for (l = ret; ! SCM_EQ_P (l, lst); l = SCM_CDR (l))
{
- if (! SCM_FALSEP (equal_p (pred, SCM_CAR (l), item)))
+ if (scm_is_true (equal_p (pred, SCM_CAR (l), item)))
{
/* duplicate, don't want this element, so copy keeplst
(inclusive) to lst (exclusive) onto ret */
l = ret;
for (;;)
{
- if (! SCM_FALSEP (equal_p (pred, SCM_CAR (l), item)))
+ if (scm_is_true (equal_p (pred, SCM_CAR (l), item)))
break; /* equal, forget this element */
if (SCM_EQ_P (l, endret))
}
for (; !SCM_NULL_OR_NIL_P (lst); lst = SCM_CDR (lst))
{
- if (!SCM_FALSEP (equal_p (pred, SCM_CAR (lst), x)))
+ if (scm_is_true (equal_p (pred, SCM_CAR (lst), x)))
return lst;
}
return SCM_BOOL_F;
SCM tmp = SCM_CAR (ls);
SCM_ASSERT_TYPE (SCM_CONSP (tmp), alist, SCM_ARG2, FUNC_NAME,
"association list");
- if (SCM_NFALSEP (equal_p (pred, SCM_CAR (tmp), key)))
+ if (scm_is_true (equal_p (pred, SCM_CAR (tmp), key)))
return tmp;
}
SCM_ASSERT_TYPE (SCM_NULL_OR_NIL_P (ls), alist, SCM_ARG2, FUNC_NAME,
for (; !SCM_NULL_OR_NIL_P (list); list = SCM_CDR(list)) {
SCM elt = SCM_CAR(list);
SCM new_tail = scm_cons(SCM_CAR(list), SCM_EOL);
- if (SCM_NFALSEP(call(pred, elt))) {
+ if (scm_is_true (call (pred, elt))) {
SCM_SETCDR(kept_tail, new_tail);
kept_tail = new_tail;
}
while (cstart < cend)
{
res = scm_call_1 (pred, SCM_MAKE_CHAR (*cstr));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
return res;
cstr++;
cstart++;
while (cstart < cend)
{
res = scm_call_1 (pred, SCM_MAKE_CHAR (*cstr));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
return res;
cstr++;
cstart++;
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
break;
cstart++;
}
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend - 1]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
break;
cend--;
}
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
break;
cstart++;
}
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend - 1]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
break;
cend--;
}
while (cstart1 < cend1 && cstart2 < cend2)
{
if (cstr1[cstart1] != cstr2[cstart2])
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
len++;
cstart1++;
cstart2++;
}
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
}
#undef FUNC_NAME
while (cstart1 < cend1 && cstart2 < cend2)
{
if (scm_c_downcase (cstr1[cstart1]) != scm_c_downcase (cstr2[cstart2]))
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
len++;
cstart1++;
cstart2++;
}
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
}
#undef FUNC_NAME
cend1--;
cend2--;
if (cstr1[cend1] != cstr2[cend2])
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
len++;
}
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
}
#undef FUNC_NAME
cend1--;
cend2--;
if (scm_c_downcase (cstr1[cend1]) != scm_c_downcase (cstr2[cend2]))
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
len++;
}
- return SCM_BOOL (len == len1);
+ return scm_from_bool (len == len1);
}
#undef FUNC_NAME
{
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
return SCM_MAKINUM (cstart);
cstart++;
}
SCM res;
cend--;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
return SCM_MAKINUM (cend);
}
}
{
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
return SCM_MAKINUM (cstart);
cstart++;
}
SCM res;
cend--;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cend]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
return SCM_MAKINUM (cend);
}
}
{
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[cstart]));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
count++;
cstart++;
}
sz = SCM_STRING_UCHARS (str);
for(i = start; i < end; i++)
{
- if (!SCM_FALSEP (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i]))))
+ if (scm_is_true (scm_char_alphabetic_p (SCM_MAKE_CHAR (sz[i]))))
{
if (!in_word)
{
SCM_VALIDATE_PROC (6, make_final);
res = scm_call_1 (p, seed);
- while (SCM_FALSEP (res))
+ while (scm_is_false (res))
{
SCM str;
SCM ch = scm_call_1 (f, seed);
SCM_VALIDATE_PROC (6, make_final);
res = scm_call_1 (p, seed);
- while (SCM_FALSEP (res))
+ while (scm_is_false (res))
{
SCM str;
SCM ch = scm_call_1 (f, seed);
{
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[idx]));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
ls = scm_cons (SCM_MAKE_CHAR (cstr[idx]), ls);
idx++;
}
{
SCM res;
res = scm_call_1 (char_pred, SCM_MAKE_CHAR (cstr[idx]));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
ls = scm_cons (SCM_MAKE_CHAR (cstr[idx]), ls);
idx++;
}
"otherwise.")
#define FUNC_NAME s_scm_char_set_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_charset, obj));
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_charset, obj));
}
#undef FUNC_NAME
int ccursor;
SCM_VALIDATE_INUM_MIN_COPY (1, cursor, 0, ccursor);
- return SCM_BOOL (ccursor >= SCM_CHARSET_SIZE);
+ return scm_from_bool (ccursor >= SCM_CHARSET_SIZE);
}
#undef FUNC_NAME
result = make_char_set (FUNC_NAME);
tmp = scm_call_1 (p, seed);
- while (SCM_FALSEP (tmp))
+ while (scm_is_false (tmp))
{
SCM ch = scm_call_1 (f, seed);
if (!SCM_CHARP (ch))
SCM_VALIDATE_SMOB (5, base_cs, charset);
tmp = scm_call_1 (p, seed);
- while (SCM_FALSEP (tmp))
+ while (scm_is_false (tmp))
{
SCM ch = scm_call_1 (f, seed);
if (!SCM_CHARP (ch))
{
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
p[k / SCM_BITS_PER_LONG] |= 1L << (k % SCM_BITS_PER_LONG);
}
}
{
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
p[k / SCM_BITS_PER_LONG] |= 1L << (k % SCM_BITS_PER_LONG);
}
}
SCM_ASSERT_RANGE (2, upper, cupper >= 0 && cupper >= clower);
if (!SCM_UNBNDP (error))
{
- if (!SCM_FALSEP (error))
+ if (scm_is_true (error))
{
SCM_ASSERT_RANGE (1, lower, clower <= SCM_CHARSET_SIZE);
SCM_ASSERT_RANGE (2, upper, cupper <= SCM_CHARSET_SIZE);
SCM_VALIDATE_INUM_COPY (2, upper, cupper);
SCM_ASSERT_RANGE (1, lower, clower >= 0);
SCM_ASSERT_RANGE (2, upper, cupper >= 0 && cupper >= clower);
- if (!SCM_FALSEP (error))
+ if (scm_is_true (error))
{
SCM_ASSERT_RANGE (1, lower, clower <= SCM_CHARSET_SIZE);
SCM_ASSERT_RANGE (2, upper, cupper <= SCM_CHARSET_SIZE);
if (SCM_CHARSET_GET (cs, k))
{
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
count++;
}
return SCM_MAKINUM (count);
{
SCM_VALIDATE_SMOB (1, cs, charset);
SCM_VALIDATE_CHAR (2, ch);
- return SCM_BOOL (SCM_CHARSET_GET (cs, SCM_CHAR (ch)));
+ return scm_from_bool (SCM_CHARSET_GET (cs, SCM_CHAR (ch)));
}
#undef FUNC_NAME
if (SCM_CHARSET_GET (cs, k))
{
res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
- if (SCM_FALSEP (res))
+ if (scm_is_false (res))
return res;
}
return res;
if (SCM_CHARSET_GET (cs, k))
{
SCM res = scm_call_1 (pred, SCM_MAKE_CHAR (k));
- if (!SCM_FALSEP (res))
+ if (scm_is_true (res))
return res;
}
return SCM_BOOL_F;
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_u8vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_U8);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_U8);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_s8vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_S8);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_S8);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_u16vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_U16);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_U16);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_s16vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_S16);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_S16);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_u32vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_U32);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_U32);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_s32vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_S32);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_S32);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_u64vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_U64);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_U64);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_s64vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_S64);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_S64);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_f32vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_F32);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_F32);
}
#undef FUNC_NAME
"@code{#f} otherwise.")
#define FUNC_NAME s_scm_f64vector_p
{
- return SCM_BOOL (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
- SCM_UVEC_TYPE (obj) == SCM_UVEC_F64);
+ return scm_from_bool (SCM_SMOB_PREDICATE (scm_tc16_uvec, obj) &&
+ SCM_UVEC_TYPE (obj) == SCM_UVEC_F64);
}
#undef FUNC_NAME