Use a dynamic method to print appointments to stdout
Add a flexible helper function print_apoint() and use it whenever we print appointments to stdout. This reduces the number of copy-pasted code and eventually allows for specifying custom format strings. Following format specifiers are supported: * s: Print the start time of the appointment as UNIX time stamp * S: Print the start time of the appointment using the "hh:mm" format * d: Print the duration of the appointment in seconds * e: Print the end time of the appointment as UNIX time stamp * E: Print the end time of the appointment using the "hh:mm" format * m: Print the description of the item * n: Print the name of the note file belonging to the item Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -922,6 +922,7 @@ int fork_exec (int *, int *, const char *, char *const *);
|
||||
int shell_exec (int *, int *, char *);
|
||||
int child_wait (int *, int *, int);
|
||||
void press_any_key (void);
|
||||
void print_apoint (const char *, long, struct apoint *);
|
||||
|
||||
/* vars.c */
|
||||
extern int col, row;
|
||||
|
||||
Reference in New Issue
Block a user