diff options
| author | Mistivia <i@mistivia.com> | 2025-06-26 19:18:56 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-06-26 19:33:00 +0800 |
| commit | 0ba662762023b7e3788690d9990ab39e89fd6f34 (patch) | |
| tree | ade9d378c7a8e7c04ed7242626c07f889686e2a5 /src/builtins.c | |
| parent | e05a649c3b5b97f04756d8d08f8b8d6b5d8e672c (diff) | |
add webassembly build; readline dep is optional
Diffstat (limited to 'src/builtins.c')
| -rw-r--r-- | src/builtins.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/builtins.c b/src/builtins.c index 950c2c7..9dcf497 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -8,12 +8,12 @@ #include <math.h> SExpRef builtin_charp(Interp *interp, SExpRef args) { - if (LENGTH(args) != 1) return new_error(interp, "char?: arg num error."); + if (LENGTH(args) != 1) return new_error(interp, "char?: arg num error.\n"); return new_boolean(interp, VALTYPE(CAR(args)) == kCharSExp); } SExpRef builtin_char_eq(Interp *interp, SExpRef args) { - if (LENGTH(args) != 2) return new_error(interp, "char=: arg num error."); + if (LENGTH(args) != 2) return new_error(interp, "char=: arg num error.\n"); if (VALTYPE(CAR(args)) != kCharSExp || VALTYPE(CADR(args)) != kCharSExp) { return new_error(interp, "char=: type error.\n"); } @@ -23,7 +23,7 @@ SExpRef builtin_char_eq(Interp *interp, SExpRef args) { } SExpRef builtin_char_gt(Interp *interp, SExpRef args) { - if (LENGTH(args) != 2) return new_error(interp, "char>: arg num error."); + if (LENGTH(args) != 2) return new_error(interp, "char>: arg num error.\n"); if (VALTYPE(CAR(args)) != kCharSExp || VALTYPE(CADR(args)) != kCharSExp) { return new_error(interp, "char>: type error.\n"); } @@ -33,7 +33,7 @@ SExpRef builtin_char_gt(Interp *interp, SExpRef args) { } SExpRef builtin_char_lt(Interp *interp, SExpRef args) { - if (LENGTH(args) != 2) return new_error(interp, "char<: arg num error."); + if (LENGTH(args) != 2) return new_error(interp, "char<: arg num error.\n"); if (VALTYPE(CAR(args)) != kCharSExp || VALTYPE(CADR(args)) != kCharSExp) { return new_error(interp, "char<: type error.\n"); } |
