aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-05-15 17:54:19 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-05-15 17:54:19 +0200
commit650d928cc6164fbf10dc3a32e416737654cd1c2e (patch)
treef37c326a6745aad05ac39a01d976031e5acca0b7
parent415908d6ec85e96d79f7f6267ea01c9cc6f50c77 (diff)
downloadsdep-650d928cc6164fbf10dc3a32e416737654cd1c2e.tar.gz
sdep-650d928cc6164fbf10dc3a32e416737654cd1c2e.zip
Removed unnecessary alignment
-rw-r--r--sdep.c39
1 files changed, 20 insertions, 19 deletions
diff --git a/sdep.c b/sdep.c
index 03d0650..8516678 100644
--- a/sdep.c
+++ b/sdep.c
@@ -18,45 +18,46 @@
18 */ 18 */
19static char *default_format = "%Y-%m-%d %H:%M"; 19static char *default_format = "%Y-%m-%d %H:%M";
20 20
21typedef struct Event Event; 21
22typedef struct Event Event;
22typedef struct EventList EventList; 23typedef struct EventList EventList;
23typedef struct EventNode EventNode; 24typedef struct EventNode EventNode;
24typedef struct Options Options; 25typedef struct Options Options;
25 26
26struct Event{ 27struct Event{
27 struct tm time; 28 struct tm time;
28 char *text; 29 char *text;
29}; 30};
30 31
31struct EventList { 32struct EventList {
32 EventNode *first; 33 EventNode *first;
33 EventNode *last; 34 EventNode *last;
34 int count; 35 int count;
35}; 36};
36 37
37struct EventNode { 38struct EventNode {
38 Event ev; 39 Event ev;
39 EventNode *next; 40 EventNode *next;
40}; 41};
41 42
42struct Options { 43struct Options {
43 struct tm from; 44 struct tm from;
44 struct tm to; 45 struct tm to;
45 char *format_in; 46 char *format_in;
46 char *format_out; 47 char *format_out;
47 char *separator; 48 char *separator;
48}; 49};
49 50
50static void add_event(struct tm, char *, EventList *); 51static void add_event(struct tm, char *, EventList *);
51static int compare_tm(const void *, const void *); 52static int compare_tm(const void *, const void *);
52static int compare_event(const void *, const void *); 53static int compare_event(const void *, const void *);
53static Options default_op(void); 54static Options default_op(void);
54static int events_in_range(EventList *, Options, Event *); 55static int events_in_range(EventList *, Options, Event *);
55static char *format_line(Event, Options, char *); 56static char *format_line(Event, Options, char *);
56static void read_input(Options, EventList *); 57static void read_input(Options, EventList *);
57static Options read_op(int, char *[]); 58static Options read_op(int, char *[]);
58static char *strtrim(char *); 59static char *strtrim(char *);
59static void write_output(Options, Event *, int); 60static void write_output(Options, Event *, int);
60 61
61 62
62static void 63static void

Generated with cgit - Back to sebastiano.tronto.net