From d746005b1f6d2c5b9e3b41659e8e18b68196aa44 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sat, 8 Jul 2017 21:56:17 +0000 Subject: [PATCH] remove more cruft --- cgi.h | 229 -------------- css/cgit.css | 732 -------------------------------------------- poems/woozle-irc.md | 19 -- poems/zsf1.md | 24 -- projects/footer.xml | 14 - projects/header.xml | 1 - 6 files changed, 1019 deletions(-) delete mode 100644 cgi.h delete mode 100644 css/cgit.css delete mode 100644 poems/woozle-irc.md delete mode 100644 poems/zsf1.md delete mode 100644 projects/footer.xml delete mode 100644 projects/header.xml diff --git a/cgi.h b/cgi.h deleted file mode 100644 index 793339a..0000000 --- a/cgi.h +++ /dev/null @@ -1,229 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef NODUMP -# define DUMPf(fmt, args...) -#else -# define DUMPf(fmt, args...) fprintf(stderr, "%s:%s:%d " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##args) -#endif -#define DUMP() DUMPf("") -#define DUMP_d(v) DUMPf("%s = %d", #v, v) -#define DUMP_x(v) DUMPf("%s = 0x%x", #v, v) -#define DUMP_s(v) DUMPf("%s = %s", #v, v) -#define DUMP_c(v) DUMPf("%s = '%c' (0x%02x)", #v, v, v) -#define DUMP_p(v) DUMPf("%s = %p", #v, v) - - -#define POST_MAX 1024 - -/* - * CGI - */ -static int is_cgi = 0; -static char **argv = NULL; - -static int -read_char_argv() -{ - static int arg = 0; - static char *p; - - if (NULL == argv) { - return EOF; - } - - if (0 == arg) { - arg = 1; - p = argv[1]; - } - - if (! p) { - return EOF; - } else if (! *p) { - arg += 1; - p = argv[arg]; - return '&'; - } - - return *(p++); -} - -static int -read_char_stdin() -{ - static int inlen = -1; - - if (-1 == inlen) { - char *p = getenv("CONTENT_LENGTH"); - if (p) { - inlen = atoi(p); - if (inlen > POST_MAX) { - inlen = POST_MAX; - } - if (inlen < 0) { - inlen = 0; - } - } else { - inlen = 0; - } - } - - if (inlen) { - inlen -= 1; - return getchar(); - } - return EOF; -} - -static int -read_char_query_string() -{ - static char *p = (char *)-1; - - if ((char *)-1 == p) { - p = getenv("QUERY_STRING"); - } - - if (! p) { - return EOF; - } else if (! *p) { - return EOF; - } else { - return *(p++); - } -} - -static int (* read_char)() = read_char_argv; - -int -cgi_init(char *global_argv[]) -{ - char *rm = getenv("REQUEST_METHOD"); - - if (! rm) { - read_char = read_char_argv; - argv = global_argv; - } else if (0 == strcmp(rm, "POST")) { - read_char = read_char_stdin; - is_cgi = 1; - } else if (0 == strcmp(rm, "GET")) { - read_char = read_char_query_string; - is_cgi = 1; - } else { - printf(("405 Method not allowed\r\n" - "Allow: GET, POST\r\n" - "Content-type: text/plain\r\n" - "\r\n" - "%s is not allowed.\n"), - rm); - return -1; - } - - return 0; -} - -static char -tonum(int c) -{ - if ((c >= '0') && (c <= '9')) { - return c - '0'; - } - if ((c >= 'a') && (c <= 'f')) { - return 10 + c - 'a'; - } - if ((c >= 'A') && (c <= 'F')) { - return 10 + c - 'A'; - } - return 0; -} - -static char -read_hex() -{ - int a = read_char(); - int b = read_char(); - - return tonum(a)*16 + tonum(b); -} - -/* Read a key or a value. Since & and = aren't supposed to appear - outside of boundaries, we can use the same function for both. -*/ -size_t -cgi_item(char *str, size_t maxlen) -{ - int c; - size_t pos = 0; - - while (1) { - c = read_char(); - switch (c) { - case EOF: - case '=': - case '&': - str[pos] = '\0'; - return pos; - case '%': - c = read_hex(); - break; - case '+': - c = ' '; - break; - } - if (pos < maxlen - 1) { - str[pos] = c; - pos += 1; - } - } -} - -void -cgi_header(char *contenttype) -{ - if (is_cgi) { - printf("Content-type: %s\r\n\r\n", contenttype); - } -} - -void -cgi_foot() -{ - printf("\n" - " \n" - "\n"); -} - -void -cgi_result(int code, char *desc, char *fmt, ...) -{ - va_list ap; - - if (is_cgi) { - printf("Status: %d %s\r\n", code, desc); - } - cgi_header("text/html"); - printf("%s\n", desc); - printf("

