summaryrefslogtreecommitdiffstats
path: root/src/tape.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tape.c')
-rw-r--r--src/tape.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/tape.c b/src/tape.c
index 0492313..88d1950 100644
--- a/src/tape.c
+++ b/src/tape.c
@@ -17,31 +17,40 @@ int bvr_command_processor(FILE * page_source_file, FILE * temp_output_file) {
int command_handler_output = SUCCESS;;
// argument_feed = fmemopen (argument_string, strlen (argument_string), "r");
switch (command_entered) { // switch command
- case 'g':
+ case 'g': /* et */
command_handler_output = bvr_handle_get(page_source_file, temp_output_file);
break;
- case 's':
+ case 's': /* et */
command_handler_output = bvr_handle_set(page_source_file, temp_output_file);
break;
- case 'i':
+ case 'i': /* nclude */
command_handler_output = bvr_handle_include(page_source_file, temp_output_file);
break;
- case 'm':
+ case 'm': /* ove */
command_handler_output = bvr_handle_move(page_source_file, temp_output_file);
break;
- case 'f':
+ case 'f': /* i_ */
command_handler_output = bvr_handle_if(page_source_file, temp_output_file);
break;
- case '=':
+ case '=': /* */
command_handler_output = bvr_handle_equals(page_source_file, temp_output_file);
break;
- case '"':
+ case '"': /* */
command_handler_output = bvr_handle_string(page_source_file, temp_output_file);
break;
- case 'u':
+ case 'u': /* s_bstring*/
command_handler_output = bvr_handle_substring(page_source_file, temp_output_file);
break;
- case 'b':
+ case 'w': /* hile */
+ command_handler_output = bvr_handle_while(page_source_file, temp_output_file);
+ break;
+ case 'e': /* xplode */
+ command_handler_output = bvr_handle_explode(page_source_file, temp_output_file);
+ break;
+ case 'r': /* ačunanje */
+ command_handler_output = bvr_handle_math(page_source_file, temp_output_file);
+ break;
+ case 'b': /* unden */
// fprintf(stderr, "bunden %c\n", command_entered);
command_handler_output = bvr_handle_info(page_source_file, temp_output_file);
break;
@@ -133,7 +142,7 @@ int bvr_compose_stream(FILE * page_source_file, FILE * temp_output_file) {
// continue;
// }
if(copy_buffer[ftell(page_source_file)% COPY_BUFFER_SIZE] == EOF) {
- fputc('\n', temp_output_file); // NO POMEGRANTES! NO! NO! NO! NO POMEGRANTES!
+ fputc(' ', temp_output_file); // NO POMEGRANTES! NO! NO! NO! NO POMEGRANTES!
break;
}
if (cycles++ != 0) { // da ne napišemo prvega znaka bufferja, preden je sploh kaj v bufferju.