aboutsummaryrefslogtreecommitdiff
path: root/src/gistatic.c
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-08-21 06:00:47 -0300
committerEuAndreh <eu@euandre.org>2021-08-21 06:00:47 -0300
commit8c3c7a4d218bf6cb8b4a1bfd91912e216394ff39 (patch)
tree20fddb85d0a8e5c310b8a9dff9823a1a8793da97 /src/gistatic.c
parentMakefile: Run assert-catgets.sh for all C files (diff)
downloadgistatic-8c3c7a4d218bf6cb8b4a1bfd91912e216394ff39.tar.gz
gistatic-8c3c7a4d218bf6cb8b4a1bfd91912e216394ff39.tar.xz
src/gistatic.c: Use <OBJECT>_<PART>_<VERB> nomenclature for function names
Diffstat (limited to '')
-rw-r--r--src/gistatic.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/gistatic.c b/src/gistatic.c
index fee87ee..9c82f1f 100644
--- a/src/gistatic.c
+++ b/src/gistatic.c
@@ -1045,7 +1045,7 @@ static void test_strtrim(void) {
}
#endif
-static int index_write_header(FILE *const fd, const char *const idx_title) {
+static int index_header_write(FILE *const fd, const char *const idx_title) {
const int e = fprintf(
fd,
""
@@ -1133,7 +1133,7 @@ static char *footer_signature_string(void) {
return signature_text;
}
-static int index_write_footer(FILE *const fd) {
+static int index_footer_write(FILE *const fd) {
char *const signature_text = footer_signature_string();
if (!signature_text) {
return -1;
@@ -1236,7 +1236,7 @@ static void test_last_commit_date(void) {
}
#endif
-static int write_logo(FILE *const fd) {
+static int logo_write(FILE *const fd) {
if (fprintf(fd, "%s", LOGO_STR) < 0) {
logerr("fprintf()", strerror(errno), __LINE__);
return -1;
@@ -1244,7 +1244,7 @@ static int write_logo(FILE *const fd) {
return 0;
}
-static int write_style(FILE *const fd) {
+static int style_write(FILE *const fd) {
if (fprintf(fd, "%s", STYLE_STR) < 0) {
logerr("fprintf()", strerror(errno), __LINE__);
return -1;
@@ -1252,7 +1252,7 @@ static int write_style(FILE *const fd) {
return 0;
}
-static int index_write_row(FILE *const fd, char *const repopath) {
+static int index_row_write(FILE *const fd, char *const repopath) {
int ret = 0;
int e;
@@ -1391,12 +1391,12 @@ static int index_write(
goto cleanup;
}
- if (index_write_header(index_fd, title)) {
+ if (index_header_write(index_fd, title)) {
ret = -1;
goto cleanup;
}
for (int i = 0; i < repoc; i++) {
- const int e = index_write_row(index_fd, repov[i]);
+ const int e = index_row_write(index_fd, repov[i]);
if (e == -1) {
ret = -1;
goto cleanup;
@@ -1407,9 +1407,9 @@ static int index_write(
}
if (
- index_write_footer(index_fd)
- || write_logo(logo_fd)
- || write_style(style_fd)
+ index_footer_write(index_fd)
+ || logo_write(logo_fd)
+ || style_write(style_fd)
) {
ret = -1;
goto cleanup;
@@ -1437,7 +1437,7 @@ cleanup:
return ret;
}
-static int repo_write_refs(
+static int repo_refs_write(
const char *const outdir,
struct git_repository *const repo,
const char *const project_name,
@@ -1845,7 +1845,7 @@ cleanup:
return ret;
}
-static int repo_write_tarballs(
+static int repo_tarballs_write(
const char *const outdir,
struct git_repository *const repo,
const char *const project_name
@@ -1967,7 +1967,7 @@ static int repo_write(
goto cleanup;
}
- if (write_logo(logo_fd) || write_style(style_fd)) {
+ if (logo_write(logo_fd) || style_write(style_fd)) {
ret = -1;
goto cleanup;
}
@@ -2012,9 +2012,9 @@ static int repo_write(
}
if (
- repo_write_refs(outdir, repo, encoded_name,
+ repo_refs_write(outdir, repo, encoded_name,
encoded_description, clone_url)
- || repo_write_tarballs(outdir, repo, encoded_name)
+ || repo_tarballs_write(outdir, repo, encoded_name)
) {
ret = -1;
goto cleanup;