%d %s

\n", code, desc); - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - cgi_foot(); - exit(0); -} - -void -cgi_error(char *text) -{ - cgi_result(500, "Internal error", "

%s

", text); -} - - diff --git a/css/cgit.css b/css/cgit.css deleted file mode 100644 index f3a7b40..0000000 --- a/css/cgit.css +++ /dev/null @@ -1,732 +0,0 @@ -@import url("default.css"); -@import url("font-awesome.min.css"); -body { - max-width: inherit; -} - -table#header { - width: 100%; - margin-bottom: 1em; -} - -table#header td.main { - font-family: "URW Gothic L", sans-serif; - font-size: 200%; - color: #c17f6f; - padding-left: 10px; - white-space: nowrap; -} - -table#header td.form { - text-align: right; - vertical-align: bottom; - padding-right: 1em; - padding-bottom: 2px; - white-space: nowrap; -} - -table#header td.form form, -table#header td.form input, -table#header td.form select { - font-size: 90%; -} - -table#header td.sub { - display: none; - color: #777; - border-top: solid 1px #ccc; - padding-left: 10px; -} - -table.tabs { - border-bottom: solid 3px #ccc; - border-collapse: collapse; - margin-top: 2em; - margin-bottom: 0px; - width: 100%; -} - -table.tabs td { - padding: 0px 1em; - vertical-align: bottom; -} - -table.tabs td a { - padding: 2px 0.75em; - font-size: 110%; -} - -table.tabs td a.active { - color: #000; - background-color: #ccc; -} - -table.list { - width: 100%; - border: none; - border-collapse: collapse; -} - -table.list tr:hover { - background: #ddd; -} - -table.list tr.nohover:hover { - background: inherit; -} - -table.list th { - font-weight: bold; - background: #ccc; - border-bottom: solid 1px #888; - padding: 0.1em 0.5em 0.05em 0.5em; - vertical-align: baseline; -} - -table.list td { - border: none; - padding: 0.1em 0.5em 0.1em 0.5em; -} - -table.list td.commitgraph { - font-family: monospace; - white-space: pre; -} - -table.list td.commitgraph .column1 { - color: #a00; -} - -table.list td.commitgraph .column2 { - color: #0a0; -} - -table.list td.commitgraph .column3 { - color: #aa0; -} - -table.list td.commitgraph .column4 { - color: #00a; -} - -table.list td.commitgraph .column5 { - color: #a0a; -} - -table.list td.commitgraph .column6 { - color: #0aa; -} - -table.list td.logsubject { - font-family: monospace; - font-weight: bold; -} - -table.list td.logmsg { - font-family: monospace; - white-space: pre; - padding: 0 0.5em; -} - -table.list td a.ls-dir { - font-weight: bold; - color: #00f; -} - -img { - border: none; -} - -input#switch-btn { - margin: 2px 0px 0px 0px; -} - -td#sidebar input.txt { - width: 100%; - margin: 2px 0px 0px 0px; -} - -table#grid { - margin: 0px; -} - -td#content { - vertical-align: top; - padding: 1em 2em 1em 1em; - border: none; -} - -div#summary { - vertical-align: top; - max-width: 35em; - margin: auto; -} - -table#downloads { - float: right; - border-collapse: collapse; - border: solid 1px #777; - margin-left: 0.5em; - margin-bottom: 0.5em; -} - -table#downloads th { - background-color: #ccc; -} - -div#blob { - border: solid 1px black; -} - -div.error { - color: red; - font-weight: bold; - margin: 1em 2em; -} - -a.ls-blob, a.ls-dir, a.ls-mod { - font-family: monospace; -} - -td.ls-size { - text-align: right; - font-family: monospace; - width: 10em; -} - -td.ls-mode { - font-family: monospace; - width: 10em; -} - -table.blob { - margin-top: 0.5em; - border-top: solid 1px black; -} - -table.blob td.lines { - margin: 0; padding: 0 0 0 0.5em; - vertical-align: top; - color: black; -} - -table.blob td.linenumbers { - margin: 0; padding: 0 0.5em 0 0.5em; - vertical-align: top; - text-align: right; - border-right: 1px solid gray; -} - -table.blob pre { - padding: 0; margin: 0; -} - -table.blob a.no, table.ssdiff a.no { - color: gray; - text-align: right; - text-decoration: none; -} - -table.blob a.no a:hover { - color: black; -} - -table.bin-blob { - margin-top: 0.5em; - border: solid 1px black; -} - -table.bin-blob th { - font-family: monospace; - white-space: pre; - border: solid 1px #777; - padding: 0.5em 1em; -} - -table.bin-blob td { - font-family: monospace; - white-space: pre; - border-left: solid 1px #777; - padding: 0em 1em; -} - -table.nowrap td { - white-space: nowrap; -} - -table.commit-info { - border-collapse: collapse; - margin-top: 1.5em; -} - -div.cgit-panel { - float: right; - margin-top: 1.5em; -} - -div.cgit-panel table { - border-collapse: collapse; - border: solid 1px #aaa; - background-color: #eee; -} - -div.cgit-panel th { - text-align: center; -} - -div.cgit-panel td { - padding: 0.25em 0.5em; -} - -div.cgit-panel td.label { - padding-right: 0.5em; -} - -div.cgit-panel td.ctrl { - padding-left: 0.5em; -} - -table.commit-info th { - text-align: left; - font-weight: normal; - padding: 0.1em 1em 0.1em 0.1em; - vertical-align: top; -} - -table.commit-info td { - font-weight: normal; - padding: 0.1em 1em 0.1em 0.1em; -} - -div.commit-subject { - font-weight: bold; - font-size: 125%; - margin: 1.5em 0em 0.5em 0em; - padding: 0em; -} - -div.commit-msg { - white-space: pre; - font-family: monospace; -} - -div.notes-header { - font-weight: bold; - padding-top: 1.5em; -} - -div.notes { - white-space: pre; - font-family: monospace; - border: solid 1px #ee9; - background-color: #ffd; - padding: 0.3em 2em 0.3em 1em; - float: left; -} - -div.notes-footer { - clear: left; -} - -div.diffstat-header { - font-weight: bold; - padding-top: 1.5em; -} - -table.diffstat { - border-collapse: collapse; - border: solid 1px #aaa; - background-color: #eee; -} - -table.diffstat th { - font-weight: normal; - text-align: left; - text-decoration: underline; - padding: 0.1em 1em 0.1em 0.1em; - font-size: 100%; -} - -table.diffstat td { - padding: 0.2em 0.2em 0.1em 0.1em; - font-size: 100%; - border: none; -} - -table.diffstat td.mode { - white-space: nowrap; -} - -table.diffstat td span.modechange { - padding-left: 1em; - color: red; -} - -table.diffstat td.add a { - color: green; -} - -table.diffstat td.del a { - color: red; -} - -table.diffstat td.upd a { - color: blue; -} - -table.diffstat td.graph { - width: 500px; - vertical-align: middle; -} - -table.diffstat td.graph table { - border: none; -} - -table.diffstat td.graph td { - padding: 0px; - border: 0px; - height: 7pt; -} - -table.diffstat td.graph td.add { - background-color: #5c5; -} - -table.diffstat td.graph td.rem { - background-color: #c55; -} - -div.diffstat-summary { - color: #888; - padding-top: 0.5em; -} - -table.diff { - width: 100%; -} - -table.diff td { - font-family: monospace; - white-space: pre; -} - -table.diff td div.head { - font-weight: bold; - margin-top: 1em; - color: black; -} - -table.diff td div.hunk { - color: #009; -} - -table.diff td div.add { - color: green; -} - -table.diff td div.del { - color: red; -} - -.sha1 { - font-family: monospace; - font-size: 90%; -} - -.left { - text-align: left; -} - -.right { - text-align: right; -} - -table.list td.reposection { - font-style: italic; - color: #888; -} - -a.button { - font-size: 80%; - padding: 0em 0.5em; -} - -a.primary { - font-size: 100%; -} - -a.secondary { - font-size: 90%; -} - -td.toplevel-repo { - -} - -table.list td.sublevel-repo { - padding-left: 1.5em; -} - -div.pager { - text-align: center; - margin: 1em 0em 0em 0em; -} - -div.pager a { - color: #777; - margin: 0em 0.5em; -} - -span.age-mins { - font-weight: bold; - color: #080; -} - -span.age-hours { - color: #080; -} - -span.age-days { - color: #040; -} - -span.age-weeks { - color: #444; -} - -span.age-months { - color: #888; -} - -span.age-years { - color: #bbb; -} -div.footer { - margin-top: 0.5em; - text-align: center; - font-size: 80%; - color: #ccc; -} -a.branch-deco { - margin: 0px 0.5em; - padding: 0px 0.25em; - background-color: #88ff88; - border: solid 1px #007700; -} -a.tag-deco { - margin: 0px 0.5em; - padding: 0px 0.25em; - background-color: #ffff88; - border: solid 1px #777700; -} -a.remote-deco { - margin: 0px 0.5em; - padding: 0px 0.25em; - background-color: #ccccff; - border: solid 1px #000077; -} -a.deco { - margin: 0px 0.5em; - padding: 0px 0.25em; - background-color: #ff8888; - border: solid 1px #770000; -} - -div.commit-subject a.branch-deco, -div.commit-subject a.tag-deco, -div.commit-subject a.remote-deco, -div.commit-subject a.deco { - margin-left: 1em; - font-size: 75%; -} - -table.stats { - border: solid 1px black; - border-collapse: collapse; -} - -table.stats th { - text-align: left; - padding: 1px 0.5em; - background-color: #eee; - border: solid 1px black; -} - -table.stats td { - text-align: right; - padding: 1px 0.5em; - border: solid 1px black; -} - -table.stats td.total { - font-weight: bold; - text-align: left; -} - -table.stats td.sum { - color: #c00; - font-weight: bold; -/* background-color: #eee; */ -} - -table.stats td.left { - text-align: left; -} - -table.vgraph { - border-collapse: separate; - border: solid 1px black; - height: 200px; -} - -table.vgraph th { - background-color: #eee; - font-weight: bold; - border: solid 1px white; - padding: 1px 0.5em; -} - -table.vgraph td { - vertical-align: bottom; - padding: 0px 10px; -} - -table.vgraph div.bar { - background-color: #eee; -} - -table.hgraph { - border: solid 1px black; - width: 800px; -} - -table.hgraph th { - background-color: #eee; - font-weight: bold; - border: solid 1px black; - padding: 1px 0.5em; -} - -table.hgraph td { - vertical-align: middle; - padding: 2px 2px; -} - -table.hgraph div.bar { - background-color: #eee; - height: 1em; -} - -table.ssdiff { - width: 100%; -} - -table.ssdiff td { - font-size: 75%; - font-family: monospace; - white-space: pre; - padding: 1px 4px 1px 4px; - border-left: solid 1px #aaa; - border-right: solid 1px #aaa; -} - -table.ssdiff td.add { - color: black; - background: #cfc; - min-width: 50%; -} - -table.ssdiff td.add_dark { - color: black; - background: #aca; - min-width: 50%; -} - -table.ssdiff span.add { - background: #cfc; - font-weight: bold; -} - -table.ssdiff td.del { - color: black; - background: #fcc; - min-width: 50%; -} - -table.ssdiff td.del_dark { - color: black; - background: #caa; - min-width: 50%; -} - -table.ssdiff span.del { - background: #fcc; - font-weight: bold; -} - -table.ssdiff td.changed { - color: black; - background: #ffc; - min-width: 50%; -} - -table.ssdiff td.changed_dark { - color: black; - background: #cca; - min-width: 50%; -} - -table.ssdiff td.lineno { - color: black; - background: #eee; - text-align: right; - width: 3em; - min-width: 3em; -} - -table.ssdiff td.hunk { - color: black; - background: #ccf; - border-top: solid 1px #aaa; - border-bottom: solid 1px #aaa; -} - -table.ssdiff td.head { - border-top: solid 1px #aaa; - border-bottom: solid 1px #aaa; -} - -table.ssdiff td.head div.head { - font-weight: bold; - color: black; -} - -table.ssdiff td.foot { - border-top: solid 1px #aaa; - border-left: none; - border-right: none; - border-bottom: none; -} - -table.ssdiff td.space { - border: none; -} - -table.ssdiff td.space div { - min-height: 3em; -} - -/* Syntax highlighting */ -table.blob .num { color:#2928ff; } -table.blob .esc { color:#ff00ff; } -table.blob .str { color:#ff0000; } -table.blob .dstr { color:#818100; } -table.blob .slc { color:#838183; font-style:italic; } -table.blob .com { color:#838183; font-style:italic; } -table.blob .dir { color:#008200; } -table.blob .sym { color:#000000; } -table.blob .kwa { color:#000000; font-weight:bold; } -table.blob .kwb { color:#830000; } -table.blob .kwc { color:#000000; font-weight:bold; } -table.blob .kwd { color:#010181; } diff --git a/poems/woozle-irc.md b/poems/woozle-irc.md deleted file mode 100644 index 5996c15..0000000 --- a/poems/woozle-irc.md +++ /dev/null @@ -1,19 +0,0 @@ -[[!meta title="32 lines about 16 lusers"]] - -ian is a manager, he also rides a motorbike -hbunny's a boss-man too, and he pumps iron day and night -Meeko is a quasi-furry, lives in Georgia with the fam -Seattle City pays owreee to try and stick it to the man -toast lives on a sailboat with husband, daughters, and some pets -brains take pictures of them all and posts them on the Internets -pinky's in New Jersey, works at linode keeping servers up -crispy's got a dozen kids and writes code for some small start-up -alien's a British guy, his wife is French and they ride bikes -Fub's from Denmark, lives in London, wife and son are Chinese tykes -ameigh is a mommy and she studies speech impediments -nate's a mystery to me, I don't know how he pays his rents -ronin is a Star Wars fan, and coding's something he enjoys -heidi's pinky's wife, she has a business selling bedroom toys -kirk hacks Linux Kernels, and his paycheck comes from Cray Research -nwc's a mystery, he mostly hangs around and lurks -And me, I just sit around writing poems. diff --git a/poems/zsf1.md b/poems/zsf1.md deleted file mode 100644 index 517750c..0000000 --- a/poems/zsf1.md +++ /dev/null @@ -1,24 +0,0 @@ -Title: #zork Song Fight #1 - -HEY NERDS - -Let's make some music. - -The song is "Ballad of the Scorpion Queen and the Centipede King" and you -can [listen to it on YouTube](http://youtu.be/w2-EAsP2O1Q?t=52s). - -SpaceHobo got ahold of the lyrics and changes: - -* [Ukulele](http://zork.net/~nick/scorpion.pdf) - - -RULES ------ - -Hahahaha. - -Probably put it in .ogg format 'cuz we're all big nerds like that. -You have to license it so that we can copy and listen to it. - -Email your thingy (or a link to your thingy) to neale@woozle.org, -and I'll keep a list of 'em here. diff --git a/projects/footer.xml b/projects/footer.xml deleted file mode 100644 index e182090..0000000 --- a/projects/footer.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -
- Neale Pickett <neale@woozle.org> -
- diff --git a/projects/header.xml b/projects/header.xml deleted file mode 100644 index 310b839..0000000 --- a/projects/header.xml +++ /dev/null @@ -1 +0,0 @@ -

Neale's git projects