diff options
author | Anton L. Šijanec <anton@sijanec.eu> | 2020-05-05 21:35:34 +0200 |
---|---|---|
committer | Anton L. Šijanec <anton@sijanec.eu> | 2020-05-05 21:35:34 +0200 |
commit | 954de8fea4bf669d58c7ae6886bd0bc7558699e0 (patch) | |
tree | d25f192b501bb378a62de6c554ee78e6f871863f | |
parent | include finnally works to a usable extent. (diff) | |
download | bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.gz bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.bz2 bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.lz bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.xz bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.tar.zst bverbose-954de8fea4bf669d58c7ae6886bd0bc7558699e0.zip |
-rwxr-xr-x | a.out | bin | 21132 -> 21132 bytes | |||
-rw-r--r-- | src/bvrcommands.c | 17 | ||||
-rw-r--r-- | test/tape-test.bvr | 2 | ||||
-rw-r--r-- | tmp/output.htm | 5 |
4 files changed, 18 insertions, 6 deletions
Binary files differ diff --git a/src/bvrcommands.c b/src/bvrcommands.c index aac4800..f08c0ab 100644 --- a/src/bvrcommands.c +++ b/src/bvrcommands.c @@ -74,11 +74,20 @@ int bvr_handle_include(FILE * input, FILE * output) { while(stream == NULL) { singlepath = strrchr(path, BVR_PATH_SEPARATOR); if(singlepath == NULL) { - stream = fopen(path, "r"); // ob1 fuckery + strcpy(notgoodatnamingvariables, path); + strcat(notgoodatnamingvariables, item); + stream = fopen(notgoodatnamingvariables, "r"); // ob1 fuckery if(stream == NULL) { - fprintf(output, "\nbVerbose include error. File %s not found.\n", item); - fprintf(stderr, "[bvrcommands.c] bvr_handle_include: File %s not found.\n", item); - return FAILURE; + strcpy(notgoodatnamingvariables, path); + strcat(notgoodatnamingvariables, item); + strcat(notgoodatnamingvariables, BVR_COMMAND_FILE_EXT); + stream = fopen(notgoodatnamingvariables, "r"); // ob1 fuckery + if(stream == NULL) { + fprintf(output, "\nbVerbose include error. File %s not found.\n", item); + fprintf(stderr, "[bvrcommands.c] bvr_handle_include: File %s not found.\n", item); + return FAILURE; + } + break; } break; } diff --git a/test/tape-test.bvr b/test/tape-test.bvr index 1bf8761..0d4e496 100644 --- a/test/tape-test.bvr +++ b/test/tape-test.bvr @@ -1,5 +1,5 @@ <@?i assets/content/global.bvr @> -<@?i krneki@> +<@?i krneski @> # <@?g post_slug @> # <@?g bvr_include_path @> # <@?i tape-test-to-includes @> diff --git a/tmp/output.htm b/tmp/output.htm index b72385b..0117a70 100644 --- a/tmp/output.htm +++ b/tmp/output.htm @@ -19,5 +19,8 @@ -krneki123 +bVerbose include error. File krneski not found. +command handler for i with argument "krneski" returned an error code. + +bvr_inline_command_processor returned an error status. |