diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 36f030553069f0dea3a57f03d2789e0963dd9f33
parent da8d12a47db3e5772251ec8841cd54dbf436015b
Author: Matthias Beyer <mail@beyermatthias.de>
Date:   Mon, 28 Nov 2016 19:31:54 +0100

get_date_str() gets constant params

Diffstat:
Mdiary.c | 2+-
Mdiary.h | 3+--
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/diary.c b/diary.c @@ -220,7 +220,7 @@ bool date_has_entry(char* dir, size_t dir_size, struct tm* i) return (access(epath, F_OK) != -1); } -void get_date_str(struct tm* date, char* date_str, size_t date_str_size) +void get_date_str(const struct tm* date, char* date_str, size_t date_str_size) { strftime(date_str, date_str_size, DATE_FMT, date); } diff --git a/diary.h b/diary.h @@ -28,8 +28,7 @@ void display_entry(char* dir, size_t dir_size, struct tm* date, WINDOW* win, int void edit_cmd(char* dir, size_t dir_size, struct tm* date, char* rcmd, size_t rcmd_size); bool date_has_entry(char* dir, size_t dir_size, struct tm* i); -bool is_leap(int year); -void get_date_str(struct tm* date, char* date_str, size_t date_str_size); +void get_date_str(const struct tm* date, char* date_str, size_t date_str_size); void fpath(char* dir, size_t dir_size, struct tm* date, char* rpath, size_t rpath_size); #endif