From 980fa8ea9bce704c9e44cfea47860e82cffec161 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 16 Apr 2017 20:36:17 +0200 Subject: [PATCH] text-browser improvements for links, lynx, w3m, dil[dl]o etc: - set oldschool align attribute. - apply bold markup to table header. --- stagit.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/stagit.c b/stagit.c index d9f6604..4e081dd 100644 --- a/stagit.c +++ b/stagit.c @@ -556,11 +556,11 @@ writelogline(FILE *fp, struct commitinfo *ci) fputs("", fp); if (ci->author) xmlencode(fp, ci->author->name, strlen(ci->author->name)); - fputs("", fp); + fputs("", fp); fprintf(fp, "%zu", ci->filecount); - fputs("", fp); + fputs("", fp); fprintf(fp, "+%zu", ci->addcount); - fputs("", fp); + fputs("", fp); fprintf(fp, "-%zu", ci->delcount); fputs("\n", fp); } @@ -835,7 +835,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) fputs(filemode(git_tree_entry_filemode(entry)), fp); fprintf(fp, "", relpath, filepath); xmlencode(fp, entrypath, strlen(entrypath)); - fputs("", fp); + fputs("", fp); if (showlinecount && lc > 0) fprintf(fp, "%dL", lc); else @@ -847,7 +847,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path) relpath); xmlencode(fp, entrypath, strlen(entrypath)); git_submodule_free(module); - fputs("\n", fp); + fputs("\n", fp); } } @@ -862,7 +862,8 @@ writefiles(FILE *fp, const git_oid *id) int ret = -1; fputs("\n" - "" + "" + "" "\n\n", fp); if (!git_commit_lookup(&commit, repo, id) && @@ -946,9 +947,12 @@ writerefs(FILE *fp) /* print header if it has an entry (first). */ if (++count == 1) { - fprintf(fp, "

%s

ModeNameSizeModeNameSize
\n" - "\n\n\n", - titles[j], ids[j]); + fprintf(fp, "

%s

NameLast commit dateAuthor
" + "\n" + "" + "\n\n" + "\n", + titles[j], ids[j]); } relpath = ""; @@ -1102,9 +1106,11 @@ main(int argc, char *argv[]) relpath = ""; mkdir("commit", 0755); writeheader(fp, "Log"); - fputs("
NameLast commit dateAuthor
\n" - "" - "\n\n", fp); + fputs("
DateCommit messageAuthorFiles+-
\n" + "" + "" + "" + "\n\n", fp); if (cachefile) { /* read from cache file (does not need to exist) */ -- libgit2 1.1.1
DateCommit messageAuthorFiles+-