mirror of
https://github.com/sheumann/hush.git
synced 2025-01-04 22:34:37 +00:00
httpd: code shrink of dir indexer example
This commit is contained in:
parent
c6c2345ca6
commit
de4c5d3d8c
@ -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.
|
* Put it into cgi-bin/index.cgi and chmod 0755.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -23,14 +23,16 @@ i486-linux-uclibc-gcc \
|
|||||||
-march=i386 -mpreferred-stack-boundary=2 \
|
-march=i386 -mpreferred-stack-boundary=2 \
|
||||||
-Wl,-Map -Wl,link.map -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
|
-Wl,-Map -Wl,link.map -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
|
||||||
httpd_indexcgi.c -o index.cgi
|
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%
|
/* We don't use printf, as it pulls in >12 kb of code from uclibc (i386). */
|
||||||
* of the entire executable when built against static uclibc */
|
/* 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/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -47,149 +49,44 @@ Size (approximate):
|
|||||||
* formatting code uses <TAG class=CLASS> to apply style
|
* formatting code uses <TAG class=CLASS> to apply style
|
||||||
* to elements. Edit stylesheet to your liking and recompile. */
|
* to elements. Edit stylesheet to your liking and recompile. */
|
||||||
|
|
||||||
static const char str_header[] =
|
#define STYLE_STR \
|
||||||
"" /* Additional headers (currently none) */
|
"<style>" "\n"\
|
||||||
"\r\n" /* Mandatory empty line after headers */
|
"table {" "\n"\
|
||||||
"<html><head><title>Index of %s</title>" "\n"
|
"width:100%;" "\n"\
|
||||||
"<style>" "\n"
|
"background-color:#fff5ee;" "\n"\
|
||||||
"table {" "\n"
|
"border-width:1px;" /* 1px 1px 1px 1px; */ "\n"\
|
||||||
" width: 100%%;" "\n"
|
"border-spacing:2px;" "\n"\
|
||||||
" background-color: #fff5ee;" "\n"
|
"border-style:solid;" /* solid solid solid solid; */ "\n"\
|
||||||
" border-width: 1px;" /* 1px 1px 1px 1px; */ "\n"
|
"border-color:black;" /* black black black black; */ "\n"\
|
||||||
" border-spacing: 2px;" "\n"
|
"border-collapse:collapse;" "\n"\
|
||||||
" border-style: solid;" /* solid solid solid solid; */ "\n"
|
"}" "\n"\
|
||||||
" border-color: black;" /* black black black black; */ "\n"
|
"th {" "\n"\
|
||||||
" border-collapse: collapse;" "\n"
|
"border-width:1px;" /* 1px 1px 1px 1px; */ "\n"\
|
||||||
"}" "\n"
|
"padding:1px;" /* 1px 1px 1px 1px; */ "\n"\
|
||||||
"th {" "\n"
|
"border-style:solid;" /* solid solid solid solid; */ "\n"\
|
||||||
" border-width: 1px;" /* 1px 1px 1px 1px; */ "\n"
|
"border-color:black;" /* black black black black; */ "\n"\
|
||||||
" padding: 1px;" /* 1px 1px 1px 1px; */ "\n"
|
"}" "\n"\
|
||||||
" border-style: solid;" /* solid solid solid solid; */ "\n"
|
"td {" "\n"\
|
||||||
" border-color: black;" /* black black black black; */ "\n"
|
/* top right bottom left */ \
|
||||||
"}" "\n"
|
"border-width:0px 1px 0px 1px;" "\n"\
|
||||||
"td {" "\n"
|
"padding:1px;" /* 1px 1px 1px 1px; */ "\n"\
|
||||||
/* top right bottom left */
|
"border-style:solid;" /* solid solid solid solid; */ "\n"\
|
||||||
" border-width: 0px 1px 0px 1px;" "\n"
|
"border-color:black;" /* black black black black; */ "\n"\
|
||||||
" padding: 1px;" /* 1px 1px 1px 1px; */ "\n"
|
"white-space:nowrap;" "\n"\
|
||||||
" border-style: solid;" /* solid solid solid solid; */ "\n"
|
"}" "\n"\
|
||||||
" border-color: black;" /* black black black black; */ "\n"
|
"tr.hdr { background-color:#eee5de; }" "\n"\
|
||||||
"}" "\n"
|
"tr.o { background-color:#ffffff; }" "\n"\
|
||||||
"tr.hdr { background-color:#eee5de; }" "\n"
|
/* tr.e { ... } - for even rows (currently none) */ \
|
||||||
"tr.o { background-color:#ffffff; }" "\n"
|
"tr.foot { background-color:#eee5de; }" "\n"\
|
||||||
/* tr.e { ... } - for even rows (currently none) */
|
"th.cnt { text-align:left; }" "\n"\
|
||||||
"tr.foot { background-color:#eee5de; }" "\n"
|
"th.sz { text-align:right; }" "\n"\
|
||||||
"th.cnt { text-align:left; }" "\n"
|
"th.dt { text-align:right; }" "\n"\
|
||||||
"th.sz { text-align:right; }" "\n"
|
"td.sz { text-align:right; }" "\n"\
|
||||||
"th.dt { text-align:right; }" "\n"
|
"td.dt { text-align:right; }" "\n"\
|
||||||
"td.sz { text-align:right; }" "\n"
|
"col.nm { width:98%; }" "\n"\
|
||||||
"td.dt { text-align:right; }" "\n"
|
"col.sz { width:1%; }" "\n"\
|
||||||
"col.nm { width: 98%%; }" "\n"
|
"col.dt { width:1%; }" "\n"\
|
||||||
"col.sz { width: 1%%; }" "\n"
|
"</style>" "\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> " "\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 < etc needed! */
|
|
||||||
if (!size)
|
|
||||||
return (char*)name;
|
|
||||||
|
|
||||||
/* & 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, "<");
|
|
||||||
else if (c == '>')
|
|
||||||
strcpy(p, ">");
|
|
||||||
else if (c == '&')
|
|
||||||
strcpy(++p, "amp;");
|
|
||||||
else {
|
|
||||||
p++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
p += 4;
|
|
||||||
}
|
|
||||||
*p = 0;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct dir_list_t {
|
typedef struct dir_list_t {
|
||||||
char *dl_name;
|
char *dl_name;
|
||||||
@ -200,8 +97,8 @@ typedef struct dir_list_t {
|
|||||||
|
|
||||||
static int compare_dl(dir_list_t *a, dir_list_t *b)
|
static int compare_dl(dir_list_t *a, dir_list_t *b)
|
||||||
{
|
{
|
||||||
if (strcmp(a->dl_name, "..") == 0) {
|
|
||||||
/* ".." is 'less than' any other dir entry */
|
/* ".." is 'less than' any other dir entry */
|
||||||
|
if (strcmp(a->dl_name, "..") == 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (strcmp(b->dl_name, "..") == 0) {
|
if (strcmp(b->dl_name, "..") == 0) {
|
||||||
@ -209,12 +106,110 @@ static int compare_dl(dir_list_t *a, dir_list_t *b)
|
|||||||
}
|
}
|
||||||
if (S_ISDIR(a->dl_mode) != S_ISDIR(b->dl_mode)) {
|
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),
|
/* 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 (S_ISDIR(b->dl_mode) != 0) ? 1 : -1;
|
||||||
}
|
}
|
||||||
return strcmp(a->dl_name, b->dl_name);
|
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("<");
|
||||||
|
else if (c == '>')
|
||||||
|
fmt_str(">");
|
||||||
|
else if (c == '&') {
|
||||||
|
fmt_str("&");
|
||||||
|
} 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)
|
int main(void)
|
||||||
{
|
{
|
||||||
dir_list_t *dir_list;
|
dir_list_t *dir_list;
|
||||||
@ -245,7 +240,6 @@ int main(void)
|
|||||||
dirp = opendir(".");
|
dirp = opendir(".");
|
||||||
if (!dirp)
|
if (!dirp)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
dir_list = NULL;
|
dir_list = NULL;
|
||||||
dir_list_count = 0;
|
dir_list_count = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -266,66 +260,83 @@ int main(void)
|
|||||||
dir_list[dir_list_count].dl_mtime = sb.st_mtime;
|
dir_list[dir_list_count].dl_mtime = sb.st_mtime;
|
||||||
dir_list_count++;
|
dir_list_count++;
|
||||||
}
|
}
|
||||||
|
closedir(dirp);
|
||||||
|
|
||||||
qsort(dir_list, dir_list_count, sizeof(dir_list[0]), (void*)compare_dl);
|
qsort(dir_list, dir_list_count, sizeof(dir_list[0]), (void*)compare_dl);
|
||||||
|
|
||||||
/* Guard against directories wit &, > etc */
|
fmt_str(
|
||||||
QUERY_STRING = html_encode(QUERY_STRING);
|
"" /* Additional headers (currently none) */
|
||||||
printf(str_header, QUERY_STRING, QUERY_STRING);
|
"\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;
|
odd = 0;
|
||||||
count_dirs = 0;
|
count_dirs = 0;
|
||||||
count_files = 0;
|
count_files = 0;
|
||||||
size_total = 0;
|
size_total = 0;
|
||||||
|
|
||||||
cdir = dir_list;
|
cdir = dir_list;
|
||||||
while (dir_list_count--) {
|
while (dir_list_count--) {
|
||||||
char size_str[sizeof(long long) * 3];
|
|
||||||
const char *slash_if_dir;
|
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
char *href;
|
|
||||||
char *filename;
|
|
||||||
char datetime_str[sizeof("2000-02-02 02:02:02")];
|
|
||||||
|
|
||||||
slash_if_dir = "/";
|
|
||||||
if (S_ISDIR(cdir->dl_mode)) {
|
if (S_ISDIR(cdir->dl_mode)) {
|
||||||
count_dirs++;
|
count_dirs++;
|
||||||
size_str[0] = '\0';
|
|
||||||
} else if (S_ISREG(cdir->dl_mode)) {
|
} else if (S_ISREG(cdir->dl_mode)) {
|
||||||
count_files++;
|
count_files++;
|
||||||
size_total += cdir->dl_size;
|
size_total += cdir->dl_size;
|
||||||
slash_if_dir++; /* points to "" now */
|
|
||||||
sprintf(size_str, "%llu", (unsigned long long)(cdir->dl_size));
|
|
||||||
} else
|
} else
|
||||||
goto next;
|
goto next;
|
||||||
href = url_encode(cdir->dl_name); /* %20 etc */
|
|
||||||
filename = html_encode(cdir->dl_name); /* < 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); /* < 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);
|
tm = gmtime(&cdir->dl_mtime);
|
||||||
sprintf(datetime_str, "%04u-%02u-%02u %02u:%02u:%02u",
|
fmt_04u(1900 + tm->tm_year); *dst++ = '-';
|
||||||
(unsigned)(1900 + tm->tm_year),
|
fmt_02u(tm->tm_mon + 1); *dst++ = '-';
|
||||||
(unsigned)(tm->tm_mon + 1),
|
fmt_02u(tm->tm_mday); *dst++ = ' ';
|
||||||
(unsigned)(tm->tm_mday),
|
fmt_02u(tm->tm_hour); *dst++ = ':';
|
||||||
(unsigned)(tm->tm_hour),
|
fmt_02u(tm->tm_min); *dst++ = ':';
|
||||||
(unsigned)(tm->tm_min),
|
fmt_02u(tm->tm_sec);
|
||||||
(unsigned)(tm->tm_sec)
|
*dst++ = '\n';
|
||||||
);
|
|
||||||
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);
|
|
||||||
odd = 1 - odd;
|
odd = 1 - odd;
|
||||||
next:
|
next:
|
||||||
cdir++;
|
cdir++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt_str("<tr class=foot><th class=cnt>Files: ");
|
||||||
|
fmt_ull(count_files);
|
||||||
/* count_dirs - 1: we don't want to count ".." */
|
/* 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user