From e723c36deef41bea793aeb271ad0fb32ad82b6cd Mon Sep 17 00:00:00 2001 From: Graham Nelson Date: Fri, 8 Apr 2022 21:14:20 +0100 Subject: [PATCH] Allowed inform7 to proceed in -census mode --- inform7/Chapter 1/Main.w | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/inform7/Chapter 1/Main.w b/inform7/Chapter 1/Main.w index bce2b89c1..382bf0870 100755 --- a/inform7/Chapter 1/Main.w +++ b/inform7/Chapter 1/Main.w @@ -99,8 +99,7 @@ isn't set up to allow more, so this error is not easy to generate. if (proj) Problems::fatal("Multiple projects given on the command line"); proj = P; } - if (proj == NULL) Problems::fatal("Nothing to compile"); - if (proj->stand_alone) { + if ((proj) && (proj->stand_alone)) { if (index_explicitly_set == FALSE) Task::disable_or_enable_index(TRUE); /* disable it */ if (problems_explicitly_set == FALSE) @@ -118,31 +117,33 @@ This folder will usually be the |Build| subfolder of the project folder, but we won't assume that. Remember, //supervisor// knows best. @ = - if ((proj->stand_alone == FALSE) || (Log::get_debug_log_filename())) { - pathname *build_folder = Projects::build_path(proj); - if (Pathnames::create_in_file_system(build_folder) == 0) - Problems::fatal( - "Unable to create Build folder for project: is it read-only?"); - - filename *DF = Filenames::in(build_folder, I"Debug log.txt"); - Log::set_debug_log_filename(DF); + if (((proj) && (proj->stand_alone == FALSE)) || (Log::get_debug_log_filename())) { + if (proj) { + pathname *build_folder = Projects::build_path(proj); + if (Pathnames::create_in_file_system(build_folder) == 0) + Problems::fatal( + "Unable to create Build folder for project: is it read-only?"); + filename *DF = Filenames::in(build_folder, I"Debug log.txt"); + Log::set_debug_log_filename(DF); + } Log::open(); LOG("inform7 was called as:"); for (int i=0; i