From 2c7fe440e9e269356296af91cbfb2937b5f6b582 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Mon, 26 Aug 2019 22:52:55 +0300 Subject: [PATCH] Add changes from missed in last commit --- c/algo_color.c | 21 +-------------------- c/argcount.c | 24 ++++++++++++++++++++++++ c/scheme.h | 25 +++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 20 deletions(-) create mode 100644 c/argcount.c create mode 100644 c/scheme.h diff --git a/c/algo_color.c b/c/algo_color.c index d85605e..bb63c63 100644 --- a/c/algo_color.c +++ b/c/algo_color.c @@ -12,26 +12,7 @@ #include #include -#include "dtypes.h" -#include "utils.h" -#include "utf8.h" -#include "ios.h" -#include "socket.h" -#include "timefuncs.h" -#include "hashing.h" -#include "htable.h" -#include "htableh_inc.h" -#include "bitvector.h" -#include "os.h" -#include "random.h" -#include "llt.h" - -#include "flisp.h" - -#include "error.h" - -#include "argcount.h" -#include "builtins.h" +#include "scheme.h" static char color_name_table[] = diff --git a/c/argcount.c b/c/argcount.c new file mode 100644 index 0000000..899c23d --- /dev/null +++ b/c/argcount.c @@ -0,0 +1,24 @@ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "scheme.h" + +void argcount(const char *fname, uint32_t nargs, uint32_t c) +{ + if (__unlikely(nargs != c)) + lerrorf(ArgError, "%s: too %s arguments", fname, + nargs < c ? "few" : "many"); +} diff --git a/c/scheme.h b/c/scheme.h new file mode 100644 index 0000000..3bfa244 --- /dev/null +++ b/c/scheme.h @@ -0,0 +1,25 @@ +#include "dtypes.h" +#include "utils.h" +#include "utf8.h" +#include "ios.h" +#include "socket.h" +#include "timefuncs.h" +#include "hashing.h" +#include "htable.h" +#include "bitvector.h" +#include "os.h" +#include "random.h" +#include "llt.h" +#include "ieee754.h" +#include "flisp.h" +#include "error.h" +#include "buf.h" +#include "argcount.h" +#include "env.h" +#include "opcodes.h" +#include "htableh_inc.h" +#include "libraries.h" +#include "os.h" +#include "builtins.h" +#include "libraries.h" +#include "stringfuncs.h"