summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-05-03 23:02:59 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-05-03 23:02:59 +0200
commitd0e08087f58c2445eaee12fc43cf4ee3d9fbc08e (patch)
tree8a1af870a748cbdb9f72d4b037b1e0736136782f
parentnow unquoted variables allow spaces, risky ... (diff)
downloadbverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar.gz
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar.bz2
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar.lz
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar.xz
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.tar.zst
bverbose-d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e.zip
Diffstat (limited to '')
-rwxr-xr-xa.outbin17000 -> 17000 bytes
-rw-r--r--src/bvrcommands.c5
-rw-r--r--test/tape-test.bvr34
-rw-r--r--tmp/output.htm29
4 files changed, 27 insertions, 41 deletions
diff --git a/a.out b/a.out
index 3ed79d7..a79367d 100755
--- a/a.out
+++ b/a.out
Binary files differ
diff --git a/src/bvrcommands.c b/src/bvrcommands.c
index 5930222..54f6bda 100644
--- a/src/bvrcommands.c
+++ b/src/bvrcommands.c
@@ -73,13 +73,12 @@ int bvr_handle_move(FILE * input, FILE * output) {
item[++i] = '\0';
i = 0;
input_char = bvr_var_skip_separator_chars(input);
- value[i] = input_char;
while(input_char != ' ' && input_char != CLOSING_COMMAND_TAG_CHAR_1 && input_char != ',' && input_char != ';' && input_char != EOF &&
input_char != '\0' && input_char != '\n' && i < BVR_MAX_VARIABLE_SIZE) {
- value[++i] = input_char;
+ value[i++] = input_char;
input_char = fgetc(input);
}
- value[++i] = '\0';
+ value[i++] = '\0';
return bvr_var_mv(item, value);
fflush(output);
return SUCCESS;
diff --git a/test/tape-test.bvr b/test/tape-test.bvr
index e144aa4..525cccf 100644
--- a/test/tape-test.bvr
+++ b/test/tape-test.bvr
@@ -1,20 +1,24 @@
<@?s abc 1232@>
<@?g abc@>
+<@?m abc bbc@>
<@?g abc@>
-<@?s abc 123@>
-<@?g abc@>
-<@?g abc@>
-<@?s ab 12@>
-<@?g ab@>
-<@?g ab@>
-<@?s temp Ime mi je Anton Luka@>
-<@?g temp@>
+<@?g bbc@>
+
+# <@?g abc@>
+# <@?s abc 123@>
+# <@?g abc@>
+# <@?g abc@>
+# <@?s ab 12@>
+# <@?g ab@>
+# <@?g ab@>
+# <@?s temp Ime mi je Anton Luka@>
+# <@?g temp@>
# to je komentar in se ne rendera
-<@?1 post_author@>
-<@?2 image_caption This is an example image.@>
-<@?3 sexample.jpg@>
-<@#?4 image@>
-<@?5 image@>
-<@?6 image@>
-<@?7 image@>
+# <@?1 post_author@>
+# <@?2 image_caption This is an example image.@>
+# <@?3 sexample.jpg@>
+# <@#?4 image@>
+# <@?5 image@>
+# <@?6 image@>
+# <@?7 image@>
in tako so srečno živeli do konca svojih dni!
diff --git a/tmp/output.htm b/tmp/output.htm
index 1a48d4b..ce4890d 100644
--- a/tmp/output.htm
+++ b/tmp/output.htm
@@ -1,30 +1,13 @@
1232
-1232
-
-123
-123
-
-12
-12
-
-Ime mi je Anton Luka
-bVerbose unknown command 1
+command handler for m with argument "abc bbc" returned an error code.
+bvr_inline_command_processor returned an error status whilst composing test/tape-test.bvr
+1232
+BVR_UNDEFINED
+# # 123# BVR_UNDEFINED# # to je komentar in se ne rendera#
bVerbose unknown command 2
-
-
-bVerbose unknown command 3
-
-
-
-bVerbose unknown command 5
-
-
+# #
bVerbose unknown command 6
-
-
-bVerbose unknown command 7
-
in tako so srečno živeli do konca svojih dni!