diff options
author | Anton L. Šijanec <anton@sijanec.eu> | 2020-05-03 23:02:59 +0200 |
---|---|---|
committer | Anton L. Šijanec <anton@sijanec.eu> | 2020-05-03 23:02:59 +0200 |
commit | d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e (patch) | |
tree | 8a1af870a748cbdb9f72d4b037b1e0736136782f | |
parent | now unquoted variables allow spaces, risky ... (diff) | |
download | bverbose-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 |
-rwxr-xr-x | a.out | bin | 17000 -> 17000 bytes | |||
-rw-r--r-- | src/bvrcommands.c | 5 | ||||
-rw-r--r-- | test/tape-test.bvr | 34 | ||||
-rw-r--r-- | tmp/output.htm | 29 |
4 files changed, 27 insertions, 41 deletions
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! |