aboutsummaryrefslogtreecommitdiff
path: root/src/casm.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2016-05-06 16:12:42 +0100
committerIan C <ianc@noddybox.co.uk>2016-05-06 16:12:42 +0100
commitd3713129e61a8953a61b8f15f7be6a3110197ed5 (patch)
tree2b6bc2e0ca728dc17bb3fbcba7632b6a929797e4 /src/casm.c
parent0b3c0e2a2e347db8af3f29d4dc8c86797981bc85 (diff)
Added simple library format.
Diffstat (limited to 'src/casm.c')
-rw-r--r--src/casm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/casm.c b/src/casm.c
index fb50532..aadd8b3 100644
--- a/src/casm.c
+++ b/src/casm.c
@@ -506,6 +506,16 @@ static CommandStatus NULLCMD(const char *label, int argc, char *argv[],
}
+static CommandStatus IMPORT(const char *label, int argc, char *argv[],
+ int quoted[], char *err, size_t errsize)
+{
+ CMD_ARGC_CHECK(2);
+
+ return LibLoad(argv[1], LibLoadAll, err, errsize) ? CMD_OK : CMD_FAILED;
+}
+
+
+
static struct
{
const char *cmd;
@@ -558,6 +568,8 @@ static struct
{".alias", ALIAS},
{"nullcmd", NULLCMD},
{".nullcmd", NULLCMD},
+ {"import", IMPORT},
+ {".import", IMPORT},
{NULL}
};