| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This preserves the line numbers.
|
| |
|
| |
|
| |
|
|
|
|
| |
cppawk internally defines __cppawk_ver now.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
|
|
|
|
| |
Fix issue with interpolation of $prepro_opts in the case when
the awk program is in the command line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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").
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|