commit 650db44
hovercats
·
2024-05-04 12:59:13 +0000 UTC
parent 5ece3f0
quark: import
6 files changed,
+68,
-0
+3,
-0
1@@ -133,3 +133,6 @@
2 path = pkg/qbe/src
3 url = git://c9x.me/qbe.git
4 ignore = all
5+[submodule "pkg/quark/src"]
6+ path = pkg/quark/src
7+ url = git://git.suckless.org/quark
+1,
-0
1@@ -40,6 +40,7 @@ subgen 'openbsd'
2 subgen 'openssh'
3 subgen 'pigz'
4 subgen 'qbe'
5+subgen 'quark'
6 subgen 'rc'
7 subgen 'rcinit'
8 subgen 'rcsm'
+39,
-0
1@@ -0,0 +1,39 @@
2+#ifndef CONFIG_H
3+#define CONFIG_H
4+
5+#define BUFFER_SIZE 4096
6+#define FIELD_MAX 200
7+
8+/* mime-types */
9+static const struct {
10+ char *ext;
11+ char *type;
12+} mimes[] = {
13+ { "xml", "application/xml; charset=utf-8" },
14+ { "xhtml", "application/xhtml+xml; charset=utf-8" },
15+ { "html", "text/html; charset=utf-8" },
16+ { "htm", "text/html; charset=utf-8" },
17+ { "css", "text/css; charset=utf-8" },
18+ { "txt", "text/plain; charset=utf-8" },
19+ { "md", "text/plain; charset=utf-8" },
20+ { "c", "text/plain; charset=utf-8" },
21+ { "h", "text/plain; charset=utf-8" },
22+ { "gz", "application/x-gtar" },
23+ { "tar", "application/tar" },
24+ { "pdf", "application/x-pdf" },
25+ { "png", "image/png" },
26+ { "gif", "image/gif" },
27+ { "jpeg", "image/jpg" },
28+ { "jpg", "image/jpg" },
29+ { "iso", "application/x-iso9660-image" },
30+ { "webp", "image/webp" },
31+ { "svg", "image/svg+xml; charset=utf-8" },
32+ { "flac", "audio/flac" },
33+ { "mp3", "audio/mpeg" },
34+ { "ogg", "audio/ogg" },
35+ { "mp4", "video/mp4" },
36+ { "ogv", "video/ogg" },
37+ { "webm", "video/webm" },
38+};
39+
40+#endif /* CONFIG_H */
+23,
-0
1@@ -0,0 +1,23 @@
2+cflags {
3+ '-std=c99', '-Wpedantic', '-Wall', '-Wextra',
4+ '-D _DEFAULT_SOURCE',
5+ '-D _XOPEN_SOURCE=700',
6+ '-D _BSD_SOURCE',
7+ '-D VERSION=0',
8+ '-I $dir',
9+}
10+
11+exe('quark', {
12+ 'main.c',
13+ 'connection.c',
14+ 'data.c',
15+ 'http.c',
16+ 'queue.c',
17+ 'server.c',
18+ 'sock.c',
19+ 'util.c',
20+})
21+file('bin/quark', '775', '$outdir/quark')
22+man{'quark.1'}
23+
24+fetch 'git'
+1,
-0
1@@ -0,0 +1 @@
2+Subproject commit 5ad0df91757fbc577ffceeca633725e962da345d
+1,
-0
1@@ -0,0 +1 @@
2+5ad0df9175 r0