Skip to content

Remove unused arg in write_json_files() #1187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Major changes to the IOCCC entry toolkit


## Release 2.3.44 2025-02-26

Remove unused arg in `write_json_files()`.

Updated `MKIOCCCENTRY_VERSION` to `"1.2.34 2025-02-26"`.


## Release 2.3.43 2025-02-25

Improve `mkiocccentry_test.sh` - add only required files test.
Expand Down Expand Up @@ -59,9 +66,13 @@ FTS functions requires a minor update to chkentry (both in `chkentry.c` and
`soup/entry_util.c`) minor change or else it will not compile and also will
likely segfault.

Updated `MKIOCCCENTRY_VERSION` to `"1.2.33 2025-02-34"`.
Updated `MKIOCCCENTRY_VERSION` to `"1.2.33 2025-02-24"`.
Updated `CHKENTRY_VERSION` to `"1.1.4 2025-02-24"`.

**NOTE**: the `MKIOCCCENTRY_VERSION` in this commit was by accident `"1.2.33
2025-02-34"` but we have retroactively fixed it. Thus if you check out this
specific commit you would see that the version is a mismatch here.


## Release 2.3.41 2025-02-23

Expand Down
14 changes: 6 additions & 8 deletions mkiocccentry.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ main(int argc, char *argv[])
if (!quiet) {
para("", "Forming the .auth.json file and .info json file ...", NULL);
}
write_json_files(&auth, &info, submission_dir, chkentry, fnamchk);
write_json_files(&auth, &info, submission_dir, chkentry);
if (!quiet) {
para("... completed .auth.json and .info.json files.", "", NULL);
}
Expand Down Expand Up @@ -7530,21 +7530,19 @@ form_info(struct info *infop)
* write_json_files
*
* Create the .auth.json and .info.json files and then verify them by running
* chkentry(1) on them.
* chkentry(1) on the submission directory.
*
* given:
* authp - pointer to auth structure
* infop - pointer to info structure
* submission_dir - submission directory
* chkentry - path to chkentry(1) tool
* fnamchk - path to fnamchk(1) tool
*
* This function does not return if a NULL pointer is encountered, if certain
* variables are not in the right range or if chkentry(1) fails.
*/
static void
write_json_files(struct auth *authp, struct info *infop, char const *submission_dir, char const *chkentry,
char const *fnamchk)
write_json_files(struct auth *authp, struct info *infop, char const *submission_dir, char const *chkentry)
{
char *info_path; /* path to .info.json file */
size_t info_path_len; /* length of path to .info.json */
Expand All @@ -7562,7 +7560,7 @@ write_json_files(struct auth *authp, struct info *infop, char const *submission_
/*
* firewall
*/
if (infop == NULL || authp == NULL || submission_dir == NULL || chkentry == NULL || fnamchk == NULL) {
if (infop == NULL || authp == NULL || submission_dir == NULL || chkentry == NULL) {
err(20, __func__, "called with NULL arg(s)");
not_reached();
}
Expand Down Expand Up @@ -7883,7 +7881,7 @@ write_json_files(struct auth *authp, struct info *infop, char const *submission_
*/
if (!quiet) {
para("",
"Checking the format of .auth.json and .info.json ...", NULL);
"Checking your submission directory for various issues ...", NULL);
}
dbg(DBG_HIGH, "about to perform: %s -q -- %s", chkentry, submission_dir);
exit_code = shell_cmd(__func__, false, true, "% -q -- %", chkentry, submission_dir);
Expand All @@ -7893,7 +7891,7 @@ write_json_files(struct auth *authp, struct info *infop, char const *submission_
not_reached();
}
if (!quiet) {
para("... all appears well with the .auth.json and .info.json files.", NULL);
para("... all appears well with your submission directory.", NULL);
}

/*
Expand Down
3 changes: 1 addition & 2 deletions mkiocccentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ static char *get_title(struct info *infop);
static char *get_abstract(struct info *infop);
static int get_author_info(struct author **author_set_p);
static void verify_submission_dir(char const *submission_dir, char const *ls);
static void write_json_files(struct auth *authp, struct info *infop, char const *submission_dir, char const *chkentry,
char const *fnamchk);
static void write_json_files(struct auth *authp, struct info *infop, char const *submission_dir, char const *chkentry);
static void form_auth(struct auth *authp, struct info *infop, int author_count, struct author *authorp);
static void form_info(struct info *infop);
static void form_tarball(char const *workdir, char const *submission_dir, char const *tarball_path, char const *tar,
Expand Down
4 changes: 2 additions & 2 deletions soup/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
*
* NOTE: This should match the latest Release string in CHANGES.md
*/
#define MKIOCCCENTRY_REPO_VERSION "2.3.43 2025-02-25" /* special release format: major.minor[.patch] YYYY-MM-DD */
#define MKIOCCCENTRY_REPO_VERSION "2.3.44 2025-02-26" /* special release format: major.minor[.patch] YYYY-MM-DD */


/*
Expand All @@ -82,7 +82,7 @@
/*
* official mkiocccentry versions (mkiocccentry itself and answers)
*/
#define MKIOCCCENTRY_VERSION "1.2.33 2025-02-34" /* format: major.minor YYYY-MM-DD */
#define MKIOCCCENTRY_VERSION "1.2.34 2025-02-26" /* format: major.minor YYYY-MM-DD */
#define MKIOCCCENTRY_ANSWERS_VERSION "MKIOCCCENTRY_ANSWERS_IOCCC28-1.0" /* answers file version */
#define MKIOCCCENTRY_ANSWERS_EOF "ANSWERS_EOF" /* answers file EOF marker */

Expand Down