preprocessor

simple preprocessor for any type of file
git clone https://noulin.net/git/preprocessor.git
Log | Files | Refs | LICENSE

commit f6ef59eef0f97c0fc603272f7c019db42f5a9747
parent 5e15d89018bb9faf975d4e69daf3c2c1b5994f0e
Author: Remy Noulin <loader2x@gmail.com>
Date:   Wed,  3 Jun 2020 13:24:20 +0200

fix compile errors with libsheepy 1.1.2

package.yml    |  2 +-
preprocessor.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)

Diffstat:
Mpackage.yml | 2+-
Mpreprocessor.c | 16++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: preprocessor - version: 0.0.4 + version: 0.0.5 description: simple preprocessor for any type of file bin: ./preprocessor.c repository: diff --git a/preprocessor.c b/preprocessor.c @@ -177,7 +177,7 @@ internal smallArrayt *tagPass(smallArrayt *input_lines) { // cg: include or remove lines depending on tag value. char *status = "no tag"; - char *yes, *no, *changeStatus; + char *Yes, *No, *changeStatus; // support for inner tags in else closes createAllocateSmallArray(innerTags); forEachSmallArray(input_lines, L) { @@ -214,12 +214,12 @@ internal smallArrayt *tagPass(smallArrayt *input_lines) { else { if (startsWithG(tag, "not ")) { delG(tag, 0, 4); - yes = "remove lines"; - no = "keep lines"; + Yes = "remove lines"; + No = "keep lines"; } else { - yes = "keep lines"; - no = "remove lines"; + Yes = "keep lines"; + No = "remove lines"; } if (lenG(innerTags) > 0) { @@ -236,15 +236,15 @@ internal smallArrayt *tagPass(smallArrayt *input_lines) { if (eqG(changeStatus, "yes")) { if (hasG(tags, ssGet(tag))) { if (eqG(getG(tags, rtChar, ssGet(tag)), "0")) { - status = no; + status = No; } else { - status = yes; + status = Yes; } } else { // tag doesnt exit, same as tag = 0 - status = no; + status = No; } } pushG(innerTags, status);