diff options
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 |