stagit - Custom fork of stagit
ssh://anon@thyssentishman.com/stagit
Log | Files | Refs | Feed | Contribute | README | LICENSE

Commit: 723033ef9584495a855760632bf1453e790c13e8
Parent: f51a8321211b4ea3863443f945d72f7bb81c7cee
Author: Johannes Thyssen Tishman
Date:   Tue, 26 Nov 2024 15:46:30 +0000

Use snake case variable naming convention

Diffstat:
M config.h | 10 +++++-----
M stagit-index.c | 8 ++++----
M stagit.c | 10 +++++-----

3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/config.h b/config.h
@@ -1,8 +1,8 @@
-static const char pageauthor[] = "Johannes Thyssen Tishman";
-static const char pageurl[] = "https://www.thyssentishman.com";
-static const char pagetitle[] = "JTT";
-static const char pagedescription[] = "Git repositories maintained by Johannes Thyssen Tishman";
-static const char pagekeywords[] = "git, thyssen, tishman";
+static const char page_author[] = "Johannes Thyssen Tishman";
+static const char page_url[] = "https://www.thyssentishman.com";
+static const char page_title[] = "JTT";
+static const char page_description[] = "Git repositories maintained by Johannes Thyssen Tishman";
+static const char page_keywords[] = "git, thyssen, tishman";
 static const char *navbar[][2] = {
 	{ "Blog", "" },
 	{ "Gallery", "gallery.html" },
diff --git a/stagit-index.c b/stagit-index.c
@@ -102,13 +102,13 @@ writeheader(FILE *fp)
 	fputs("<!DOCTYPE html>\n"
 		"<html lang=\"en\">\n<head>\n"
 		"<meta charset=\"UTF-8\">\n", fp);
-	fprintf(fp, "<meta name=\"description\" content=\"%s\">\n", pagedescription);
-	fprintf(fp, "<meta name=\"keywords\" content=\"%s\">\n", pagekeywords);
-	fprintf(fp, "<meta name=\"author\" content=\"%s\">\n", pageauthor);
+	fprintf(fp, "<meta name=\"description\" content=\"%s\">\n", page_description);
+	fprintf(fp, "<meta name=\"keywords\" content=\"%s\">\n", page_keywords);
+	fprintf(fp, "<meta name=\"author\" content=\"%s\">\n", page_author);
 	fputs("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n", fp);
 	fprintf(fp, "<link rel=\"shortcut icon\" href=\"%sfavicon.ico\">\n", relpath);
 	fprintf(fp, "<link rel=\"stylesheet\" href=\"%sstyle.css\">\n", relpath);
-	fprintf(fp, "<title>Git | %s</title>\n", pagetitle);
+	fprintf(fp, "<title>Git | %s</title>\n", page_title);
 	fputs("</head>\n<body>\n<nav>\n", fp);
 	for (int i = 0; i < LEN(navbar); i++)
 		fprintf(fp, "<a href=\"%s%s\">%s</a>\n",
diff --git a/stagit.c b/stagit.c
@@ -519,8 +519,8 @@ writeheader(FILE *fp, const char *title)
 	fputs("<meta name=\"description\" content=\"", fp);
 	xmlencodeline(fp, description, strlen(description));
 	fputs("\">\n", fp);
-	fprintf(fp, "<meta name=\"keywords\" content=\"%s\">\n", pagekeywords);
-	fprintf(fp, "<meta name=\"author\" content=\"%s\">\n", pageauthor);
+	fprintf(fp, "<meta name=\"keywords\" content=\"%s\">\n", page_keywords);
+	fprintf(fp, "<meta name=\"author\" content=\"%s\">\n", page_author);
 	fputs("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n", fp);
 	fprintf(fp,"<link rel=\"shortcut icon\" href=\"%s../../../favicon.ico\">\n", relpath);
 	fprintf(fp, "<link rel=\"stylesheet\" href=\"%s../../../style.css\">\n", relpath);
@@ -535,7 +535,7 @@ writeheader(FILE *fp, const char *title)
 	if (title[0] && strippedname[0])
 		fputs(" - ", fp);
 	xmlencode(fp, strippedname, strlen(strippedname));
-	fprintf(fp, " | %s</title>\n", pagetitle);
+	fprintf(fp, " | %s</title>\n", page_title);
 	fputs("</head>\n<body>\n<nav>\n", fp);
 	for (int i = 0; i < LEN(navbar); i++)
 		fprintf(fp, "<a href=\"%s../../../%s\">%s</a>\n",
@@ -935,10 +935,10 @@ writeatom(FILE *fp, int all)
 	fputs(", branch HEAD</title>\n<subtitle>", fp);
 	xmlencode(fp, description, strlen(description));
 	fputs("</subtitle>\n", fp);
-	fprintf(fp, "<link rel=\"alternate\" type=\"text/html\" href=\"%s\"/>\n", pageurl);
+	fprintf(fp, "<link rel=\"alternate\" type=\"text/html\" href=\"%s\"/>\n", page_url);
 	fputs("<updated>", fp);
 	printtimecurrent(fp);
-	fprintf(fp, "</updated>\n<author>\n<name>%s</name>\n</author>\n", pageauthor);
+	fprintf(fp, "</updated>\n<author>\n<name>%s</name>\n</author>\n", page_author);
 	fprintf(fp, "<id>%s%s</id>\n", baseurl, filename);
 	fprintf(fp, "<link rel=\"self\" type=\"application/atom+xml\" href=\"%s%s\"/>\n", baseurl, filename);