| download | motivation | current state |
libmawk
Libmawk is a fork of mawk 1.3.3 restructured for embedding. This means the
user gets libmawk.h and libmawk.so and can embed awk scripting language
in any application written in C. Why? Because
awk is my favorite programming language.
If you are interested in the project, you may want to
download the sources.
features
Libmawk has the following main features:
- load and run multiple awk scripts independently, in parallel
- scripts do not read stdin but a memory buffer the embedding process can fill from time to time
- running scripts in (mostly) non-blocking manner - that is, the script will not block if the process can not provide new input
- all these without threads or fork()
- call awk functions from C, using vararg for smooth integration
- call C functions from awk scripts
- resolve existing awk variables from C - read or write variables
- language extensions (both in the lib and executable version)
- dynamic function calls (call functions by name using call() and acall())
- dynamic variable value fetch (valueof() returns the value of a variable by name)
- include "source.awk" allows an awk source to include another awk source
License
Since mawk is licensed under the GNU GPL v2 and libmawk is a fork of
mawk, libmawk is licensed under the GNU GPL v2 too.