sdep

A simple "date+event" line parser
git clone https://git.tronto.net/sdep
Download | Log | Files | Refs | README | LICENSE

commit 62c6e6f3f44545a410e2c89f6ba529468dd72d61
parent 449c547e78c9b79ffc1e0c180940b6f117e435a7
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 15 May 2023 18:05:05 +0200

Removed conflict with string.h namespace

Diffstat:
Msdep.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sdep.c b/sdep.c @@ -56,7 +56,7 @@ static char *format_line(Event, Options, char *); static int is_space(char); static void read_input(Options, EventList *); static Options read_op(int, char *[]); -static char *strtrim(char *); +static char *str_trim(char *); static void write_output(Options, Event *, int); @@ -69,7 +69,7 @@ add_event(struct tm t, char *text, EventList *evlist) next->ev.time = t; next->ev.text = malloc(l); strncpy(next->ev.text, text, l); - next->ev.text = strtrim(next->ev.text); + next->ev.text = str_trim(next->ev.text); next->next = NULL; if (++evlist->count == 1) { @@ -223,7 +223,7 @@ read_op(int argc, char *argv[]) } static char * -strtrim(char *t) +str_trim(char *t) { char *s;