diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-15 18:08:58 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2011-07-15 18:13:45 +0200 |
commit | b362c17daa3cf44f6b62648e1b0fe0175c7a01e6 (patch) | |
tree | 5afe7feb04611b3955d8b3f31219d8e51f8f9908 | |
parent | 5f24132d18895e6b4670798e63812d6611b25459 (diff) | |
download | calcurse-b362c17daa3cf44f6b62648e1b0fe0175c7a01e6.tar.gz calcurse-b362c17daa3cf44f6b62648e1b0fe0175c7a01e6.zip |
Skip indentation and comments in io_extract_data()
We actually only use this function to parse configuration data.
Currently, this probably is the best way to do some common
preprocessing.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
-rw-r--r-- | src/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -806,9 +806,10 @@ io_extract_data (char *dst_data, const char *org, int len) { int i; + for (; *org == ' ' || *org == '\t'; org++); for (i = 0; i < len - 1; i++) { - if (*org == '\n' || *org == '\0') + if (*org == '\n' || *org == '\0' || *org == '#') break; *dst_data++ = *org++; } |