Add:Core:Allow empty config
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 22 Dec 2009 06:31:29 +0000 (06:31 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 22 Dec 2009 06:31:29 +0000 (06:31 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2888 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/config_.c
navit/config_.h
navit/start_real.c

index 39a4d3a..1677428 100644 (file)
@@ -29,6 +29,8 @@ struct config {
        struct callback_list *cbl;
 } *config;
 
+int config_empty_ok;
+
 struct attr_iter {
        void *iter;
 };
index 9f47e99..36fc937 100644 (file)
@@ -1,4 +1,5 @@
 extern struct config *config;
+extern int config_empty_ok;
 /* prototypes */
 enum attr_type;
 struct attr;
index 44f8279..97f5a05 100644 (file)
@@ -167,7 +167,7 @@ int main_real(int argc, char **argv)
                li = g_list_next(li);
        }
        g_list_free(list);
-       if (! config_get_attr(config, attr_navit, &navit, NULL)) {
+       if (! config_get_attr(config, attr_navit, &navit, NULL) && !config_empty_ok) {
                dbg(0, _("No instance has been created, exiting\n"));
                exit(1);
        }