stagit

My fork of stagit

git clone git://git.shimmy1996.com/stagit.git
commit 5cfbeceb1c45a5eaee2100ac1028410d0d816e2a
parent f10a60a628f79ebed51753780a6e86eda4a8e228
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat,  4 Apr 2020 13:54:34 -0500

Use th for table header cells

Diffstat:
Mstagit-index.c | 7+++----
Mstagit.c | 13++++++-------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c
@@ -78,10 +78,9 @@ writeheader(FILE *fp)
 	xmlencode(fp, description, strlen(description));
 	fputs("</p>\n"
 		"<hr/>\n<div id=\"content\">\n"
-		"<table id=\"index\"><thead>\n"
-		"<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Owner</b></td>"
-		"<td><b>Last commit</b></td></tr>"
-		"</thead><tbody>\n", fp);
+		"<table id=\"index\"><thead><tr>\n"
+		"<th>Name</th><th>Description</th><th>Owner</th><th>Last commit</th>"
+		"</tr></thead><tbody>\n", fp);
 }
 
 void
diff --git a/stagit.c b/stagit.c
@@ -1040,8 +1040,7 @@ writefiles(FILE *fp, const git_oid *id)
 	int ret = -1;
 
 	fputs("<table id=\"files\"><thead>\n<tr>"
-	      "<td><b>Mode</b></td><td><b>Name</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>Size</b></td>"
+	      "<th>Mode</th><th>Name</th><th class=\"num\" align=\"right\">Size</th>"
 	      "</tr>\n</thead><tbody>\n", fp);
 
 	if (!git_commit_lookup(&commit, repo, id) &&
@@ -1251,11 +1250,11 @@ main(int argc, char *argv[])
 	relpath = "";
 	mkdir("commit", S_IRWXU | S_IRWXG | S_IRWXO);
 	writeheader(fp, "Log");
-	fputs("<table id=\"log\"><thead>\n<tr><td><b>Date</b></td>"
-	      "<td><b>Commit message</b></td>"
-	      "<td><b>Author</b></td><td class=\"num\" align=\"right\"><b>Files</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>+</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>-</b></td></tr>\n</thead><tbody>\n", fp);
+	fputs("<table id=\"log\"><thead>\n<tr><th>Date</th>"
+	      "<th>Commit message</th>"
+	      "<th>Author</th><th class=\"num\" align=\"right\">Files</th>"
+	      "<th class=\"num\" align=\"right\">+</th>"
+	      "<th class=\"num\" align=\"right\">-</th></tr>\n</thead><tbody>\n", fp);
 
 	if (cachefile && head) {
 		/* read from cache file (does not need to exist) */