aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordam <dam@gudinoff>2022-11-14 02:28:18 +0000
committerdam <dam@gudinoff>2022-11-14 02:28:18 +0000
commit0ab05e1d379573a8e3b7f92a0ece9308faec2a42 (patch)
treebaece07d318a3c472c397e92cd818cdb1a690ba2
parenta179b41b5853402680af8efcad4d09c179603947 (diff)
downloadtask-time-tracker-0ab05e1d379573a8e3b7f92a0ece9308faec2a42.tar.zst
task-time-tracker-0ab05e1d379573a8e3b7f92a0ece9308faec2a42.zip
Removed inline and static function specifiers. Updated to-do list.
-rw-r--r--main.c10
-rw-r--r--readme.md2
2 files changed, 6 insertions, 6 deletions
diff --git a/main.c b/main.c
index 6ecec1e..106767d 100644
--- a/main.c
+++ b/main.c
@@ -87,11 +87,11 @@ char *string_buffer = NULL; // A temporary buffer for localized actions. Pleas
size_t string_buffer_size = 0;
int size_x, size_y, pos_x, pos_y;
-void inline static trigger_autosave() {
+void trigger_autosave() {
countdown_to_autosave = 13375; // ms
}
-void inline static show_processing() {
+void show_processing() {
mvaddch(0, 0, ACS_DIAMOND);
refresh();
}
@@ -109,7 +109,7 @@ bool is_file_accessible(const char *path) {
}
// Returns true if string to_compare is equal to any of the other passed strings, false otherwise.
-bool inline static is_equal_to_any(const char *to_compare, const char *test_a, const char *test_b) {
+bool is_equal_to_any(const char *to_compare, const char *test_a, const char *test_b) {
return strncmp(to_compare, test_a, strlen(test_a)+1) == 0
|| strncmp(to_compare, test_b, strlen(test_b)+1) == 0;
}
@@ -1053,7 +1053,7 @@ void draw_tui(database_st *db, layout_st *layout) {
mvaddstr(y, x, string_buffer);
}
-static inline void *mem_alloc(size_t mem_size, const char *error_tag) {
+void *mem_alloc(size_t mem_size, const char *error_tag) {
void *mem_pointer = malloc(mem_size);
if(mem_pointer == NULL && mem_size > 0) {
fprintf(stderr, "Failed to allocate memory (%s): %s.\n", (error_tag == NULL ? "undefined" : error_tag), strerror(errno));
@@ -1124,7 +1124,7 @@ void read_input_to_string_buffer_with_space(int row, int column, int length, int
attroff(A_UNDERLINE);
}
-void static inline read_input_to_string_buffer(int row, int column, int length) {
+void read_input_to_string_buffer(int row, int column, int length) {
read_input_to_string_buffer_with_space(row, column, length, length);
}
diff --git a/readme.md b/readme.md
index ea37932..2e28b48 100644
--- a/readme.md
+++ b/readme.md
@@ -66,8 +66,8 @@ Task Time Tracker
- [x] Implement `read_input_to_string_buffer`: -24 delta LOC;
- [x] Wrap malloc (and maybe others) in a function with error checking;
- [x] Move database actions into functions;
- - [ ] Check if draw_tui may be simplified by drawing entire lines of tasks at once and draw columns separators after;
- [ ] Fix bug: archiving/unarchiving task introduces " ," at end of name and increases the number of spaces before comma;
+- [ ] Check if draw_tui may be simplified by drawing entire lines of tasks at once and draw columns separators after;
- [ ] Review all code for bugs related to auto-cast on ptrdiff_t/size_t (signed/unsigned);
- [ ] Try to fix flickering of ncurses;
- [ ] Go over all `TODO` items;