From d0e08087f58c2445eaee12fc43cf4ee3d9fbc08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20L=2E=20=C5=A0ijanec?= Date: Sun, 3 May 2020 23:02:59 +0200 Subject: funtions with variables now include move --- a.out | Bin 17000 -> 17000 bytes src/bvrcommands.c | 5 ++--- test/tape-test.bvr | 34 +++++++++++++++++++--------------- tmp/output.htm | 29 ++++++----------------------- 4 files changed, 27 insertions(+), 41 deletions(-) diff --git a/a.out b/a.out index 3ed79d7..a79367d 100755 Binary files a/a.out and b/a.out 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! -- cgit v1.2.3