diff --git a/Makefile b/Makefile index 5fa4c99..576111a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # (C) Copyright 2014-2021 Chris Dorman, some rights reserved (GPLv2) # Some changes and tweaks from Menchers -VERSION = \"0.5.1\" +VERSION = \"0.5.2\" VERSION_EXTRA = \"$(EXTRA)\" PREFIX ?= /usr diff --git a/Makefile.musl b/Makefile.musl index a2fd7b3..7653de9 100644 --- a/Makefile.musl +++ b/Makefile.musl @@ -2,7 +2,7 @@ # (C) Copyright 2014-2021 Chris Dorman, some rights reserved (GPLv2) # Some changes and tweaks from Menchers -VERSION = \"0.5.1\" +VERSION = \"0.5.2\" VERSION_EXTRA = \"$(EXTRA)\" PREFIX ?= /usr diff --git a/README.txt b/README.txt index d3246c3..86eb2b7 100644 --- a/README.txt +++ b/README.txt @@ -32,6 +32,11 @@ at this moment! * Commenting! Examples: * # Comment is real in this one +* Comp and loop functions: + * comp: "1" "1" -> compares integer 1 and 1 -> returns true + * comp: "true" "false" -> compares string true and false -> returns false + * loop: 3; print "Hello world!" -> Will loop print "Hello world!" 3 times. + * Read, write, and cat(enate) functions. Examples: * write "file.txt" "This will be written to file.txt" * read "file.txt" @@ -147,6 +152,10 @@ Changelog Changes between version bumps in SlideScript. Hoping to have a lightweight top-down scripting language by V1.0.0 release! From there it will be molding and preserving the art. +* V0.5.2 + * Bugfixes and tweaks + * Added loop and comp(are) statements + * V0.5.1 * Compression and decompression bugfixes * System working functions (move, chdir, and showpath) diff --git a/src/lexer.c b/src/lexer.c index ae3c3ce..3c5eacf 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -103,7 +103,7 @@ char *process_line(char *line) // IF statement - else if(strncmp("if:", tok_srch, 3) == 0) + else if(strncmp("comp:", tok_srch, 5) == 0) { if(compbuf != NULL) { @@ -522,7 +522,7 @@ char *process_line(char *line) sprintf(comp_size, "%s", origsize); fclose(in); - for(uint32_t i = 1; i < 5; ++i) + for(uint32_t i = 1; i < 11; ++i) { uint32_t comp_return = ss_compress(filename, file_comp, i); uint32_t deco_return = ss_decompress(file_comp, filedecout);