-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfuzz-dict.c
More file actions
47 lines (36 loc) · 733 Bytes
/
Copy pathfuzz-dict.c
File metadata and controls
47 lines (36 loc) · 733 Bytes
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
47
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libks/arena-buffer.h"
#include "libks/arena.h"
#include "libks/buffer.h"
#include "style.h"
static void usage(void) __attribute__((noreturn));
int
main(int argc, const char *argv[])
{
struct arena *scratch;
struct buffer *bf;
if (argc != 2)
usage();
scratch = arena_alloc("scratch");
arena_scope(scratch, s);
bf = arena_buffer_alloc(&s, 1 << 10);
if (strcmp(argv[1], "style") == 0) {
style_init();
style_dump_keywords(bf);
style_shutdown();
} else {
usage();
}
printf("%s", buffer_str(bf));
arena_free(scratch);
return 0;
}
static void
usage(void)
{
fprintf(stderr, "usage: fuzz-dict language\n");
exit(1);
}