diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index def8632..fd64af3 100644
--- a/networking/httpd_indexcgi.c
+++ b/networking/httpd_indexcgi.c
@@ -5,7 +5,7 @@
  */
 
 /*
- * This program is a CGI application. It creates directory index page.
+ * This program is a CGI application. It outputs directory index page.
  * Put it into cgi-bin/index.cgi and chmod 0755.
  */
 
@@ -23,14 +23,16 @@
 -march=i386 -mpreferred-stack-boundary=2 \
 -Wl,-Map -Wl,link.map -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
 httpd_indexcgi.c -o index.cgi
-
-Size (approximate):
- text    data     bss     dec     hex filename
-22642     160    3052   25854    64fe index.cgi
 */
 
-/* TODO: get rid of printf's: printf code is more than 50%
- * of the entire executable when built against static uclibc */
+/* We don't use printf, as it pulls in >12 kb of code from uclibc (i386). */
+/* Currently malloc machinery is the biggest part of libc we pull in. */
+/* We have only one realloc and one strdup, any idea how to do without? */
+/* Size (i386, approximate):
+ *   text    data     bss     dec     hex filename
+ *  13036      44    3052   16132    3f04 index.cgi
+ *   2576       4    2048    4628    1214 index.cgi.o
+ */
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -47,149 +49,44 @@
  * formatting code uses <TAG class=CLASS> to apply style
  * to elements. Edit stylesheet to your liking and recompile. */
 
