diff 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
line wrap: on
line diff
--- a/mcabber/src/settings.c	Fri Apr 27 23:46:15 2007 +0200
+++ b/mcabber/src/settings.c	Sat Apr 28 12:16:45 2007 +0200
@@ -154,11 +154,13 @@
 
     // We only allow assignments line, except for commands "pgp" and "source"
     if ((strchr(line, '=') != NULL) ||
-        startswith(line, "pgp ") || startswith(line, "source ")) {
+        startswith(line, "pgp ", FALSE) || startswith(line, "source ", FALSE)) {
       // Only accept the set, alias, bind, pgp and source commands
-      if (!startswith(line, "set ")   && !startswith(line, "bind ") &&
-          !startswith(line, "alias ") && !startswith(line, "pgp ")  &&
-          !startswith(line, "source ")) {
+      if (!startswith(line, "set ", FALSE)   &&
+          !startswith(line, "bind ", FALSE)  &&
+          !startswith(line, "alias ", FALSE) &&
+          !startswith(line, "pgp ", FALSE)   &&
+          !startswith(line, "source ", FALSE)) {
         scr_LogPrint(LPRINT_LOGNORM,
                      "Error in configuration file (l. %d): bad command", ln);
         err++;