diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-06 09:29:48 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-06 09:29:48 -0400 |
| commit | 1a289f60003b4301538b02e17ecc39b92982fea5 (patch) | |
| tree | 781901592a8534a8a5f94ad3fd49bb1ab91300b6 | |
| parent | bb7501fc2b1fcdeba80c611bbc587ca9b26c3e4e (diff) | |
| download | weekly-1a289f60003b4301538b02e17ecc39b92982fea5.tar.gz | |
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | main.c | 12 | ||||
| -rw-r--r-- | system.c | 3 | ||||
| -rw-r--r-- | weekly.h | 1 |
4 files changed, 5 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c81ef79..01e3dc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.16) project(weekly C) if(MSVC) @@ -236,16 +236,8 @@ int main(int argc, char *argv[]) { exit(1); } if (do_all) { - struct dirent *dp; - DIR *dir; - dir = opendir(journalroot); - while ((dp = readdir(dir)) != NULL) { - if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) - continue; - if (isdigit(*dp->d_name)) { - for (int w = week; w < WEEK_MAX; w++) - dump_week(journalroot, year, w, style); - } + for (int w = week; w < WEEK_MAX; w++) { + dump_week(journalroot, year, w, style); } } else { if (dump_week(journalroot, year, week, style) < 0) { @@ -170,5 +170,4 @@ char *make_output_path(char *basepath, char *path, int year, int week, int day_o sprintf(path + strlen(path), "%d", day_of_week); return path; -} - +}
\ No newline at end of file @@ -100,5 +100,6 @@ int dir_empty(const char *path); char *find_program(const char *name); int make_path(char *basepath); char *make_output_path(char *basepath, char *path, int year, int week, int day_of_week); +int isdigit_s(const char *s); #endif // WEEKLY_H
\ No newline at end of file |
