From 131bc80b967fb62c31e8f3badb5b15383df4ae0a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 26 Oct 2010 09:31:16 +0200 Subject: msgfile: Allow to have comments in the simple CSV file --- src/msgfile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/msgfile.c b/src/msgfile.c index 051f5b75..68f05813 100644 --- a/src/msgfile.c +++ b/src/msgfile.c @@ -70,6 +70,10 @@ static void handle_line(struct msg_entries *entries, char *line) char *items[3]; int last_item = 0; + /* Skip comments from the file */ + if (line[0] == '#') + return; + for (i = 0; i < len; ++i) { if (line[i] == '\n' || line[i] == '\r') line[i] = '\0'; -- cgit v1.2.3