-static const char str_header[] =
-"" /* Additional headers (currently none) */
-"\r\n" /* Mandatory empty line after headers */
-"<html><head><title>Index of %s</title>"                "\n"
-"<style>"                                               "\n"
-"table {"                                               "\n"
-"  width: 100%%;"                                       "\n"
-"  background-color: #fff5ee;"                          "\n"
-"  border-width: 1px;" /* 1px 1px 1px 1px; */           "\n"
-"  border-spacing: 2px;"                                "\n"
-"  border-style: solid;" /* solid solid solid solid; */ "\n"
-"  border-color: black;" /* black black black black; */ "\n"
-"  border-collapse: collapse;"                          "\n"
-"}"                                                     "\n"
-"th {"                                                  "\n"
-"  border-width: 1px;" /* 1px 1px 1px 1px; */           "\n"
-"  padding: 1px;" /* 1px 1px 1px 1px; */                "\n"
-"  border-style: solid;" /* solid solid solid solid; */ "\n"
-"  border-color: black;" /* black black black black; */ "\n"
-"}"                                                     "\n"
-"td {"                                                  "\n"
-            /* top right bottom left */
-"  border-width: 0px 1px 0px 1px;"                      "\n"
-"  padding: 1px;" /* 1px 1px 1px 1px; */                "\n"
-"  border-style: solid;" /* solid solid solid solid; */ "\n"
-"  border-color: black;" /* black black black black; */ "\n"
-"}"                                                     "\n"
-"tr.hdr { background-color:#eee5de; }"                  "\n"
-"tr.o { background-color:#ffffff; }"                    "\n"
-/* tr.e { ... } - for even rows (currently none) */
-"tr.foot { background-color:#eee5de; }"                 "\n"
-"th.cnt { text-align:left; }"                           "\n"
-"th.sz { text-align:right; }"                           "\n"
-"th.dt { text-align:right; }"                           "\n"
-"td.sz { text-align:right; }"                           "\n"
-"td.dt { text-align:right; }"                           "\n"
-"col.nm { width: 98%%; }"                               "\n"
-"col.sz { width: 1%%; }"                                "\n"
-"col.dt { width: 1%%; }"                                "\n"
-"</style>"                                              "\n"
-"</head>"                                               "\n"
-"<body>"                                                "\n"
-"<h1>Index of %s</h1>"                                  "\n"
-""                                                      "\n"
-"<table>"                                               "\n"
-"<col class=nm><col class=sz><col class=dt>"            "\n"
-"<tr class=hdr><th class=cnt>Name<th class=sz>Size<th class=dt>Last modified" "\n"
-;
-
-static const char str_footer[] =
-"<tr class=foot><th class=cnt>Files: %u, directories: %u<th class=sz>%llu<th class=dt>&nbsp;" "\n"
-/* "</table></body></html>" - why bother? */
-;
-
-static int bad_url_char(unsigned c)
-{
-	return (c - '0') > 9 /* not a digit */
-	    && ((c|0x20) - 'a') > 26 /* not A-Z or a-z */
-	    && !strchr("._-+@", c);
-}
-
-static char *url_encode(const char *name)
-{
-	int i;
-	int size = 0;
-	int len = strlen(name);
-	char *p, *result;
-
-	i = 0;
-	while (name[i]) {
-		if (bad_url_char((unsigned)name[i]))
-			size++;
-		i++;
-	}
-
-	/* No %xx needed! */
-	if (!size)
-		return (char*)name;
-
-	/* Each %xx requires 2 additional chars */
-	size = size * 2 + len + 1;
-	p = result = malloc(size);
-
-	i = 0;
-	while (name[i]) {
-		*p = name[i];
-		if (bad_url_char((unsigned)name[i])) {
-			*p++ = '%';
-			*p++ = "0123456789ABCDEF"[(uint8_t)(name[i]) >> 4];
-			*p = "0123456789ABCDEF"[(uint8_t)(name[i]) & 0xf];
-		}
-		p++;
-		i++;
-	}
-	*p = 0;
-	return result;
-}
-
-static char *html_encode(const char *name)
-{
-	int i;
-	int size = 0;
-	int len = strlen(name);
-	char *p, *result;
-
-	i = 0;
-	while (name[i]) {
-		if (name[i] == '<'
-		 || name[i] == '>'
-		 || name[i] == '&'
-		) {
-			size++;
-		}
-		i++;
-	}
-
-	/* No &lt; etc needed! */
-	if (!size)
-		return (char*)name;
-
-	/* &amp; requires 4 additional chars */
-	size = size * 4 + len + 1;
-	p = result = malloc(size);
-
-	i = 0;
-	while (name[i]) {
-		char c;
-		*p = c = name[i++];
-		if (c == '<')
-			strcpy(p, "&lt;");
-		else if (c == '>')
-			strcpy(p, "&gt;");
-		else if (c == '&')
-			strcpy(++p, "amp;");
-		else {
-			p++;
-			continue;
-		}
-		p += 4;
-	}
-	*p = 0;
-	return result;
-}
+#define STYLE_STR \
+"<style>"                                               "\n"\
+"table {"                                               "\n"\
+  "width:100%;"                                         "\n"\
+  "background-color:#fff5ee;"                           "\n"\
+  "border-width:1px;" /* 1px 1px 1px 1px; */            "\n"\
+  "border-spacing:2px;"                                 "\n"\
+  "border-style:solid;" /* solid solid solid solid; */  "\n"\
+  "border-color:black;" /* black black black black; */  "\n"\
+  "border-collapse:collapse;"                           "\n"\
+"}"                                                     "\n"\
+"th {"                                                  "\n"\
+  "border-width:1px;" /* 1px 1px 1px 1px; */            "\n"\
+  "padding:1px;" /* 1px 1px 1px 1px; */                 "\n"\
+  "border-style:solid;" /* solid solid solid solid; */  "\n"\
+  "border-color:black;" /* black black black black; */  "\n"\
+"}"                                                     "\n"\
+"td {"                                                  "\n"\
+             /* top right bottom left */                    \
+  "border-width:0px 1px 0px 1px;"                       "\n"\
+  "padding:1px;" /* 1px 1px 1px 1px; */                 "\n"\
+  "border-style:solid;" /* solid solid solid solid; */  "\n"\
+  "border-color:black;" /* black black black black; */  "\n"\
+  "white-space:nowrap;"                                 "\n"\
+"}"                                                     "\n"\
+"tr.hdr { background-color:#eee5de; }"                  "\n"\
+"tr.o { background-color:#ffffff; }"                    "\n"\
+/* tr.e { ... } - for even rows (currently none) */         \
+"tr.foot { background-color:#eee5de; }"                 "\n"\
+"th.cnt { text-align:left; }"                           "\n"\
+"th.sz { text-align:right; }"                           "\n"\
+"th.dt { text-align:right; }"                           "\n"\
+"td.sz { text-align:right; }"                           "\n"\
+"td.dt { text-align:right; }"                           "\n"\
+"col.nm { width:98%; }"                                 "\n"\
+"col.sz { width:1%; }"                                  "\n"\
+"col.dt { width:1%; }"                                  "\n"\
+"</style>"                                              "\n"\
 
 typedef struct dir_list_t {
 	char  *dl_name;
@@ -200,8 +97,8 @@
 
 static int compare_dl(dir_list_t *a, dir_list_t *b)
 {
+	/* ".." is 'less than' any other dir entry */
 	if (strcmp(a->dl_name, "..") == 0) {
-		/* ".." is 'less than' any other dir entry */
 		return -1;
 	}
 	if (strcmp(b->dl_name, "..") == 0) {
@@ -209,12 +106,110 @@
 	}
 	if (S_ISDIR(a->dl_mode) != S_ISDIR(b->dl_mode)) {
 		/* 1 if b is a dir (and thus a is 'after' b, a > b),
-		 * else -1 (a < b)*/
+		 * else -1 (a < b) */
 		return (S_ISDIR(b->dl_mode) != 0) ? 1 : -1;
 	}
 	return strcmp(a->dl_name, b->dl_name);
 }
 
+static char buffer[2*1024 > sizeof(STYLE_STR) ? 2*1024 : sizeof(STYLE_STR)];
+static char *dst = buffer;
+enum {
+	BUFFER_SIZE = sizeof(buffer),
+	HEADROOM = 64,
+};
+
+/* After this call, you have at least size + HEADROOM bytes available
+ * ahead of dst */
+static void guarantee(int size)
+{
+	if (buffer + (BUFFER_SIZE-HEADROOM) - dst >= size)
+		return;
+	write(1, buffer, dst - buffer);
+	dst = buffer;
+}
+
+/* NB: formatters do not store terminating NUL! */
+
+/* HEADROOM bytes are available after dst after this call */
+static void fmt_str(/*char *dst,*/ const char *src)
+{
+	unsigned len = strlen(src);
+	guarantee(len);
+	memcpy(dst, src, len);
+	dst += len;
+}
+
+/* HEADROOM bytes after dst are available after this call */
+static void fmt_url(/*char *dst,*/ const char *name)
+{
+	while (*name) {
+		unsigned c = *name++;
+		guarantee(3);
+		*dst = c;
+		if ((c - '0') > 9 /* not a digit */
+		 && ((c|0x20) - 'a') > 26 /* not A-Z or a-z */
+		 && !strchr("._-+@", c)
+		) {
+			*dst++ = '%';
+			*dst++ = "0123456789ABCDEF"[c >> 4];
+			*dst = "0123456789ABCDEF"[c & 0xf];
+		}
+		dst++;
+	}
+}
+
+/* HEADROOM bytes are available after dst after this call */
+static void fmt_html(/*char *dst,*/ const char *name)
+{
+	while (*name) {
+		char c = *name++;
+		if (c == '<')
+			fmt_str("&lt;");
+		else if (c == '>')
+			fmt_str("&gt;");
+		else if (c == '&') {
+			fmt_str("&amp;");
+		} else {
+			guarantee(1);
+			*dst++ = c;
+			continue;
+		}
+	}
+}
+
+/* HEADROOM bytes are available after dst after this call */
+static void fmt_ull(/*char *dst,*/ unsigned long long n)
+{
+	char buf[sizeof(n)*3 + 2];
+	char *p;
+
+	p = buf + sizeof(buf) - 1;
+	*p = '\0';
+	do {
+		*--p = (n % 10) + '0';
+		n /= 10;
+	} while (n);
+	fmt_str(/*dst,*/ p);
+}
+
+/* Does not call guarantee - eats into headroom instead */
+static void fmt_02u(/*char *dst,*/ unsigned n)
+{
+	/* n %= 100; - not needed, callers don't pass big n */
+	dst[0] = (n / 10) + '0';
+	dst[1] = (n % 10) + '0';
+	dst += 2;
+}
+
+/* Does not call guarantee - eats into headroom instead */
+static void fmt_04u(/*char *dst,*/ unsigned n)
+{
+	/* n %= 10000; - not needed, callers don't pass big n */
+	fmt_02u(n / 100);
+	fmt_02u(n % 100);
+}
+
 int main(void)
 {
 	dir_list_t *dir_list;
@@ -245,7 +240,6 @@
 	dirp = opendir(".");
 	if (!dirp)
 		return 1;
-
 	dir_list = NULL;
 	dir_list_count = 0;
 	while (1) {
@@ -266,66 +260,83 @@
 		dir_list[dir_list_count].dl_mtime = sb.st_mtime;
 		dir_list_count++;
 	}
+	closedir(dirp);
 
 	qsort(dir_list, dir_list_count, sizeof(dir_list[0]), (void*)compare_dl);
 
-	/* Guard against directories wit &, > etc */
-	QUERY_STRING = html_encode(QUERY_STRING);
-	printf(str_header, QUERY_STRING, QUERY_STRING);
+	fmt_str(
+		"" /* Additional headers (currently none) */
+		"\r\n" /* Mandatory empty line after headers */
+		"<html><head><title>Index of ");
+	/* Guard against directories with &, > etc */
+	fmt_html(QUERY_STRING);
+	fmt_str(
+		"</title>\n"
+		STYLE_STR
+		"</head>" "\n"
+		"<body>" "\n"
+		"<h1>Index of ");
+	fmt_html(QUERY_STRING);
+	fmt_str(
+		"</h1>" "\n"
+		"<table>" "\n"
+		"<col class=nm><col class=sz><col class=dt>" "\n"
+		"<tr class=hdr><th class=cnt>Name<th class=sz>Size<th class=dt>Last modified" "\n");
 
 	odd = 0;
 	count_dirs = 0;
 	count_files = 0;
 	size_total = 0;
-
 	cdir = dir_list;
 	while (dir_list_count--) {
-		char size_str[sizeof(long long) * 3];
-		const char *slash_if_dir;
 		struct tm *tm;
-		char *href;
-		char *filename;
-		char datetime_str[sizeof("2000-02-02&nbsp;02:02:02")];
 
-		slash_if_dir = "/";
 		if (S_ISDIR(cdir->dl_mode)) {
 			count_dirs++;
-			size_str[0] = '\0';
 		} else if (S_ISREG(cdir->dl_mode)) {
 			count_files++;
 			size_total += cdir->dl_size;
-			slash_if_dir++; /* points to "" now */
-			sprintf(size_str, "%llu", (unsigned long long)(cdir->dl_size));
 		} else
 			goto next;
-		href = url_encode(cdir->dl_name); /* %20 etc */
-		filename = html_encode(cdir->dl_name); /* &lt; etc */
+
+		fmt_str("<tr class=");
+		*dst++ = (odd ? 'o' : 'e');
+		fmt_str("><td class=nm><a href='");
+		fmt_url(cdir->dl_name); /* %20 etc */
+		if (S_ISDIR(cdir->dl_mode))
+			*dst++ = '/';
+		fmt_str("'>");
+		fmt_html(cdir->dl_name); /* &lt; etc */
+		if (S_ISDIR(cdir->dl_mode))
+			*dst++ = '/';
+		fmt_str("</a><td class=sz>");
+		if (S_ISREG(cdir->dl_mode))
+			fmt_ull(cdir->dl_size);
+		fmt_str("<td class=dt>");
 		tm = gmtime(&cdir->dl_mtime);
-		sprintf(datetime_str, "%04u-%02u-%02u&nbsp;%02u:%02u:%02u",
-			(unsigned)(1900 + tm->tm_year),
-			(unsigned)(tm->tm_mon + 1),
-			(unsigned)(tm->tm_mday),
-			(unsigned)(tm->tm_hour),
-			(unsigned)(tm->tm_min),
-			(unsigned)(tm->tm_sec)
-		);
-		printf("<tr class=%c><td class=nm><a href='%s%s'>%s%s</a><td class=sz>%s<td class=dt>%s\n",
-			odd ? 'o' : 'e',
-			href, slash_if_dir,
-			filename, slash_if_dir,
-			size_str,
-			datetime_str
-		);
-		if (cdir->dl_name != href)
-			free(href);
-		if (cdir->dl_name != filename)
-			free(filename);
+		fmt_04u(1900 + tm->tm_year); *dst++ = '-';
+		fmt_02u(tm->tm_mon + 1); *dst++ = '-';
+		fmt_02u(tm->tm_mday); *dst++ = ' ';
+		fmt_02u(tm->tm_hour); *dst++ = ':';
+		fmt_02u(tm->tm_min); *dst++ = ':';
+		fmt_02u(tm->tm_sec);
+		*dst++ = '\n';
+
 		odd = 1 - odd;
  next:
 		cdir++;
 	}
 
+	fmt_str("<tr class=foot><th class=cnt>Files: ");
+	fmt_ull(count_files);
 	/* count_dirs - 1: we don't want to count ".." */
-	printf(str_footer, count_files, count_dirs - 1, size_total);
+	fmt_str(", directories: ");
+	fmt_ull(count_dirs - 1);
+	fmt_str("<th class=sz>");
+	fmt_ull(size_total);
+	fmt_str("<th class=dt>\n");
+	/* "</table></body></html>" - why bother? */
+	guarantee(BUFFER_SIZE * 2); /* flush */
+
 	return 0;
 }
