diff options
author | Louie S <louie@example.com> | 2023-06-29 17:55:31 -0700 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-06-29 17:55:31 -0700 |
commit | 4333cd2b11cc32fe75fa1ef31627c667bcc71327 (patch) | |
tree | c99a91f2bd95a5197cefce1286b2799c9e0ea0fb /src/entry.c | |
parent | 58a911618ad82507de8319615309a85341bdc014 (diff) |
entry boilerplate
Diffstat (limited to 'src/entry.c')
-rw-r--r-- | src/entry.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/entry.c b/src/entry.c new file mode 100644 index 0000000..086db8c --- /dev/null +++ b/src/entry.c @@ -0,0 +1,46 @@ +#include <string.h> + +#include "entry.h" + +// getters +char *entry_get_alt_due_date(Entry *e) { + return e->alt_due_date; +} + +char *entry_get_title(Entry *e) { + return e->title; +} + +char *entry_get_color(Entry *e) { + return e->color; +} + +char *entry_get_highlight(Entry *e) { + return e->highlight; +} + +char *entry_get_url(Entry *e) { + return e->url; +} + + +// setters +void entry_set_alt_due_date(Entry *e, char *alt_due_date) { + strcpy(e->alt_due_date, alt_due_date); +} + +void entry_set_title(Entry *e, char *title) { + strcpy(e->title, title); +} + +void entry_set_color(Entry *e, char *color) { + strcpy(e->color, color); +} + +void entry_set_highlight(Entry *e, char *highlight) { + strcpy(e->highlight, highlight); +} + +void entry_set_url(Entry *e, char *url) { + strcpy(e->url, url); +} |