blob: 8a5c777ea88b201f2c513f985c1bca15a2a1dccc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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>>
}
|