Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/settings.c @ 1203:c96fef31ff96
Expand startswith()
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 28 Apr 2007 12:16:45 +0200 |
parents | 6f602d3270a4 |
children | 2de8f8ba1f34 |
comparison
equal
deleted
inserted
replaced
1202:ede6c7aa59b0 | 1203:c96fef31ff96 |
---|---|
152 if ((*line == '\n') || (*line == '\0') || (*line == '#')) | 152 if ((*line == '\n') || (*line == '\0') || (*line == '#')) |
153 continue; | 153 continue; |
154 | 154 |
155 // We only allow assignments line, except for commands "pgp" and "source" | 155 // We only allow assignments line, except for commands "pgp" and "source" |
156 if ((strchr(line, '=') != NULL) || | 156 if ((strchr(line, '=') != NULL) || |
157 startswith(line, "pgp ") || startswith(line, "source ")) { | 157 startswith(line, "pgp ", FALSE) || startswith(line, "source ", FALSE)) { |
158 // Only accept the set, alias, bind, pgp and source commands | 158 // Only accept the set, alias, bind, pgp and source commands |
159 if (!startswith(line, "set ") && !startswith(line, "bind ") && | 159 if (!startswith(line, "set ", FALSE) && |
160 !startswith(line, "alias ") && !startswith(line, "pgp ") && | 160 !startswith(line, "bind ", FALSE) && |
161 !startswith(line, "source ")) { | 161 !startswith(line, "alias ", FALSE) && |
162 !startswith(line, "pgp ", FALSE) && | |
163 !startswith(line, "source ", FALSE)) { | |
162 scr_LogPrint(LPRINT_LOGNORM, | 164 scr_LogPrint(LPRINT_LOGNORM, |
163 "Error in configuration file (l. %d): bad command", ln); | 165 "Error in configuration file (l. %d): bad command", ln); |
164 err++; | 166 err++; |
165 continue; | 167 continue; |
166 } | 168 } |