X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fhtls.c;h=907187ccbd83d0dd8f93d4e4812cfe1bb1fc991d;hb=060376d428e8693e817ac0eae4710ce222d14e07;hp=e16004d2a063c7f1fc9073a182571176b36e9c72;hpb=121d8be9d4bdeea6a083d9bf791677e9150e6324;p=ashd.git diff --git a/src/htls.c b/src/htls.c index e16004d..907187c 100644 --- a/src/htls.c +++ b/src/htls.c @@ -43,6 +43,7 @@ struct dentry { static int dispmtime = 0; static int dispsize = 0; +static char *stylesheet = NULL; static void checkcache(struct stat *sb) { @@ -74,12 +75,25 @@ static void head(char *name, struct charbuf *dst) { char *title; + title = sstrdup(htmlquote(name)); bprintf(dst, "\n"); bprintf(dst, "\n"); bprintf(dst, "\n"); bprintf(dst, "
\n"); - title = htmlquote(name); bprintf(dst, "%s | ", fn, fn); - free(fn); - if(dispsize && !S_ISDIR(dirbuf.b[i].sb.st_mode)) - bprintf(dst, "%ji | ", (intmax_t)dirbuf.b[i].sb.st_size); + if(dispsize) { + bprintf(dst, ""); + if(!S_ISDIR(dirbuf.b[i].sb.st_mode)) + bprintf(dst, "%ji", (intmax_t)dirbuf.b[i].sb.st_size); + bprintf(dst, " | "); + } if(dispmtime) bprintf(dst, "%s | ", fmthttpdate(dirbuf.b[i].sb.st_mtime)); bprintf(dst, "