aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Keep empty cppawk-include directory.Kaz Kylheku2022-03-241-0/+1
|
* README: Roadmap section.Kaz Kylheku2022-03-231-2/+17
|
* get rid of <stdver.h> header.Kaz Kylheku2022-03-234-25/+25
| | | | cppawk internally defines __cppawk_ver now.
* Tail-call awk using exec.Kaz Kylheku2022-03-231-1/+1
| | | | | Why have cppawk in memory while awk is running; it's done its job.
* clearer code around handling of awk file's directory.Kaz Kylheku2022-03-231-1/+2
|
* move mocks into testdir.Kaz Kylheku2022-03-233-2/+2
|
* hygiene: shell escape $awk and $prepro.Kaz Kylheku2022-03-234-21/+14
| | | | | | | | Since $awk and $prepro are now controlled via command line options, and are being fed to eval, we should shell escape them. Two of our test cases rely on the loose interpolation behavior; we fix those using proper external mock programs testawk and testcpp.
* hygiene: what if $awk matches name of function?Kaz Kylheku2022-03-232-0/+21
| | | | | | | | We use the "command" command to make sure we are running an external awk and preprocessor. For instance if someone were to try "cppawk --awk=quote", that would be targetting the quote function inside cppawk and not that users Awk program that happens to be called "quote".
* Add options --prepro and --awk.Kaz Kylheku2022-03-233-5/+77
|
* README: condense, improve focus.Kaz Kylheku2022-03-231-72/+29
|
* bugfix: missing space breaks --prepro-only.Kaz Kylheku2022-03-222-1/+9
| | | | | Fix issue with interpolation of $prepro_opts in the case when the awk program is in the command line.
* README: add missing :::c.Kaz Kylheku2022-03-221-0/+1
|
* README: revise bullet 3.Kaz Kylheku2022-03-221-6/+14
|
* Continue README.Kaz Kylheku2022-03-221-7/+27
|
* Add markdown README.Kaz Kylheku2022-03-221-0/+93
|
* Handle situations when cpp breaks a line into pieces.Kaz Kylheku2022-03-192-3/+38
| | | | | | | | | | | | | | | | | | | There are situations in which GNU cpp breaks a single line of input into multiple lines. These are indicated by linemarkers that repeat the current line number, for instance: # 3 "file" this # 3 "file" is # 3 "file" all line three line four line five We now remove these repeat linemarkers and collapse the indicated lines back into one line, also eliminating the leading whitespace that tries to preserve the column.
* Add INSTALL file.Kaz Kylheku2022-03-181-0/+14
|
* Add cppawk-include directory and <stdver.h> header.Kaz Kylheku2022-03-184-0/+24
|
* Add awkloop example to man page.Kaz Kylheku2022-03-181-0/+25
|
* Simplify and revise quoting.Kaz Kylheku2022-03-182-12/+23
|
* Don't use absolute paths for gawk and cpp.Kaz Kylheku2022-03-182-5/+6
|
* Manual page.Kaz Kylheku2022-03-181-0/+186
|
* Ensure we pass -- before non-option arguments.Kaz Kylheku2022-03-181-2/+2
| | | | | | | | This is necessary even though our option processing has itself recognized the end of options. The reason is that we do not pass through -- to the list of awk options. (We cannot, because we add options after the awk options like this: $awk $awk_opts -f $tmp_file").
* Fix broken options quoting system.Kaz Kylheku2022-03-182-11/+15
| | | | | | Unquoting can't just be done with an interpolation into the command line; we have to construct an entire command as shell syntax and eval the whole thing.
* Rename shell_escape and syntax functions.Kaz Kylheku2022-03-181-12/+12
|
* Missing quoting in --prepro-only case.Kaz Kylheku2022-03-181-1/+1
|
* Protect against sed mistaking argument as option.Kaz Kylheku2022-03-181-1/+1
|
* Test -f option.Kaz Kylheku2022-03-183-1/+14
| | | | | | | | | Bugfix: because the preprocessed version of the file is in a temporary directory, #include "..." looks for files in that directory. We must tell the preprocessor to look for include files in the original directory. In the case when the awk script comes from the command line, we already took care of this by pointing the preprocessor to $(pwd).
* Handle quoting properly.Kaz Kylheku2022-03-182-5/+20
| | | | | | | | The problem is that if $var holds escaped syntax, we cannot just use it as command $var; the quotes become part of the argument. We must get the shell to process the quoted syntax, which requires eval. For this we define a function which lets us do command $(syntax "$var").
* Add --prepro-only option.Kaz Kylheku2022-03-182-5/+19
|
* Define __posix__ if -P or --posix option used.Kaz Kylheku2022-03-182-0/+13
|
* Define __bignum__ if -M or --bignum option used.Kaz Kylheku2022-03-182-0/+13
|
* Add __gawk__ predefined preprocessor symbol.Kaz Kylheku2022-03-182-3/+13
|
* Fix missing: pass -I to preprocessor.Kaz Kylheku2022-03-183-1/+17
|
* Basic preprocessor test.Kaz Kylheku2022-03-181-0/+12
|
* Add runtests script.Kaz Kylheku2022-03-181-0/+2
|
* More invocation error test cases.Kaz Kylheku2022-03-181-0/+45
|
* Check that -f without argument fails.Kaz Kylheku2022-03-182-3/+17
|
* Allow gawk -M option.Kaz Kylheku2022-03-182-1/+5
|
* Start test case implementation.Kaz Kylheku2022-03-182-0/+28
|
* Remove hash-bang lines from awk code.Kaz Kylheku2022-03-181-2/+5
|
* First working version.Kaz Kylheku2022-03-171-0/+118
|
* NILKaz Kylheku2022-03-170-0/+0