aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2022-11-13 02:48:56 +0000
committerdam <dam@gudinoff>2022-11-13 02:48:56 +0000
commitff2688e3957c346d4ab9d97be7cabdb74c0d0c25 (patch)
tree74c20ace42d015fa7533a42f71af9a2fbed7e6f6
parentbbc11330984382e926e2a8e936e494193a0e2e23 (diff)
downloadtask-time-tracker-ff2688e3957c346d4ab9d97be7cabdb74c0d0c25.tar.zst
task-time-tracker-ff2688e3957c346d4ab9d97be7cabdb74c0d0c25.zip
Added time edit parsing rules to the help text.
-rw-r--r--main.c8
-rw-r--r--readme.md2
2 files changed, 8 insertions, 2 deletions
diff --git a/main.c b/main.c
index 4d27c38..b88120b 100644
--- a/main.c
+++ b/main.c
@@ -1155,7 +1155,13 @@ int main(int argc, char *argv[]) {
" BACKSPACE Resets times for selected task.\n"
" DELETE Deletes selected task (except if active).\n"
" SPACE, ENTER Toggles selected task as active/inactive.\n"
- " 1, 2, 3, 4, 5, 6, 7 Edit time of current task for the Nth day of week.\n"
+ " 1, 2, 3, 4, 5, 6, 7 Edit time of current task for the Nth day of week:\n"
+ " =# sets # seconds;\n"
+ " -# subtracts # seconds;\n"
+ " # adds # seconds;\n"
+ " #m specifies # as minutes;\n"
+ " #h specifies # as hours;\n"
+ " #y specifies # as years.\n"
" UP Select task above.\n"
" DOWN Select task below.\n"
" PAGE-UP Select task 1 page above.\n"
diff --git a/readme.md b/readme.md
index b5b955c..7982a0d 100644
--- a/readme.md
+++ b/readme.md
@@ -62,7 +62,7 @@ Task Time Tracker
- [ ] Compress code:
- [x] Re-do sprint_time5_utf8: -12 delta LOC;
- [x] Re-do truncate_string_utf8: 0 delta LOC;
- - [ ] Implement `read_input_to_string_buffer`: -24 delta LOC;
+ - [x] Implement `read_input_to_string_buffer`: -24 delta LOC;
- [ ] wrap malloc (and maybe others) in a function with error checking
```c
static inline void *MallocOrDie(size_t MemSize) { void *AllocMem = malloc(MemSize); /* Some implementations return null on a 0 length alloc, * we may as well allow this as it increases compatibility * with very few side effects */ if(!AllocMem && MemSize) { printf("Could not allocate memory!"); exit(-1); } return AllocMem; }