More readme additions and another debug line out fix.

This commit is contained in:
Edward R. Gonzalez 2023-03-31 17:26:02 -04:00
parent 6bc4346652
commit e301b400ba
3 changed files with 19 additions and 16 deletions

View File

@ -16,10 +16,12 @@ on:
inputs: inputs:
type: type:
description: 'Meson buildtype (release, debug, etc.)' description: 'Meson buildtype (release, debug, etc.)'
default: release
required: false required: false
test: test:
description: 'Run tests (test)' description: 'Run tests (test)'
default: test
required: false required: false
jobs: jobs:

View File

@ -12,7 +12,7 @@ Refactor c/c++ files (and problably others) with ease.
## Syntax ## Syntax
* `not` Omit word or namespace. * `not` Omit an a signature. (Modifies include, word, namespace, etc)
* `include` Preprocessor include `<file path>` related identifiers. * `include` Preprocessor include `<file path>` related identifiers.
* `word` Fixed sized identifier. * `word` Fixed sized identifier.
* `namespace` Variable sized identifiers, mainly intended to redefine c-namespace of an identifier. * `namespace` Variable sized identifiers, mainly intended to redefine c-namespace of an identifier.
@ -68,7 +68,7 @@ If the `test` parameter is provided to the build scripts, the project and thirdp
With the refactors applied a meson configuraiton is setup (`meson.build` in test) and run to build. So long as it compiles, the feature set of the current version should work fine. With the refactors applied a meson configuraiton is setup (`meson.build` in test) and run to build. So long as it compiles, the feature set of the current version should work fine.
* There is an extra file `stb_image` that is currently be parsed but its unused. * There is an extra file `stb_image` that is parsed but unused during compilation.
* Planned for use in the namespace addition todo. * Planned for use in the namespace addition todo.
## TODO: ## TODO:
@ -87,3 +87,5 @@ meet the signature of words or namespaces are refactored.
* This can honestly be done also with placing words on specific lines.. * This can honestly be done also with placing words on specific lines..
* Provide a GUI build. * Provide a GUI build.
* Provide as a single-header library. * Provide as a single-header library.
* Better tests:
* Automatically pull the zpl repo, refactor and format the library, and package the single header before using it in testing.

View File

@ -225,13 +225,18 @@ void refactor()
}; };
#define move_forward( Amount_ ) \ #define move_forward( Amount_ ) \
do { \
if ( left - Amount_ <= 0 ) \ if ( left - Amount_ <= 0 ) \
goto End_Search; \ goto End_Search; \
\ \
line += src[0] == '\n'; \ const sw end = Amount_ - 1; \
\
line += src[end] == '\n'; \
left -= Amount_; \ left -= Amount_; \
col = (col + Amount_) * src[0] != '\n'; \ col = (col + Amount_) * src[end] != '\n'; \
src += Amount_ \ src += Amount_; \
} \
while (0) \
#define restore( Snapshot_ ) \ #define restore( Snapshot_ ) \
src = Snapshot_.Src; \ src = Snapshot_.Src; \
@ -589,12 +594,6 @@ void refactor()
} }
Skip: Skip:
if ( src[0] == '\n' )
{
line++;
col = 0;
}
move_forward( 1 ); move_forward( 1 );
} }
while ( left ); while ( left );