diff options
author | John Ankarström <john@ankarstrom.se> | 2020-10-23 02:11:59 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-10-23 02:11:59 +0200 |
commit | c3143fbdb7ea46539023e11cb30a7b14434030f3 (patch) | |
tree | e2a4394e0b3d8c6a882c82637a08823e6e5b5043 /src/tt.c | |
parent | 24da48a86bb542be247127258db5fcafab4ba011 (diff) | |
download | tt-c3143fbdb7ea46539023e11cb30a7b14434030f3.tar.gz |
release 1.2
Diffstat (limited to 'src/tt.c')
-rw-r--r-- | src/tt.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/tt.c b/src/tt.c new file mode 100644 index 0000000..8a5c777 --- /dev/null +++ b/src/tt.c @@ -0,0 +1,46 @@ +// tt.c -- tangle to, written by John Ankarström -> tt.c + +#include <stdio.h> + +#ifdef _WIN32 +#include <shlwapi.h> +#pragma comment(lib, "Shlwapi.lib") +#else +#include <ctype.h> +#include <errno.h> +#include <string.h> +#include <strings.h> +#include <stdlib.h> +#include <sys/stat.h> +#endif + +<<definitions>> + +#define err(code, string) do { fprintf(stderr, "%s: %s: %s\n", string, strerror(errno)); exit(code); } while (0) +#define die(...) do { fprintf(stderr, __VA_ARGS__); exit(1); } while (0) +#define true 1 +#define false 0 +#define bool int + +<<declarations>> + +int main(int argc, char *argv[]) { + <<main.declarations>> + <<main.globals>> + <<main.options>> + <<main.input>> + <<main.output>> + return 0; +} + +void reference(char *line) { + <<reference.declarations>> + <<reference.parse>> + <<reference.add>> +} + +bool insertion(char *line) { + <<insertion.declarations>> + <<insertion.parse>> + <<insertion.add>> +}
\ No newline at end of file |