diff --git a/docs/core-module/21-ac.html b/docs/core-module/21-ac.html index ae8a9d74e..9d5eed36f 100644 --- a/docs/core-module/21-ac.html +++ b/docs/core-module/21-ac.html @@ -241,9 +241,7 @@ noun for it; for example, the "announcing activity". av->name = W; av->av_package = Hierarchy::local_package(ACTIVITIES_HAP); - av->av_iname = InterNames::new(ACTIVITY_INAMEF); - av->av_iname->eventual_owner = av->av_package; - InterNames::attach_memo(av->av_iname, av->name); + av->av_iname = Hierarchy::make_iname_with_memo(ACTIVITY_HL, av->av_package, av->name); packaging_state save = Packaging::enter_home_of(av->av_iname); Emit::named_numeric_constant(av->av_iname, (inter_t) av->allocation_id); Packaging::exit(save); diff --git a/docs/core-module/21-rl.html b/docs/core-module/21-rl.html index acdbad672..c1c6dbf01 100644 --- a/docs/core-module/21-rl.html +++ b/docs/core-module/21-rl.html @@ -726,10 +726,8 @@ do.
     inter_name *Rules::shell_iname(rule *R) {
-        if (R->shell_routine_iname == NULL) {
-            R->shell_routine_iname =
-                Packaging::function(InterNames::one_off(I"shell_fn", R->rule_package), R->rule_package, InterNames::new(RULE_SHELL_ROUTINE_INAMEF));
-        }
+        if (R->shell_routine_iname == NULL)
+            R->shell_routine_iname = Hierarchy::make_iname_in(SHELL_FN_HL, R->rule_package);
         return R->shell_routine_iname;
     }
 
diff --git a/docs/core-module/24-ch.html b/docs/core-module/24-ch.html
index b39bffe7c..17d2850b1 100644
--- a/docs/core-module/24-ch.html
+++ b/docs/core-module/24-ch.html
@@ -66,10 +66,7 @@ storage: the following simple structures are used for this.
     void Chronology::compile_past_action_pattern(value_holster *VH, time_period duration, action_pattern ap) {
         char *op = duration.inform6_operator;
         package_request *PR = Hierarchy::local_package(PAST_ACTION_PATTERNS_HAP);
-        inter_name *pta_routine = Packaging::function(
-            InterNames::one_off(I"pap_fn", PR),
-            PR,
-            InterNames::new(PAST_ACTION_ROUTINE_INAMEF));
+        inter_name *pta_routine = Hierarchy::make_iname_in(PAP_FN_HL, PR);
         LOGIF(TIME_PERIODS,
             "Chronology::compile_past_action_pattern on: $A\nat: $t\n", &ap, &duration);
         if (PL::Actions::Patterns::makes_callings(&ap)) {
diff --git a/docs/core-module/26-rt.html b/docs/core-module/26-rt.html
index 4f8b736d4..d598238d7 100644
--- a/docs/core-module/26-rt.html
+++ b/docs/core-module/26-rt.html
@@ -36,9 +36,9 @@ an I6 routine. Sometimes that's in order to define a phrase, but often not.
 
 

-

The function Routines::begin is used in 4/am (§43), 5/lp (§27), 5/nv (§16), 6/bp (§33), 6/rlt (§15, §15.2, §17, §29.1, §29.2, §29.3, §29.4, §29.5, §29.6, §30), 6/nv (§18.1, §18.2), 8/ef (§19), 12/cdp (§2.1), 13/rsfk (§16.3, §26.1, §26.2, §26.3, §26.4, §26.5, §26.6.1, §26.6.2, §26.6.3, §26.6.4, §26.6.5, §26.6.6, §27), 15/ma (§13), 17/tl (§14.2), 17/ts (§11), 17/rs (§6.1, §6.2, §7.2), 19/tc (§8), 19/rsft (§2), 20/eq (§43), 21/rl (§20, §22.1), 21/rb (§23), 21/rl2 (§14.1), 21/fao (§10), 21/sv (§3), 22/pav (§9.2), 24/ch (§6, §7), 26/uo (§21.1, §21.2), 26/lt (§4.1), 26/ts (§10, §11).

+

The function Routines::begin is used in 4/am (§34.2, §43), 5/lp (§27), 5/nv (§16), 6/bp (§33), 6/rlt (§15, §15.2, §17, §29.1, §29.2, §29.3, §29.4, §29.5, §29.6, §30), 6/nv (§18.1, §18.2), 8/ef (§19), 12/cdp (§2.1), 13/rsfk (§16.3, §26.1, §26.2, §26.3, §26.4, §26.5, §26.6.1, §26.6.2, §26.6.3, §26.6.4, §26.6.5, §26.6.6, §27), 15/ma (§13), 17/tl (§14.2), 17/ts (§11), 17/rs (§6.1, §6.2, §7.2), 19/tc (§8), 19/rsft (§2), 20/eq (§43), 21/rl (§20, §22.1), 21/rb (§23), 21/rl2 (§14.1), 21/fao (§10), 21/sv (§3), 22/pav (§9.2), 24/ch (§6, §7), 26/uo (§21.1, §21.2), 26/lt (§4.1), 26/ts (§10, §11).

-

The function Routines::begin_in_current_package is used in 4/am (§34.2), 21/rb (§24.1.1).

+

The function Routines::begin_in_current_package is used in 21/rb (§24.1.1).

§2. During the time when we're compiling the body of the routine, we need to keep track of: @@ -133,8 +133,11 @@ create a new nonphrasal stack frame. if (Packaging::houseed_in_function(public_name)) { kernel_name = InterNames::one_off(I"kernel", public_name->eventual_owner); Inter::Symbols::set_flag(InterNames::to_symbol(kernel_name), MAKE_NAME_UNIQUE); - } else + } else { kernel_name = InterNames::new_in(KERNEL_ROUTINE_INAMEF, InterNames::to_module(public_name)); + LOG("PN is %n\n", public_name); + internal_error("Routine not in function"); + } Packaging::house_with(kernel_name, public_name); } diff --git a/docs/core-module/27-hl.html b/docs/core-module/27-hl.html index 9f05b547d..ad7fa5062 100644 --- a/docs/core-module/27-hl.html +++ b/docs/core-module/27-hl.html @@ -229,34 +229,108 @@ LOG("Have type: $3, required: $3\n", P->eventual_type, nrl->requirements.any_package_of_this_type); internal_error("constant in wrong superpackage"); } + inter_name *iname = NULL; + if (nrl->trans.translate_to) { + text_stream *T = nrl->trans.translate_to; + <Make the actual iname 1.1>; + } else if (nrl->trans.generate_from >= 0) { + TEMPORARY_TEXT(T); + inter_name *temp_iname = NULL; + if (nrl->trans.localise) + temp_iname = InterNames::new_in(nrl->trans.generate_from, C); + else + temp_iname = InterNames::new(nrl->trans.generate_from); + WRITE_TO(T, "%n", temp_iname); + <Make the actual iname 1.1>; + DISCARD_TEXT(T); + } else { + text_stream *T = NULL; + <Make the actual iname 1.1>; + } + + if (nrl->trans.then_make_unique) + Inter::Symbols::set_flag(InterNames::to_symbol(iname), MAKE_NAME_UNIQUE); + return iname; + } +

+ +

+ +

The function HierarchyLocations::blank is used in 27/hr (§1).

+ +

The function HierarchyLocations::local_submodule is used in 27/hr (§1.4, §1.6, §1.8, §1.12, §1.14, §1.16, §1.20, §1.22, §1.24, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.44).

+ +

The function HierarchyLocations::generic_submodule is used in 27/hr (§1.2, §1.4, §1.14, §1.28, §1.36, §1.38).

+ +

The function HierarchyLocations::synoptic_submodule is used in 27/hr (§1.2, §1.4, §1.6, §1.10, §1.12, §1.18, §1.22, §1.26, §1.28, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42).

+ +

The function HierarchyLocations::any_package_of_type is used in 27/hr (§1.4, §1.6, §1.8, §1.12, §1.14, §1.16, §1.20, §1.22, §1.24, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.44).

+ +

The function HierarchyLocations::this_package is used in 27/hr (§1.48, §5).

+ +

The function HierarchyLocations::this_exotic_package is used in 27/hr (§1.46).

+ +

The function HierarchyLocations::new appears nowhere else.

+ +

The function HierarchyLocations::con is used in 27/hr (§1.2, §1.4, §1.6, §1.8, §1.10, §1.12, §1.14, §1.20, §1.22, §1.26, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.44, §1.46, §1.48, §5).

+ +

The function HierarchyLocations::package is used in 27/hr (§1.4, §1.6).

+ +

The function HierarchyLocations::make_as is used in 27/hr (§5).

+ +

The function HierarchyLocations::func is used in 27/hr (§1.4, §1.6, §1.8, §1.12, §1.14, §1.16, §1.18, §1.22, §1.24, §1.26, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.46).

+ +

The function HierarchyLocations::datum is used in 27/hr (§1.10).

+ +

The function HierarchyLocations::create_nrls is used in §2.

+ +

The function HierarchyLocations::index appears nowhere else.

+ +

The function HierarchyLocations::find is used in 27/hr (§5).

+ +

The function HierarchyLocations::find_by_name is used in 27/hr (§5).

+ +

The function HierarchyLocations::function appears nowhere else.

+ +

The function HierarchyLocations::nrl_to_iname appears nowhere else.

+ +

The function HierarchyLocations::find_in_package is used in 27/hr (§5).

+ +

The structure location_requirement is accessed in 27/hr and here.

+ +

The structure named_resource_location is private to this section.

+ +

§1.1. +<Make the actual iname 1.1> = +

+ + +
         if (Str::len(nrl->function_package_name) > 0) {
             iname = Packaging::function_text(
                     InterNames::one_off(nrl->function_package_name, P),
                     P,
                     NULL);
         } else {
-            iname = InterNames::one_off(nrl->access_name, P);
+            if (Str::len(nrl->access_name) == 0) {
+            LOG("********** %S\n", T);
+                iname = InterNames::one_off(T, P);
+            } else
+                iname = InterNames::one_off(nrl->access_name, P);
         }
         if (!Wordings::empty(W)) InterNames::attach_memo(iname, W);
-        if (nrl->trans.translate_to)
-            InterNames::translate(iname, nrl->trans.translate_to);
-        if (nrl->trans.then_make_unique)
-            Inter::Symbols::set_flag(InterNames::to_symbol(iname), MAKE_NAME_UNIQUE);
-        if (nrl->trans.generate_from >= 0) {
-            inter_name *temp_iname = NULL;
-            if (nrl->trans.localise)
-                temp_iname = InterNames::new_in(nrl->trans.generate_from, C);
-            else
-                temp_iname = InterNames::new(nrl->trans.generate_from);
-            TEMPORARY_TEXT(T);
-            WRITE_TO(T, "%n", temp_iname);
-            InterNames::translate(iname, T);
-            DISCARD_TEXT(T);
-        }
-        return iname;
-    }
+        if ((Str::len(T) > 0) && (nrl->access_name)) InterNames::translate(iname, T);
+
+

+ +

This code is used in §1 (three times).

+ +

§2.

+ + +
     package_request *HierarchyLocations::package_in_package(int id, package_request *P) {
         if (nrls_created == FALSE) HierarchyLocations::create_nrls();
         if ((id < 0) || (id >= MAX_HL) || (nrls_indexed_by_id[id] == NULL))
@@ -271,53 +345,9 @@
 
 

-

The function HierarchyLocations::blank is used in 27/hr (§1).

- -

The function HierarchyLocations::local_submodule is used in 27/hr (§1.4, §1.6, §1.8, §1.12, §1.14, §1.16, §1.20, §1.22, §1.24, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.44).

- -

The function HierarchyLocations::generic_submodule is used in 27/hr (§1.2, §1.4, §1.14, §1.28, §1.36, §1.38).

- -

The function HierarchyLocations::synoptic_submodule is used in 27/hr (§1.2, §1.4, §1.6, §1.10, §1.12, §1.18, §1.22, §1.26, §1.28, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42).

- -

The function HierarchyLocations::any_package_of_type is used in 27/hr (§1.4, §1.6, §1.8, §1.16, §1.20, §1.22, §1.24, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42).

- -

The function HierarchyLocations::this_package is used in 27/hr (§1.48, §5).

- -

The function HierarchyLocations::this_exotic_package is used in 27/hr (§1.46).

- -

The function HierarchyLocations::new appears nowhere else.

- -

The function HierarchyLocations::con is used in 27/hr (§1.2, §1.4, §1.6, §1.8, §1.10, §1.12, §1.14, §1.20, §1.22, §1.26, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.46, §1.48, §5).

- -

The function HierarchyLocations::package is used in 27/hr (§1.4, §1.6).

- -

The function HierarchyLocations::make_as is used in 27/hr (§5).

- -

The function HierarchyLocations::func is used in 27/hr (§1.4, §1.6, §1.8, §1.12, §1.16, §1.18, §1.22, §1.24, §1.26, §1.28, §1.30, §1.32, §1.34, §1.36, §1.38, §1.40, §1.42, §1.46).

- -

The function HierarchyLocations::datum is used in 27/hr (§1.10).

- -

The function HierarchyLocations::create_nrls appears nowhere else.

- -

The function HierarchyLocations::index appears nowhere else.

- -

The function HierarchyLocations::find is used in 27/hr (§5).

- -

The function HierarchyLocations::find_by_name is used in 27/hr (§5).

- -

The function HierarchyLocations::function appears nowhere else.

- -

The function HierarchyLocations::nrl_to_iname appears nowhere else.

- -

The function HierarchyLocations::find_in_package is used in 27/hr (§5).

-

The function HierarchyLocations::package_in_package is used in 27/hr (§5).

-

The structure location_requirement is accessed in 27/hr and here.

- -

The structure named_resource_location is private to this section.

- -

§2.

+

§3.

@@ -388,7 +418,7 @@
 
 

The structure hierarchy_attachment_point is accessed in 8/ed and here.

-

§3.

+

§4.

@@ -412,7 +442,7 @@
 
 

-

The function HierarchyLocations::ptype is used in §1, §2.

+

The function HierarchyLocations::ptype is used in §1, §3.



diff --git a/docs/core-module/27-hr.html b/docs/core-module/27-hr.html index 67327085d..804f4cd0f 100644 --- a/docs/core-module/27-hr.html +++ b/docs/core-module/27-hr.html @@ -22,7 +22,6 @@ enum PROPOSITION_PR_COUNTER enum SUBSTITUTION_PR_COUNTER enum SUBSTITUTIONF_PR_COUNTER - enum TASK_PR_COUNTER
@@ -217,6 +216,7 @@
 
 
     enum ACTIVITIES_HAP
+    enum ACTIVITY_HL
     enum BEFORE_RB_HL
     enum FOR_RB_HL
     enum AFTER_RB_HL
@@ -238,6 +238,7 @@
         location_requirement local_activities = HierarchyLocations::local_submodule(activities);
         HierarchyLocations::ap(ACTIVITIES_HAP, local_activities, I"activity", I"_activity");
             location_requirement in_activity = HierarchyLocations::any_package_of_type(I"_activity");
+            HierarchyLocations::con(ACTIVITY_HL, NULL, Translation::generate(ACTIVITY_INAMEF), in_activity);
             HierarchyLocations::package(BEFORE_RB_HL, I"before_rb", I"_rulebook", in_activity);
             HierarchyLocations::package(FOR_RB_HL, I"for_rb", I"_rulebook", in_activity);
             HierarchyLocations::package(AFTER_RB_HL, I"after_rb", I"_rulebook", in_activity);
@@ -265,6 +266,8 @@
     enum MEASUREMENT_FN_HL
     enum ADJECTIVE_PHRASES_HAP
     enum DEFINITION_FN_HL
+    enum ADJECTIVE_TASKS_HAP
+    enum TASK_FN_HL
 

§1.8. <Establish adjectives 1.8> = @@ -278,6 +281,9 @@ HierarchyLocations::ap(ADJECTIVES_HAP, local_adjectives, I"adjective", I"_adjective"); location_requirement in_adjective = HierarchyLocations::any_package_of_type(I"_adjective"); HierarchyLocations::con(ADJECTIVE_HL, I"adjective", Translation::uniqued(), in_adjective); + HierarchyLocations::ap(ADJECTIVE_TASKS_HAP, in_adjective, I"adjective_task", I"_adjective_task"); + location_requirement in_adjective_task = HierarchyLocations::any_package_of_type(I"_adjective_task"); + HierarchyLocations::func(TASK_FN_HL, I"task_fn", Translation::uniqued(), in_adjective_task); HierarchyLocations::ap(ADJECTIVE_MEANINGS_HAP, local_adjectives, I"adjective_meaning", I"_adjective_meaning"); location_requirement in_adjective_meaning = HierarchyLocations::any_package_of_type(I"_adjective_meaning"); HierarchyLocations::func(MEASUREMENT_FN_HL, I"measurement_fn", Translation::generate(MEASUREMENT_ADJECTIVE_INAMEF), in_adjective_meaning); @@ -327,6 +333,7 @@

     enum PAST_ACTION_PATTERNS_HAP
+    enum PAP_FN_HL
     enum TIMEDEVENTSTABLE_HL
     enum TIMEDEVENTTIMESTABLE_HL
     enum PASTACTIONSI6ROUTINES_HL
@@ -344,6 +351,8 @@
 
         location_requirement local_chronology = HierarchyLocations::local_submodule(chronology);
         HierarchyLocations::ap(PAST_ACTION_PATTERNS_HAP, local_chronology, I"past_action_pattern", I"_past_action_pattern");
+            location_requirement in_past_action_pattern = HierarchyLocations::any_package_of_type(I"_past_action_pattern");
+            HierarchyLocations::func(PAP_FN_HL, I"pap_fn", Translation::generate(PAST_ACTION_ROUTINE_INAMEF), in_past_action_pattern);
 
         location_requirement synoptic_chronology = HierarchyLocations::synoptic_submodule(chronology);
         HierarchyLocations::con(TIMEDEVENTSTABLE_HL, I"TimedEventsTable", Translation::same(), synoptic_chronology);
@@ -367,7 +376,10 @@
     enum CV_NEG_HL
     enum CV_POS_HL
     enum MVERBS_HAP
+    enum MODAL_CONJUGATION_FN_HL
     enum VERBS_HAP
+    enum NONMODAL_CONJUGATION_FN_HL
+    enum CONJUGATION_FN_HL
 

§1.14. <Establish conjugations 1.14> = @@ -385,7 +397,11 @@ location_requirement local_conjugations = HierarchyLocations::local_submodule(conjugations); HierarchyLocations::ap(MVERBS_HAP, local_conjugations, I"mverb", I"_modal_verb"); + location_requirement in_modal_verb = HierarchyLocations::any_package_of_type(I"_modal_verb"); + HierarchyLocations::func(MODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(CONJUGATE_VERB_ROUTINE_INAMEF), in_modal_verb); HierarchyLocations::ap(VERBS_HAP, local_conjugations, I"verb", I"_verb"); + location_requirement in_verb = HierarchyLocations::any_package_of_type(I"_verb"); + HierarchyLocations::func(NONMODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(CONJUGATE_VERB_ROUTINE_INAMEF), in_verb);

@@ -859,6 +875,7 @@ enum TTF_SUM_HL enum MEANINGLESS_RR_HL enum RELATIONS_HAP + enum RELATION_RECORD_HL enum BITMAP_HL enum ROUTE_CACHE_HL enum HANDLER_FN_HL @@ -904,6 +921,7 @@ location_requirement local_rels = HierarchyLocations::local_submodule(relations); HierarchyLocations::ap(RELATIONS_HAP, local_rels, I"relation", I"_relation"); location_requirement in_relation = HierarchyLocations::any_package_of_type(I"_relation"); + HierarchyLocations::con(RELATION_RECORD_HL, NULL, Translation::generate(RELATION_RECORD_INAMEF), in_relation); HierarchyLocations::con(BITMAP_HL, I"as_constant", Translation::uniqued(), in_relation); HierarchyLocations::con(ROUTE_CACHE_HL, I"route_cache", Translation::uniqued(), in_relation); HierarchyLocations::func(HANDLER_FN_HL, I"handler_fn", Translation::uniqued(), in_relation); @@ -976,6 +994,7 @@
     enum RULES_HAP
+    enum SHELL_FN_HL
     enum RULE_FN_HL
     enum EXTERIOR_RULE_HL
     enum RESPONSES_HAP
@@ -996,6 +1015,7 @@
         location_requirement local_rules = HierarchyLocations::local_submodule(rules);
         HierarchyLocations::ap(RULES_HAP, local_rules, I"rule", I"_rule");
             location_requirement in_rule = HierarchyLocations::any_package_of_type(I"_rule");
+            HierarchyLocations::func(SHELL_FN_HL, I"shell_fn", Translation::generate_in(RULE_SHELL_ROUTINE_INAMEF), in_rule);
             HierarchyLocations::func(RULE_FN_HL, I"rule_fn", Translation::generate_in(PHRASE_INAMEF), in_rule);
             HierarchyLocations::con(EXTERIOR_RULE_HL, I"exterior_rule", Translation::uniqued(), in_rule);
             HierarchyLocations::ap(RESPONSES_HAP, in_rule, I"response", I"_response");
@@ -1054,6 +1074,7 @@
 
 
     enum VARIABLES_HAP
+    enum VARIABLE_HL
 

§1.44. <Establish variables 1.44> = @@ -1065,6 +1086,8 @@ location_requirement local_variables = HierarchyLocations::local_submodule(variables); HierarchyLocations::ap(VARIABLES_HAP, local_variables, I"variable", I"_variable"); + location_requirement in_variable = HierarchyLocations::any_package_of_type(I"_variable"); + HierarchyLocations::con(VARIABLE_HL, NULL, Translation::generate(VARIABLE_INAMEF), in_variable);

@@ -1659,7 +1682,7 @@

-

The function Hierarchy::exotic_package is used in 27/hl (§1, §2).

+

The function Hierarchy::exotic_package is used in 27/hl (§1, §3).

§4.

@@ -1802,13 +1825,13 @@

The function Hierarchy::local_package is used in 5/ins (§14), 9/tc (§5.4.2.4), 19/tb (§9), 20/eq (§10.1), 21/rl (§5), 21/fao (§10), 21/ac (§6), 24/ch (§3), 26/lt (§3), 26/ts (§9.1).

-

The function Hierarchy::package_within is used in 17/rs (§5), 19/tc (§9), 22/pav (§7), 22/tp (§7).

+

The function Hierarchy::package_within is used in 4/am (§6), 17/rs (§5), 19/tc (§9), 22/pav (§7), 22/tp (§7).

-

The function Hierarchy::make_iname_in is used in 6/bp (§32), 6/rlt (§9, §9.13, §20, §20.3), 13/rsfk (§13.1.1, §15), 15/ma (§11.3), 17/rs (§5, §6.1), 19/tc (§9), 19/tb (§9), 20/eq (§10.1), 21/rl (§9), 21/rl2 (§10, §14), 21/ac (§8), 22/ph (§11), 22/pav (§7, §9), 26/lt (§3), 26/jl (§3), 26/ts (§9.1).

+

The function Hierarchy::make_iname_in is used in 4/am (§6), 6/bp (§32, §42), 6/rlt (§9, §9.13, §20, §20.3), 13/rsfk (§13.1.1, §15), 15/ma (§11.3), 17/rs (§5, §6.1), 19/tc (§9), 19/tb (§9), 20/eq (§10.1), 21/rl (§9, §19), 21/rl2 (§10, §14), 21/ac (§8), 22/ph (§11), 22/pav (§7, §9), 24/ch (§3), 26/lt (§3), 26/jl (§3), 26/ts (§9.1).

The function Hierarchy::make_localised_iname_in is used in 22/pu (§6), 22/tp (§7).

-

The function Hierarchy::make_iname_with_memo appears nowhere else.

+

The function Hierarchy::make_iname_with_memo is used in 5/nv (§16), 21/ac (§6).

The function Hierarchy::make_package_in is used in 21/ac (§6).

diff --git a/docs/core-module/27-in.html b/docs/core-module/27-in.html index f6e545fd4..50cd04b6d 100644 --- a/docs/core-module/27-in.html +++ b/docs/core-module/27-in.html @@ -85,7 +85,7 @@

The structure inter_name_consumption_token is private to this section.

-

The structure inter_name is accessed in 4/am, 5/ins, 5/nv, 6/bp, 13/rsfk, 17/tl, 17/rs, 21/rl2, 21/ac, 22/ph, 26/jl, 26/rt, 27/ei, 27/cm, 27/pc, 27/hl and here.

+

The structure inter_name is accessed in 5/ins, 5/nv, 13/rsfk, 17/tl, 17/rs, 21/rl2, 22/ph, 26/jl, 26/rt, 27/ei, 27/cm, 27/pc, 27/hl and here.

§3.

@@ -338,11 +338,11 @@

The function InterNames::new_in_space is used in §4.

-

The function InterNames::one_off is used in 5/un (§1), 12/cdp (§5), 15/pr (§27), 17/tl (§14.2), 21/rl (§9, §19), 21/fao (§10), 24/ch (§3), 26/rt (§4), 27/pc (§7, §7.1, §8), 27/hl (§1), 27/hr (§5).

+

The function InterNames::one_off is used in 5/un (§1), 12/cdp (§5), 15/pr (§27), 17/tl (§14.2), 21/rl (§9), 21/fao (§10), 26/rt (§4), 27/pc (§7, §7.1, §8), 27/hl (§1, §1.1, §2), 27/hr (§5).

-

The function InterNames::attach_memo is used in §4, 5/un (§1), 5/nv (§16), 13/rsfk (§13.1.1), 15/pr (§27), 15/ep (§4), 15/vp (§3), 19/tb (§20), 21/fao (§10), 21/ac (§6), 27/hl (§1).

+

The function InterNames::attach_memo is used in §4, 5/un (§1), 13/rsfk (§13.1.1), 15/pr (§27), 15/ep (§4), 15/vp (§3), 19/tb (§20), 21/fao (§10), 27/hl (§1.1).

-

The function InterNames::to_symbol is used in §5, 4/am (§6, §43), 5/lp (§19, §19.3.1, §19.3.1.1, §19.3.2, §19.2.1), 5/un (§1), 5/ins (§14), 5/nv (§12), 6/bp (§33), 6/rlt (§15, §15.1.2, §15.1.3, §15.2.1, §15.2.5.1, §15.2.6, §15.2.10, §15.2.11, §15.2.12, §15.2.9.1, §15.2.10.1, §15.2.12.1, §29.5, §29.6), 6/nv (§17, §18.2), 12/dtd (§4, §7.1.2, §11, §17, §27), 12/cdp (§2.1.6.1.8, §2.1.6.1.2.2.3, §2.1.6.1.9, §5), 13/ca (§1, §1.2, §1.3, §1.4, §1.5, §1.6, §1.7, §1.8, §1.9, §1.11, §1.12), 13/rsfk (§5, §7, §9, §12, §13.1.1, §19, §20, §26.6.1, §26.6.2, §26.6.3, §26.6.4, §26.6.5, §26.6.6), 14/lv (§14.3, §14.4, §14.5), 14/cfs (§7), 15/pr (§21, §22.1, §27), 17/tl (§7, §10.2.1, §13, §14.2), 17/ts (§5, §7, §8), 17/rs (§6.1, §6.2, §7.2), 18/lc (§11), 19/tc (§8), 19/tb (§20), 20/eq (§48), 21/rl (§9, §11.2, §22, §22.1), 21/rb (§24.1.3.1), 21/fao (§10), 21/sv (§3.2), 21/ac (§14), 22/prcd (§10, §10.1.1.1), 22/pav (§9.2), 24/lv (§41), 24/ch (§4), 25/ci (§3.2.3.6), 25/ciac (§2), 25/cii (§3.1.1.4.7.1, §3.1.1.4.9, §3.1.1.4.10, §3.5.3, §3.5.8, §3.5.8.1), 25/cp (§6), 26/rt (§4, §4.1.2, §4.1.3, §4.1.4), 26/iti (§9), 26/ts (§10, §12), 27/is (§32), 27/ei (§3, §4, §5), 27/pc (§8), 27/hl (§1), 27/hr (§5).

+

The function InterNames::to_symbol is used in §5, 4/am (§43), 5/lp (§19, §19.3.1, §19.3.1.1, §19.3.2, §19.2.1), 5/un (§1), 5/ins (§14), 5/nv (§12), 6/bp (§33), 6/rlt (§15, §15.1.2, §15.1.3, §15.2.1, §15.2.5.1, §15.2.6, §15.2.10, §15.2.11, §15.2.12, §15.2.9.1, §15.2.10.1, §15.2.12.1, §29.5, §29.6), 6/nv (§17, §18.2), 12/dtd (§4, §7.1.2, §11, §17, §27), 12/cdp (§2.1.6.1.8, §2.1.6.1.2.2.3, §2.1.6.1.9, §5), 13/ca (§1, §1.2, §1.3, §1.4, §1.5, §1.6, §1.7, §1.8, §1.9, §1.11, §1.12), 13/rsfk (§5, §7, §9, §12, §13.1.1, §19, §20, §26.6.1, §26.6.2, §26.6.3, §26.6.4, §26.6.5, §26.6.6), 14/lv (§14.3, §14.4, §14.5), 14/cfs (§7), 15/pr (§21, §22.1, §27), 17/tl (§7, §10.2.1, §13, §14.2), 17/ts (§5, §7, §8), 17/rs (§6.1, §6.2, §7.2), 18/lc (§11), 19/tc (§8), 19/tb (§20), 20/eq (§48), 21/rl (§9, §11.2, §22, §22.1), 21/rb (§24.1.3.1), 21/fao (§10), 21/sv (§3.2), 21/ac (§14), 22/prcd (§10, §10.1.1.1), 22/pav (§9.2), 24/lv (§41), 24/ch (§4), 25/ci (§3.2.3.6), 25/ciac (§2), 25/cii (§3.1.1.4.7.1, §3.1.1.4.9, §3.1.1.4.10, §3.5.3, §3.5.8, §3.5.8.1), 25/cp (§6), 26/rt (§4, §4.1.2, §4.1.3, §4.1.4), 26/iti (§9), 26/ts (§10, §12), 27/is (§32), 27/ei (§3, §4, §5), 27/pc (§8), 27/hl (§1), 27/hr (§5).

The function InterNames::to_text is used in 15/vp (§3).

@@ -577,7 +577,7 @@

-

The function InterNames::new is used in §5, 5/nv (§16), 6/bp (§42), 13/rsfk (§13.1.1), 17/tl (§14.2), 21/rl (§19), 21/ac (§6), 24/ch (§3), 27/hl (§1).

+

The function InterNames::new is used in §5, 13/rsfk (§13.1.1), 17/tl (§14.2), 27/hl (§1).

The function InterNames::new_in is used in 26/rt (§4), 27/ei (§4), 27/hl (§1).

@@ -599,7 +599,7 @@

The function InterNames::template_weak_ID_name appears nowhere else.

-

The function InterNames::translate is used in 5/un (§1), 13/rsfk (§26), 27/hl (§1).

+

The function InterNames::translate is used in 5/un (§1), 13/rsfk (§26), 27/hl (§1.1).

§5.

diff --git a/docs/core-module/27-pc.html b/docs/core-module/27-pc.html index 8e3649b7d..78e4e368d 100644 --- a/docs/core-module/27-pc.html +++ b/docs/core-module/27-pc.html @@ -112,7 +112,7 @@

-

The function Packaging::request is used in §7, §7.1, §8, 27/hl (§1, §2), 27/hr (§5).

+

The function Packaging::request is used in §7, §7.1, §8, 27/hl (§2, §3), 27/hr (§5).

The function Packaging::log is used in 1/cm (§5, §6.6).

@@ -236,7 +236,7 @@

-

The function Packaging::enter is used in §5, 4/am (§34.2), 5/ins (§34), 5/nv (§16), 13/rsfk (§16.1, §26), 15/epv (§2), 16/ic (§10), 17/rs (§6.1, §7.1), 21/rl (§9), 21/rl2 (§20), 22/ph (§12), 27/ei (§3, §4), 27/hl (§1).

+

The function Packaging::enter is used in §5, 5/ins (§34), 5/nv (§16), 13/rsfk (§16.1, §26), 15/epv (§2), 16/ic (§10), 17/rs (§6.1, §7.1), 21/rl (§9), 21/rl2 (§20), 22/ph (§12), 27/ei (§3, §4), 27/hl (§1).

The function Packaging::exit is used in 5/ins (§34), 5/nv (§16), 6/bp (§42), 6/rlt (§14, §15.1, §20, §20.3), 6/nv (§18), 12/cdp (§2.1.1), 13/kak (§5), 13/rsfk (§4, §16.1, §16.2, §26), 15/pr (§27), 15/epv (§1.1.2, §2), 16/ic (§10), 17/tl (§14.1, §14.2, §16), 17/ts (§8.1, §11), 17/rs (§6.1, §7.1, §7.3), 18/lc (§11, §12.1), 19/rsft (§1.1.1.1, §1.1.1.1.1, §1.2, §1.3), 21/rl (§9), 21/rl2 (§14, §20), 21/fao (§10), 21/ac (§6, §8, §14), 22/cs (§8), 22/ph (§12), 22/pav (§8.1), 22/tp2 (§4), 24/ch (§6, §8), 26/vm (§8), 26/uo (§21), 26/lt (§4.1), 26/jl (§6), 26/rt (§4), 26/iti (§10), 26/pl (§12), 26/ts (§10), 27/ei (§3, §4), 27/hl (§1), 27/hr (§4).

@@ -358,7 +358,7 @@

The function Packaging::initialise_submodules appears nowhere else.

-

The function Packaging::request_resource is used in 27/hl (§2).

+

The function Packaging::request_resource is used in 27/hl (§3).

The function Packaging::local_resource appears nowhere else.

@@ -494,15 +494,15 @@

-

The function Packaging::register_counter is used in 27/hl (§2), 27/hr (§1).

+

The function Packaging::register_counter is used in 27/hl (§3), 27/hr (§1).

-

The function Packaging::register_ptype is used in 27/hl (§3).

+

The function Packaging::register_ptype is used in 27/hl (§4).

-

The function Packaging::supply_iname is used in 4/am (§6), 6/rlt (§15.1.2), 12/dtd (§4), 13/rsfk (§19), 17/tl (§7, §10.2.1, §14.2), 17/ts (§5), 18/lc (§11), 27/ei (§4), 27/hl (§2).

+

The function Packaging::supply_iname is used in 6/rlt (§15.1.2), 12/dtd (§4), 13/rsfk (§19), 17/tl (§7, §10.2.1, §14.2), 17/ts (§5), 18/lc (§11), 27/ei (§4), 27/hl (§3).

-

The function Packaging::function is used in 12/dtd (§4), 17/tl (§14.2), 17/ts (§5), 21/rl (§19), 24/ch (§3), 27/hl (§1).

+

The function Packaging::function is used in 12/dtd (§4), 17/tl (§14.2), 17/ts (§5), 27/hl (§1).

-

The function Packaging::function_text is used in 21/rl (§9), 27/hl (§1).

+

The function Packaging::function_text is used in 21/rl (§9), 27/hl (§1, §1.1).

The function Packaging::datum_text is used in 27/hl (§1).

diff --git a/docs/core-module/27-tr.html b/docs/core-module/27-tr.html index 85a7767d7..a9b910b8b 100644 --- a/docs/core-module/27-tr.html +++ b/docs/core-module/27-tr.html @@ -72,7 +72,7 @@

The function Translation::to_uniqued appears nowhere else.

-

The function Translation::generate is used in 27/hr (§1.8, §1.22, §1.24, §1.28, §1.30, §1.34).

+

The function Translation::generate is used in 27/hr (§1.6, §1.8, §1.12, §1.14, §1.22, §1.24, §1.28, §1.30, §1.34, §1.36, §1.44).

The function Translation::generate_in is used in 27/hr (§1.32, §1.40).

diff --git a/docs/core-module/4-am.html b/docs/core-module/4-am.html index 05eb45ad7..0011ca117 100644 --- a/docs/core-module/4-am.html +++ b/docs/core-module/4-am.html @@ -201,10 +201,8 @@ adjectival phrase in sorted order, so: aih->aph_held = aph; aih->task_code = task; aih->weak_ID_of_domain = weak_id; - - aih->iname_held = Packaging::supply_iname(aph->aph_package, TASK_PR_COUNTER); - Inter::Symbols::set_flag(InterNames::to_symbol(aih->iname_held), MAKE_NAME_UNIQUE); - + package_request *PR = Hierarchy::package_within(ADJECTIVE_TASKS_HAP, aph->aph_package); + aih->iname_held = Hierarchy::make_iname_in(TASK_FN_HL, PR); return aih->iname_held; }
@@ -1409,10 +1407,8 @@ known in order to sort. LOGIF(VARIABLE_CREATIONS, "Compiling support code for %W applying to $u, task %d\n", W, K, T); - packaging_state save = Packaging::enter(aph->aph_iname->eventual_owner); - Routines::begin_in_current_package(Adjectives::Meanings::iname(aph, T, - Kinds::RunTime::weak_id(K))); - + inter_name *iname = Adjectives::Meanings::iname(aph, T, Kinds::RunTime::weak_id(K)); + packaging_state save = Routines::begin(iname); <Add an it-variable to represent the value or object in the domain 34.2.1>; TEMPORARY_TEXT(C); diff --git a/docs/core-module/5-nv.html b/docs/core-module/5-nv.html index 59da0b902..84b3c6615 100644 --- a/docs/core-module/5-nv.html +++ b/docs/core-module/5-nv.html @@ -575,9 +575,8 @@ there's very little to say.
     inter_name *NonlocalVariables::iname(nonlocal_variable *nlv) {
         if (nlv->nlv_iname == NULL) {
-            nlv->nlv_iname = InterNames::new(VARIABLE_INAMEF);
-            InterNames::attach_memo(nlv->nlv_iname, nlv->name);
-            nlv->nlv_iname->eventual_owner = Hierarchy::package(Modules::find(nlv->nlv_created_at), VARIABLES_HAP);
+            package_request *R = Hierarchy::package(Modules::find(nlv->nlv_created_at), VARIABLES_HAP);
+            nlv->nlv_iname = Hierarchy::make_iname_with_memo(VARIABLE_HL, R, nlv->name);
         }
         return nlv->nlv_iname;
     }
diff --git a/docs/core-module/6-bp.html b/docs/core-module/6-bp.html
index 82c36a3e3..a20f42cf2 100644
--- a/docs/core-module/6-bp.html
+++ b/docs/core-module/6-bp.html
@@ -1174,13 +1174,12 @@ relation itself.)
     inter_name *default_rr = NULL;
     void BinaryPredicates::mark_as_needed(binary_predicate *bp) {
         if (bp->record_needed == FALSE) {
-            bp->bp_iname = InterNames::new(RELATION_RECORD_INAMEF);
-            bp->bp_iname->eventual_owner = BinaryPredicates::package(bp);
+            bp->bp_iname = Hierarchy::make_iname_in(RELATION_RECORD_HL, BinaryPredicates::package(bp));
             if (default_rr == NULL) {
                 default_rr = bp->bp_iname;
                 inter_name *iname = Hierarchy::find(MEANINGLESS_RR_HL);
                 packaging_state save = Packaging::enter_home_of(iname);
-                Emit::named_iname_constant(iname, K_value, bp->bp_iname);
+                Emit::named_iname_constant(iname, K_value, default_rr);
                 Packaging::exit(save);
             }
         }
diff --git a/docs/inflections-module/3-vc.html b/docs/inflections-module/3-vc.html
index a17a4e4d8..5532f4e6f 100644
--- a/docs/inflections-module/3-vc.html
+++ b/docs/inflections-module/3-vc.html
@@ -322,17 +322,13 @@ and negative senses.
     #ifdef CORE_MODULE
     inter_name *Conjugation::conj_iname(verb_conjugation *vc) {
         if (vc->vc_iname == NULL) {
-            package_request *R = NULL;
             if (vc->vc_conjugates == NULL) {
-                R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+                package_request *R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+                vc->vc_iname = Hierarchy::make_iname_in(MODAL_CONJUGATION_FN_HL, R);
             } else {
-                R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+                package_request *R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+                vc->vc_iname = Hierarchy::make_iname_in(NONMODAL_CONJUGATION_FN_HL, R);
             }
-            vc->vc_iname =
-                Packaging::function(
-                    InterNames::one_off(I"conjugation_fn", R),
-                    R,
-                    InterNames::new(CONJUGATE_VERB_ROUTINE_INAMEF));
         }
         return vc->vc_iname;
     }
diff --git a/inform7/core-module/Chapter 21/Activities.w b/inform7/core-module/Chapter 21/Activities.w
index 073c765e9..0b8ff379d 100644
--- a/inform7/core-module/Chapter 21/Activities.w	
+++ b/inform7/core-module/Chapter 21/Activities.w	
@@ -187,9 +187,7 @@ activity *Activities::new(kind *creation_kind, wording W) {
 
 	av->name = W;
 	av->av_package = Hierarchy::local_package(ACTIVITIES_HAP);
-	av->av_iname = InterNames::new(ACTIVITY_INAMEF);
-	av->av_iname->eventual_owner = av->av_package;
-	InterNames::attach_memo(av->av_iname, av->name);
+	av->av_iname = Hierarchy::make_iname_with_memo(ACTIVITY_HL, av->av_package, av->name);
 	packaging_state save = Packaging::enter_home_of(av->av_iname);
 	Emit::named_numeric_constant(av->av_iname, (inter_t) av->allocation_id);
 	Packaging::exit(save);
diff --git a/inform7/core-module/Chapter 21/Rules.w b/inform7/core-module/Chapter 21/Rules.w
index 1cb5f59cd..f6b26f49a 100644
--- a/inform7/core-module/Chapter 21/Rules.w	
+++ b/inform7/core-module/Chapter 21/Rules.w	
@@ -512,10 +512,8 @@ do.
 
 =
 inter_name *Rules::shell_iname(rule *R) {
-	if (R->shell_routine_iname == NULL) {
-		R->shell_routine_iname =
-			Packaging::function(InterNames::one_off(I"shell_fn", R->rule_package), R->rule_package, InterNames::new(RULE_SHELL_ROUTINE_INAMEF));
-	}
+	if (R->shell_routine_iname == NULL)
+		R->shell_routine_iname = Hierarchy::make_iname_in(SHELL_FN_HL, R->rule_package);
 	return R->shell_routine_iname;
 }
 
diff --git a/inform7/core-module/Chapter 24/Chronology.w b/inform7/core-module/Chapter 24/Chronology.w
index 4dfe85402..33b2ec64b 100644
--- a/inform7/core-module/Chapter 24/Chronology.w	
+++ b/inform7/core-module/Chapter 24/Chronology.w	
@@ -46,10 +46,7 @@ void Chronology::ap_compile_forced_to_present(action_pattern ap) {
 void Chronology::compile_past_action_pattern(value_holster *VH, time_period duration, action_pattern ap) {
 	char *op = duration.inform6_operator;
 	package_request *PR = Hierarchy::local_package(PAST_ACTION_PATTERNS_HAP);
-	inter_name *pta_routine = Packaging::function(
-		InterNames::one_off(I"pap_fn", PR),
-		PR,
-		InterNames::new(PAST_ACTION_ROUTINE_INAMEF));
+	inter_name *pta_routine = Hierarchy::make_iname_in(PAP_FN_HL, PR);
 	LOGIF(TIME_PERIODS,
 		"Chronology::compile_past_action_pattern on: $A\nat: $t\n", &ap, &duration);
 	if (PL::Actions::Patterns::makes_callings(&ap)) {
diff --git a/inform7/core-module/Chapter 26/Routines.w b/inform7/core-module/Chapter 26/Routines.w
index c7f90a8d9..d48f2596f 100644
--- a/inform7/core-module/Chapter 26/Routines.w	
+++ b/inform7/core-module/Chapter 26/Routines.w	
@@ -86,8 +86,11 @@ void Routines::end_in_current_package(void) {
 		if (Packaging::houseed_in_function(public_name)) {
 			kernel_name = InterNames::one_off(I"kernel", public_name->eventual_owner);
 			Inter::Symbols::set_flag(InterNames::to_symbol(kernel_name), MAKE_NAME_UNIQUE);
-		} else
+		} else {
 			kernel_name = InterNames::new_in(KERNEL_ROUTINE_INAMEF, InterNames::to_module(public_name));
+			LOG("PN is %n\n", public_name);
+			internal_error("Routine not in function");
+		}
 		Packaging::house_with(kernel_name, public_name);
 	}
 
diff --git a/inform7/core-module/Chapter 27/Hierarchy Locations.w b/inform7/core-module/Chapter 27/Hierarchy Locations.w
index a64e1b81d..1513c1a46 100644
--- a/inform7/core-module/Chapter 27/Hierarchy Locations.w	
+++ b/inform7/core-module/Chapter 27/Hierarchy Locations.w	
@@ -219,34 +219,48 @@ inter_name *HierarchyLocations::find_in_package(int id, package_request *P, word
 		LOG("Have type: $3, required: $3\n", P->eventual_type, nrl->requirements.any_package_of_this_type);
 		internal_error("constant in wrong superpackage");
 	}
+	
 	inter_name *iname = NULL;
+	if (nrl->trans.translate_to)  {
+		text_stream *T = nrl->trans.translate_to;
+		@;
+	} else if (nrl->trans.generate_from >= 0) {
+		TEMPORARY_TEXT(T);
+		inter_name *temp_iname = NULL;
+		if (nrl->trans.localise)
+			temp_iname = InterNames::new_in(nrl->trans.generate_from, C);
+		else
+			temp_iname = InterNames::new(nrl->trans.generate_from);
+		WRITE_TO(T, "%n", temp_iname);
+		@;
+		DISCARD_TEXT(T);
+	} else {
+		text_stream *T = NULL;
+		@;
+	}
+	
+	if (nrl->trans.then_make_unique)
+		Inter::Symbols::set_flag(InterNames::to_symbol(iname), MAKE_NAME_UNIQUE);
+	return iname;
+}
+
+@ =
 	if (Str::len(nrl->function_package_name) > 0) {
 		iname = Packaging::function_text(
 				InterNames::one_off(nrl->function_package_name, P),
 				P,
 				NULL);
 	} else {
-		iname = InterNames::one_off(nrl->access_name, P);
+		if (Str::len(nrl->access_name) == 0) {
+		LOG("********** %S\n", T);
+			iname = InterNames::one_off(T, P);
+		} else
+			iname = InterNames::one_off(nrl->access_name, P);
 	}
 	if (!Wordings::empty(W)) InterNames::attach_memo(iname, W);
-	if (nrl->trans.translate_to)
-		InterNames::translate(iname, nrl->trans.translate_to);
-	if (nrl->trans.then_make_unique)
-		Inter::Symbols::set_flag(InterNames::to_symbol(iname), MAKE_NAME_UNIQUE);
-	if (nrl->trans.generate_from >= 0) {
-		inter_name *temp_iname = NULL;
-		if (nrl->trans.localise)
-			temp_iname = InterNames::new_in(nrl->trans.generate_from, C);
-		else
-			temp_iname = InterNames::new(nrl->trans.generate_from);
-		TEMPORARY_TEXT(T);
-		WRITE_TO(T, "%n", temp_iname);
-		InterNames::translate(iname, T);
-		DISCARD_TEXT(T);
-	}
-	return iname;
-}
+	if ((Str::len(T) > 0) && (nrl->access_name)) InterNames::translate(iname, T);
 
+@ =
 package_request *HierarchyLocations::package_in_package(int id, package_request *P) {
 	if (nrls_created == FALSE) HierarchyLocations::create_nrls();
 	if ((id < 0) || (id >= MAX_HL) || (nrls_indexed_by_id[id] == NULL))
diff --git a/inform7/core-module/Chapter 27/Hierarchy.w b/inform7/core-module/Chapter 27/Hierarchy.w
index ec3d32cd1..d1a9c33d1 100644
--- a/inform7/core-module/Chapter 27/Hierarchy.w	
+++ b/inform7/core-module/Chapter 27/Hierarchy.w	
@@ -11,7 +11,6 @@
 @e PROPOSITION_PR_COUNTER
 @e SUBSTITUTION_PR_COUNTER
 @e SUBSTITUTIONF_PR_COUNTER
-@e TASK_PR_COUNTER
 
 =
 location_requirement home_for_weak_type_IDs;
@@ -177,6 +176,7 @@ void Hierarchy::establish(void) {
 @h Activities.
 
 @e ACTIVITIES_HAP
+@e ACTIVITY_HL
 @e BEFORE_RB_HL
 @e FOR_RB_HL
 @e AFTER_RB_HL
@@ -194,6 +194,7 @@ void Hierarchy::establish(void) {
 	location_requirement local_activities = HierarchyLocations::local_submodule(activities);
 	HierarchyLocations::ap(ACTIVITIES_HAP, local_activities, I"activity", I"_activity");
 		location_requirement in_activity = HierarchyLocations::any_package_of_type(I"_activity");
+		HierarchyLocations::con(ACTIVITY_HL, NULL, Translation::generate(ACTIVITY_INAMEF), in_activity);
 		HierarchyLocations::package(BEFORE_RB_HL, I"before_rb", I"_rulebook", in_activity);
 		HierarchyLocations::package(FOR_RB_HL, I"for_rb", I"_rulebook", in_activity);
 		HierarchyLocations::package(AFTER_RB_HL, I"after_rb", I"_rulebook", in_activity);
@@ -214,6 +215,8 @@ void Hierarchy::establish(void) {
 @e MEASUREMENT_FN_HL
 @e ADJECTIVE_PHRASES_HAP
 @e DEFINITION_FN_HL
+@e ADJECTIVE_TASKS_HAP
+@e TASK_FN_HL
 
 @ =
 	submodule_identity *adjectives = Packaging::register_submodule(I"adjectives");
@@ -222,6 +225,9 @@ void Hierarchy::establish(void) {
 	HierarchyLocations::ap(ADJECTIVES_HAP, local_adjectives, I"adjective", I"_adjective");
 		location_requirement in_adjective = HierarchyLocations::any_package_of_type(I"_adjective");
 		HierarchyLocations::con(ADJECTIVE_HL, I"adjective", Translation::uniqued(), in_adjective);
+		HierarchyLocations::ap(ADJECTIVE_TASKS_HAP, in_adjective, I"adjective_task", I"_adjective_task");
+			location_requirement in_adjective_task = HierarchyLocations::any_package_of_type(I"_adjective_task");
+			HierarchyLocations::func(TASK_FN_HL, I"task_fn", Translation::uniqued(), in_adjective_task);
 	HierarchyLocations::ap(ADJECTIVE_MEANINGS_HAP, local_adjectives, I"adjective_meaning", I"_adjective_meaning");
 		location_requirement in_adjective_meaning = HierarchyLocations::any_package_of_type(I"_adjective_meaning");
 		HierarchyLocations::func(MEASUREMENT_FN_HL, I"measurement_fn", Translation::generate(MEASUREMENT_ADJECTIVE_INAMEF), in_adjective_meaning);
@@ -252,6 +258,7 @@ void Hierarchy::establish(void) {
 @h Chronology.
 
 @e PAST_ACTION_PATTERNS_HAP
+@e PAP_FN_HL
 
 @e TIMEDEVENTSTABLE_HL
 @e TIMEDEVENTTIMESTABLE_HL
@@ -265,6 +272,8 @@ void Hierarchy::establish(void) {
 
 	location_requirement local_chronology = HierarchyLocations::local_submodule(chronology);
 	HierarchyLocations::ap(PAST_ACTION_PATTERNS_HAP, local_chronology, I"past_action_pattern", I"_past_action_pattern");
+		location_requirement in_past_action_pattern = HierarchyLocations::any_package_of_type(I"_past_action_pattern");
+		HierarchyLocations::func(PAP_FN_HL, I"pap_fn", Translation::generate(PAST_ACTION_ROUTINE_INAMEF), in_past_action_pattern);
 
 	location_requirement synoptic_chronology = HierarchyLocations::synoptic_submodule(chronology);
 	HierarchyLocations::con(TIMEDEVENTSTABLE_HL, I"TimedEventsTable", Translation::same(), synoptic_chronology);
@@ -282,7 +291,10 @@ void Hierarchy::establish(void) {
 @e CV_POS_HL
 
 @e MVERBS_HAP
+@e MODAL_CONJUGATION_FN_HL
 @e VERBS_HAP
+@e NONMODAL_CONJUGATION_FN_HL
+@e CONJUGATION_FN_HL
 
 @ =
 	submodule_identity *conjugations = Packaging::register_submodule(I"conjugations");
@@ -295,7 +307,11 @@ void Hierarchy::establish(void) {
 
 	location_requirement local_conjugations = HierarchyLocations::local_submodule(conjugations);
 	HierarchyLocations::ap(MVERBS_HAP, local_conjugations, I"mverb", I"_modal_verb");
+		location_requirement in_modal_verb = HierarchyLocations::any_package_of_type(I"_modal_verb");
+		HierarchyLocations::func(MODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(CONJUGATE_VERB_ROUTINE_INAMEF), in_modal_verb);
 	HierarchyLocations::ap(VERBS_HAP, local_conjugations, I"verb", I"_verb");
+		location_requirement in_verb = HierarchyLocations::any_package_of_type(I"_verb");
+		HierarchyLocations::func(NONMODAL_CONJUGATION_FN_HL, I"conjugation_fn", Translation::generate(CONJUGATE_VERB_ROUTINE_INAMEF), in_verb);
 
 @h Equations.
 
@@ -647,6 +663,7 @@ void Hierarchy::establish(void) {
 @e MEANINGLESS_RR_HL
 
 @e RELATIONS_HAP
+@e RELATION_RECORD_HL
 @e BITMAP_HL
 @e ROUTE_CACHE_HL
 @e HANDLER_FN_HL
@@ -688,6 +705,7 @@ void Hierarchy::establish(void) {
 	location_requirement local_rels = HierarchyLocations::local_submodule(relations);
 	HierarchyLocations::ap(RELATIONS_HAP, local_rels, I"relation", I"_relation");
 		location_requirement in_relation = HierarchyLocations::any_package_of_type(I"_relation");
+		HierarchyLocations::con(RELATION_RECORD_HL, NULL, Translation::generate(RELATION_RECORD_INAMEF), in_relation);
 		HierarchyLocations::con(BITMAP_HL, I"as_constant", Translation::uniqued(), in_relation);
 		HierarchyLocations::con(ROUTE_CACHE_HL, I"route_cache", Translation::uniqued(), in_relation);
 		HierarchyLocations::func(HANDLER_FN_HL, I"handler_fn", Translation::uniqued(), in_relation);
@@ -743,6 +761,7 @@ void Hierarchy::establish(void) {
 @h Rules.
 
 @e RULES_HAP
+@e SHELL_FN_HL
 @e RULE_FN_HL
 @e EXTERIOR_RULE_HL
 @e RESPONSES_HAP
@@ -759,6 +778,7 @@ void Hierarchy::establish(void) {
 	location_requirement local_rules = HierarchyLocations::local_submodule(rules);
 	HierarchyLocations::ap(RULES_HAP, local_rules, I"rule", I"_rule");
 		location_requirement in_rule = HierarchyLocations::any_package_of_type(I"_rule");
+		HierarchyLocations::func(SHELL_FN_HL, I"shell_fn", Translation::generate_in(RULE_SHELL_ROUTINE_INAMEF), in_rule);
 		HierarchyLocations::func(RULE_FN_HL, I"rule_fn", Translation::generate_in(PHRASE_INAMEF), in_rule);
 		HierarchyLocations::con(EXTERIOR_RULE_HL, I"exterior_rule", Translation::uniqued(), in_rule);
 		HierarchyLocations::ap(RESPONSES_HAP, in_rule, I"response", I"_response");
@@ -799,12 +819,15 @@ void Hierarchy::establish(void) {
 @h Variables.
 
 @e VARIABLES_HAP
+@e VARIABLE_HL
 
 @ =
 	submodule_identity *variables = Packaging::register_submodule(I"variables");
 
 	location_requirement local_variables = HierarchyLocations::local_submodule(variables);
 	HierarchyLocations::ap(VARIABLES_HAP, local_variables, I"variable", I"_variable");
+		location_requirement in_variable = HierarchyLocations::any_package_of_type(I"_variable");
+		HierarchyLocations::con(VARIABLE_HL, NULL, Translation::generate(VARIABLE_INAMEF), in_variable);
 
 @
 
diff --git a/inform7/core-module/Chapter 4/Adjective Meanings.w b/inform7/core-module/Chapter 4/Adjective Meanings.w
index 34a67ed3d..7fc66023a 100644
--- a/inform7/core-module/Chapter 4/Adjective Meanings.w	
+++ b/inform7/core-module/Chapter 4/Adjective Meanings.w	
@@ -138,10 +138,8 @@ inter_name *Adjectives::Meanings::iname(adjectival_phrase *aph, int task, int we
 	aih->aph_held = aph;
 	aih->task_code = task;
 	aih->weak_ID_of_domain = weak_id;
-
-	aih->iname_held = Packaging::supply_iname(aph->aph_package, TASK_PR_COUNTER);
-	Inter::Symbols::set_flag(InterNames::to_symbol(aih->iname_held), MAKE_NAME_UNIQUE);
-
+	package_request *PR = Hierarchy::package_within(ADJECTIVE_TASKS_HAP, aph->aph_package);
+	aih->iname_held = Hierarchy::make_iname_in(TASK_FN_HL, PR);
 	return aih->iname_held;
 }
 
@@ -983,10 +981,8 @@ known in order to sort.
 	LOGIF(VARIABLE_CREATIONS, "Compiling support code for %W applying to $u, task %d\n",
 		W, K, T);
 
-	packaging_state save = Packaging::enter(aph->aph_iname->eventual_owner);
-	Routines::begin_in_current_package(Adjectives::Meanings::iname(aph, T,
-		Kinds::RunTime::weak_id(K)));
-
+	inter_name *iname = Adjectives::Meanings::iname(aph, T, Kinds::RunTime::weak_id(K));
+	packaging_state save = Routines::begin(iname);
 	@;
 
 	TEMPORARY_TEXT(C);
diff --git a/inform7/core-module/Chapter 5/Nonlocal Variables.w b/inform7/core-module/Chapter 5/Nonlocal Variables.w
index 0fef4b63b..d3c16f783 100644
--- a/inform7/core-module/Chapter 5/Nonlocal Variables.w	
+++ b/inform7/core-module/Chapter 5/Nonlocal Variables.w	
@@ -395,9 +395,8 @@ inference_subject *NonlocalVariables::get_knowledge(nonlocal_variable *nlv) {
 =
 inter_name *NonlocalVariables::iname(nonlocal_variable *nlv) {
 	if (nlv->nlv_iname == NULL) {
-		nlv->nlv_iname = InterNames::new(VARIABLE_INAMEF);
-		InterNames::attach_memo(nlv->nlv_iname, nlv->name);
-		nlv->nlv_iname->eventual_owner = Hierarchy::package(Modules::find(nlv->nlv_created_at), VARIABLES_HAP);
+		package_request *R = Hierarchy::package(Modules::find(nlv->nlv_created_at), VARIABLES_HAP);
+		nlv->nlv_iname = Hierarchy::make_iname_with_memo(VARIABLE_HL, R, nlv->name);
 	}
 	return nlv->nlv_iname;
 }
diff --git a/inform7/core-module/Chapter 6/Binary Predicates.w b/inform7/core-module/Chapter 6/Binary Predicates.w
index 3de9101ee..adb505698 100644
--- a/inform7/core-module/Chapter 6/Binary Predicates.w	
+++ b/inform7/core-module/Chapter 6/Binary Predicates.w	
@@ -862,13 +862,12 @@ int BinaryPredicates::allows_function_simplification(binary_predicate *bp) {
 inter_name *default_rr = NULL;
 void BinaryPredicates::mark_as_needed(binary_predicate *bp) {
 	if (bp->record_needed == FALSE) {
-		bp->bp_iname = InterNames::new(RELATION_RECORD_INAMEF);
-		bp->bp_iname->eventual_owner = BinaryPredicates::package(bp);
+		bp->bp_iname = Hierarchy::make_iname_in(RELATION_RECORD_HL, BinaryPredicates::package(bp));
 		if (default_rr == NULL) {
 			default_rr = bp->bp_iname;
 			inter_name *iname = Hierarchy::find(MEANINGLESS_RR_HL);
 			packaging_state save = Packaging::enter_home_of(iname);
-			Emit::named_iname_constant(iname, K_value, bp->bp_iname);
+			Emit::named_iname_constant(iname, K_value, default_rr);
 			Packaging::exit(save);
 		}
 	}
diff --git a/inform7/inflections-module/Chapter 3/Verb Conjugation.w b/inform7/inflections-module/Chapter 3/Verb Conjugation.w
index efc9c9afa..a3761fada 100644
--- a/inform7/inflections-module/Chapter 3/Verb Conjugation.w	
+++ b/inform7/inflections-module/Chapter 3/Verb Conjugation.w	
@@ -202,17 +202,13 @@ and negative senses.
 #ifdef CORE_MODULE
 inter_name *Conjugation::conj_iname(verb_conjugation *vc) {
 	if (vc->vc_iname == NULL) {
-		package_request *R = NULL;
 		if (vc->vc_conjugates == NULL) {
-			R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+			package_request *R = Hierarchy::package(Modules::find(vc->where_vc_created), MVERBS_HAP);
+			vc->vc_iname = Hierarchy::make_iname_in(MODAL_CONJUGATION_FN_HL, R);
 		} else {
-			R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+			package_request *R = Verbs::verb_package(vc->vc_conjugates, vc->where_vc_created);
+			vc->vc_iname = Hierarchy::make_iname_in(NONMODAL_CONJUGATION_FN_HL, R);
 		}
-		vc->vc_iname =
-			Packaging::function(
-				InterNames::one_off(I"conjugation_fn", R),
-				R,
-				InterNames::new(CONJUGATE_VERB_ROUTINE_INAMEF));
 	}
 	return vc->vc_iname;
 }
diff --git a/retrospective/6L02/Syntax.preform b/retrospective/6L02/Extensions/Reserved/Languages/English/Syntax.preform
similarity index 100%
rename from retrospective/6L02/Syntax.preform
rename to retrospective/6L02/Extensions/Reserved/Languages/English/Syntax.preform
diff --git a/retrospective/6L30/Extensions/Emily Short/Glulx Text Effects.i7x b/retrospective/6L30/Extensions/Emily Short/Glulx Text Effects.i7x
deleted file mode 100644
index cd98a3042..000000000
--- a/retrospective/6L30/Extensions/Emily Short/Glulx Text Effects.i7x	
+++ /dev/null
@@ -1,331 +0,0 @@
-Version 4/140425 of Glulx Text Effects (for Glulx only) by Emily Short begins here.
-
-"Glulx Text Effects provides an easy way to set up special text effects for Glulx."
-
-Glulx color value is a kind of value. Some glulx color values are defined by the Table of Common Color Values.
-
-Table of Common Color Values
-glulx color value	assigned number
-g-black	0
-g-dark-grey	4473924
-g-medium-grey	8947848
-g-light-grey	14540253
-g-white	16777215
-
-
-[It is important that the values be specified in just the order given, because otherwise the I6 assumptions about the relation of named values to number constants will be wrong.]
-
-text-justification is a kind of value. The text-justifications are left-justified, left-right-justified, center-justified, and right-justified. 
-
-special-style is a kind of value. The special-styles are italic-style, fixed-letter-spacing-style, header-style, bold-style, alert-style, note-style, blockquote-style, input-style, special-style-1 and special-style-2. 
-
-boldness is a kind of value. The boldnesses are light-weight, regular-weight, and bold-weight.
-
-obliquity is a kind of value.  The obliquities are no-obliquity and italic-obliquity.
-
-fixity is a kind of value. The fixities are fixed-width-font and proportional-font.
-
-Before starting the virtual machine:
-	initialize user styles.
-	
-Table of User Styles
-style name (a special-style)	justification (a text-justification)	obliquity (an obliquity)	indentation (a number)	first-line indentation (a number)	boldness (a boldness)	fixed width (a fixity)	relative size (a number)	glulx color (a glulx color value)
---	--	--	--	--	--	--	--	--
-
-
-To initialize user styles:
-	repeat through the Table of User Styles
-	begin; 
-		if there is a justification entry, apply justification of (justification entry) to (style name entry);
-		if there is an obliquity entry, apply obliquity (obliquity entry) to (style name entry);
-		if there is an indentation entry, apply (indentation entry) indentation to (style name entry);
-		if there is a first-line indentation entry, apply (first-line indentation entry) first-line indentation to (style name entry);
-		if there is a boldness entry, apply (boldness entry) boldness to (style name entry);
-		if there is a fixed width entry, apply fixed-width-ness (fixed width entry) to (style name entry);
-		if there is a relative size entry, apply (relative size entry) size-change to (style name entry);
-		if there is a glulx color entry, apply (assigned number of glulx color entry) color to (style name entry);
-	end repeat.
-	
-To apply (color change - a number) color to (chosen style - a special-style):
-	(- SetColor({chosen style}, {color change}); -)
-	
-To apply (relative size change - a number) size-change to (chosen style - a special-style):
-	(- SetSize({chosen style}, {relative size change}); -)
-	
-To apply (chosen boldness - a boldness) boldness to (chosen style - a special-style):
-	(- BoldnessSet({chosen style}, {chosen boldness}); -)
-	
-To apply (indentation amount - a number) indentation to (chosen style - a special-style):
-	(- Indent({chosen style}, {indentation amount}); -)
-	
-To apply (indentation amount - a number) first-line indentation to (chosen style - a special-style):
-	(- ParaIndent({chosen style}, {indentation amount}); -)
-
-To apply justification of (justify - a text-justification) to (chosen style - a special-style):
-	(- Justification({justify}, {chosen style}); -)
-	
-To apply fixed-width-ness (chosen fixity - a fixity) to (chosen style - a special-style):
-	(- FixitySet({chosen style}, {chosen fixity}); -)
-	
-To apply obliquity (chosen obliquity - an obliquity) to (chosen style - a special-style):
-	(- Obliquify({chosen style}, {chosen obliquity}); -)
-	
-Include (-
-
-[ SetColor S N;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_TextColor, N); 
-];
-
-[ FixitySet S N;
-	N--;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Proportional, N); 
-];
-
-[ SetSize S N;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Size, N); 
-];
-
-[ BoldnessSet S N;
-	N = N-2;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Weight, N); 
-];
-
-[ ParaIndent S N;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_ParaIndentation, N); 
-];
-
-[ Indent S N;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Indentation, N); 
-];
-
-[ Justification N S;
-	N--;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Justification, N); 
-];
-
-[ Obliquify S N;
-	N--;
-	glk_stylehint_set(wintype_TextBuffer, S, stylehint_Oblique, N); 
-];
-
--)
-	
-
-To say first custom style:
-	(- glk_set_style(style_User1); -)
-
-To say second custom style:
-	(- glk_set_style(style_User2); -)
-
- 
-
-Glulx Text Effects ends here.
-
----- Documentation ----
-
-Glulx Text Effects provides an easy way to set up special text effects for Glulx. 
-
-Chapter: Styles in Glulx
-
-Section: Built-in Styles
-
-Unlike the z-machine, which allows arbitrary combinations of features (such as color and boldness) to be applied to text, Glulx requires the author to define and then use text styles.
-
-A number of styles are predefined by Glulx. These are named as follow here:
-
-	italic-style
-	fixed-letter-spacing-style
-	header-style
-	bold-style
-	alert-style
-	note-style
-	blockquote-style
-	input-style
-
-"italic-style" is the style used to produce italic text, which means that if you change this style, it will change the way the "italic type" instruction works. (You could even make the output not be italic, if you're feeling perverse.) 
-
-"bold-style" is, along the same lines, the style used to produce bold text, which means that if you change this style, it will change the way the "bold type" instruction works. 
-
-"fixed-letter-spacing-style" is the style invoked by "fixed letter spacing".
-
-The other styles occur less often:
-
--- "header-style" is the style used when printing the title of the game;
-
--- "alert-style" when printing an end of game message such as "*** You have died. ***";
-
--- "note-style" when printing messages such as "[Your score has increased by one point.]"; 
-
--- "blockquote-style" when printing quotations; and 
-
--- "input-style" for formatting the player's own input.
-
-Section: Custom styles
-
-The author is also allowed to define two text styles of his own, which we will call special-style-1 and special-style-2. 
-
-Section: Features of styles
-
-A text style in Glulx can have the following features:
-
-	indentation: the number of units of indentation for the whole block of text, where units are defined by interpreter, but are often equivalent to spaces
-	first-line indentation: additional indentation of the first line of the text block
-	justification: can be left-justified, right-justified, justified on both the left and the right, or centered
-	obliqueness: whether the font is italic or not
-	weight: may be light, regular, or bold
-	relative size: increase (or decrease) from the regular font size being used
-
-Section: Setting style instructions
-
-To set up style instructions with Glulx Text Effects, we create a table, like this:
-
-	Table of User Styles (continued)
-	style name	justification	obliquity	indentation	first-line indentation	boldness	fixed width	relative size	glulx color
-	special-style-1	center-justified	no-obliquity	0	0	regular-weight	proportional-font	0	g-black
-	special-style-2	right-justified	italic-obliquity	0	4	regular-weight	proportional-font	0	g-black
-	
-Note that we *may* have multiple lines in this table referring to the same style. In that case, the last such line is the one that will take effect. This means that if the author is using an extension that includes a table of user styles, he may further continue the table in order to edit the styles defined by that extension.
-
-The names of the style names (special-style-1 and special-style-2) may not be changed. However, we may set the justification to any of these:
-
-	left-justified
-	right-justified
-	left-right-justified	
-	center-justified
-
-We may set the obliquity to 
-
-	no-obliquity
-	italic-obliquity
-
-We may set the indentation and first-line indentation to numbers.
-
-We may set the boldness to 
-
-	light-weight
-	regular-weight
-	bold-weight
-
-We may set fixed width to	
-	
-	proportional-font
-	fixed-width-font
-
-We set relative size to a number. This indicates by how many points the font size should be changed from the baseline size: a positive number if this text style should be larger than normal, a negative one if smaller. 
-
-Section: Color
-
-Color is the most complicated thing to affect: color can be set to any value of the kind "glulx color value". This extension provides a table of glulx color values to start from, as follows:
-
-	Table of Common Color Values
-	glulx color value	assigned number
-	g-black	0		[== $000000]
-	g-dark-grey	4473924	[== $444444]
-	g-medium-grey	8947848	[== $888888]
-	g-light-grey	14540253	[== $DDDDDD]
-	g-white	16777215		[== $FFFFFF]
-
-where the assigned number of each value is the decimal representation of a hex color code. It is likely that we'll want to use other colors besides those provided by this extension. We may do this by continuing the table thus:
-
-	Table of Common Color Values (continued)
-	glulx color value	assigned number
-	g-bright-cyan	39423		[== $0099FF]
-	g-peach	15645627		[== $EEBBBB] 
-
-These numbers are conversions of hex color numbers. The principle is that the hex number represents the amount of red in the first two digits (from 00 to FF); the amount of green in the next two digits; and the amount of blue in the last two digits. Thus $0000FF has no red or green in it, but the maximum possible amount of blue. Where each pair of digits is equal (as in $444444 or $A0A0A0), we will have equal components of each color and the result will be some shade of grey. The number for g-peach was selected by formulating a hex color number with a large amount of red and a moderate amount of green and blue ($EEBBBB). Similarly, the number for g-bright-cyan is the conversion of ($0099FF), with the maximum amount of blue, a fair amount of green, and no red. 
-
-Converting a hex number to a decimal one can be performed with a scientific calculator or with a hexadecimal conversion application found online; if we're at a loss, googling "hexadecimal conversion calculator" will likely turn up an appropriate application.  
-
-For reference, other common colors one might want to add might include
-
-	Table of Common Color Values (continued)
-	glulx color value	assigned number
-	g-pure-blue	255		[== $0000FF] 
-	g-pure-green	65280		[== $00FF00]
-	g-pure-cyan	65535		[== $00FFFF]
-	g-pure-yellow	16776960		[== $FFFF00]
-	g-pure-magenta	16711935		[== $FF00FF]
-	g-pure-red	16711680		[== $FF0000]
-	g-dark-red	11141120		[== $AA0000]
-
-Once we have defined custom text styles, we may invoke them ourselves with
-
-	say first custom style
-	say second custom style 
-
-We may also use lines of the table to change the behavior of the built-in styles. For instance, the following would make bold text also appear larger and medium grey:
-
-	Table of User Styles (continued)
-	style name	relative size	glulx color
-	bold-style	2	g-medium-grey
-
-Section: Technical note
-
-A technical note for people familiar with Glk:
-
-In Glk's internal parlance, "italic-style" is equivalent to style_Emphasized; "bold-style" is style_Subheader; "fixed-width-style" is style_Preformatted. Other styles are named after their manifestations in the Glk specification.
-
-Example: * Gaudy - A visually overpowering exercise in modifying all the built-in text styles.
-
-	*: "Gaudy"
-	
-	Include Version 4 of Glulx Text Effects by Emily Short.	
-
-	Texty Room is a room. "This is a room of [bold type]bold[roman type] and [italic type]italic[roman type] texts as well as messages in [fixed letter spacing]fixed width[variable letter spacing] text."
-	
-	Table of User Styles (continued)
-	style name	relative size	glulx color
-	italic-style	-1	g-pure-blue
-	fixed-letter-spacing-style	--	g-dark-grey
-	header-style	10	--
-	bold-style	2	g-medium-grey
-	alert-style	5	g-pure-red
-	note-style	--	g-pure-green
-	blockquote-style	--	g-pure-yellow
-	input-style	-1	g-pure-magenta
-
-	Table of Common Color Values (continued)
-	glulx color value	assigned number
-	g-pure-blue	255		[== $0000FF] 
-	g-pure-green	65280		[== $00FF00]
-	g-pure-cyan	65535		[== $00FFFF]
-	g-pure-yellow	16776960		[== $FFFF00]
-	g-pure-magenta	16711935		[== $FF00FF]
-	g-pure-red	16711680		[== $FF0000]
-	g-dark-red	11141120		[== $AA0000]
-
-	Instead of waiting:
-		award one point.
-	
-	Instead of jumping:
-		end the game in death.
-	
-	Every turn:
-		display the boxed quotation "Tempus fugit." 
-
-	Test me with "z / z / z / jump".
-
-Example: ** The Gallic War - An excuse to print a large, fancily-formatted bit of text using custom styles.
-
-	*: "The Gallic War" by Julius Caesar.
-
-	The story headline is "An interactive campaign".
-	
-	Lessons is a room.
-
-	Include Glulx Text Effects by Emily Short. Include Basic Screen Effects by Emily Short.
-
-	Table of User Styles (continued)
-	style name	justification	obliquity	indentation	first-line indentation	boldness	fixed width	relative size	glulx color
-	special-style-2	left-right-justified	italic-obliquity	15	-4	light-weight	proportional-font	0	g-medium-grey
-
-	When play begins:
-		change left hand status line to ""; change right hand status line to "";
-		say "[second custom style]Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. 
-
-Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt. Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt.";
-		pause the game;
-		say roman type;
-		change left hand status line to "[location]"; change right hand status line to "[turn count]".
-
-	Bank of the Garumna is a room.
diff --git a/retrospective/6L30/Extensions/Reserved/Postcard.html b/retrospective/6L30/Extensions/Reserved/Postcard.html
deleted file mode 100644
index d70c4b8fc..000000000
--- a/retrospective/6L30/Extensions/Reserved/Postcard.html
+++ /dev/null
@@ -1,556 +0,0 @@
-
-
-
-Play Some Interactive Fiction
-
-
-
-
- -
-You are standing in an open -field -west of a white -house, -with a boarded front -door. -There is a small -mailbox* -here. -
*Try opening!
-
- -
- -
(>|)
-
-You just started up a game and now you’re staring at text -and a blinking cursor and you don’t know what to do! -
- -
-Don’t panic kids—
-Crazy Uncle Zarf is here to help you get started... -
- -
- -
- -
 
- -
-You can try all sorts of commands on the -things you see. -
-
-Try the commands that make sense! -
-
-Doors are for opening; buttons are for pushing; pie is for eating. -(Mmm, pie.) -
-
◇◇◇◇
-
-If you meet a person, these should work: -
-
-TALK TO name
-ASK name -ABOUT something
-TELL name -ABOUT something
-GIVE something -TO name
-SHOW something -TO name
-
-
-Each game has slightly different commands, but they all look -pretty much like these. -
-
- - -
-
These commands are very common:
- - - - - - -
-EXAMINE it
-TAKE it
-DROP it
-OPEN it
-PUT it -IN something
-PUT it -ON something
-
-PUSH it
-PULL it
-TURN it
-FEEL it
-
- -
-When in doubt, examine more. -
- -
 
- -
- -
- -
 
- -
You could also try:
- - - - - - - - - -
-EAT it
-DRINK it
-FILL it
-SMELL it
-LISTEN TO it
-BREAK it
-BURN it
-LOOK UNDER it
-
-CLIMB it
-WAVE it
-WEAR it
-TAKE it -OFF
-TURN it -ON
-DIG IN it
-ENTER it
-SEARCH it
-
-UNLOCK it -WITH something
-
- -
Or even:
- - - - - - -
-LISTEN
-SLEEP
-WAKE UP
-UNDO
-
-JUMP
-PRAY
-CURSE
-SING
-
- -
-Take back one move — handy! -
- -
- -
- - - - - - - -
{ -Does the game intro suggest
-ABOUT, INFO, HELP?
-Try them first! -
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
N(“Go north.”)
NWNE
WE -Also:
-Up, Down,
-IN, -and OUT -
SWSSE
- -
-What if I only want to
-type one or two letters? -
- -
◇◇◇◇
- -
N/E/S/W/NE/SE/NW/SW: GO
-
in the indicated compass direction.
- -
L: LOOK
-
around to see what is nearby.
- -
X: EXAMINE
-
a thing in more detail.
- -
I: take INVENTORY
-
of what you posess.
- -
Z: WAIT
-
a turn without doing anything.
- -
G: do the same thing AGAIN
- -
◇◇◇◇
- -
-A service of the People’s Republic of
-Interactive Fiction: -http://pr-if.org/ -
- -
- -
- - - diff --git a/retrospective/6L30/Extensions/Emily Short/Basic Help Menu.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Basic Help Menu.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Basic Help Menu.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Basic Help Menu.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Basic Screen Effects.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Basic Screen Effects.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Basic Screen Effects.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Basic Screen Effects.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Complex Listing.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Complex Listing.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Complex Listing.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Complex Listing.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Glulx Entry Points.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Glulx Entry Points.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Glulx Entry Points.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Glulx Entry Points.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Glulx Image Centering.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Glulx Image Centering.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Glulx Image Centering.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Glulx Image Centering.i7x diff --git a/retrospective/6L38/Internal/Extensions/Emily Short/Glulx Text Effects.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Glulx Text Effects.i7x new file mode 100644 index 000000000..2c032c935 --- /dev/null +++ b/retrospective/6L38/Internal/Extensions/Emily Short/Glulx Text Effects.i7x @@ -0,0 +1,387 @@ +Version 5/140516 of Glulx Text Effects (for Glulx only) by Emily Short begins here. + +"Gives control over text formatting in Glulx." + +[ Version 5 was rewritten by Dannii Willis ] + +Use authorial modesty. + + + +Chapter - Specifying styles + +[ It is important that the values be specified precisely in the following orders, because otherwise the I6 assumptions about the relation of named values to number constants will be wrong. ] + +A glulx text style is a kind of value. +The glulx text styles are all-styles, normal-style, italic-style, fixed-letter-spacing-style, header-style, bold-style, alert-style, note-style, blockquote-style, input-style, special-style-1 and special-style-2. + +A text justification is a kind of value. +The text justifications are left-justified, left-right-justified, center-justified, and right-justified. + +A font weight is a kind of value. +The font weights are light-weight, regular-weight, and bold-weight. + + + +Section - The Table of User Styles definition + +[ This table is given its own section so that it can be replaced to add extra columns needed by other extensions (such as Flexible Windows) ] + +Table of User Styles +style name (a glulx text style) background color (a text) color (a text) first line indentation (a number) fixed width (a truth state) font weight (a font weight) indentation (a number) italic (a truth state) justification (a text justification) relative size (a number) reversed (a truth state) +with 1 blank row + + + +Chapter - Sorting the Table of User Styles + +[ We sort the table of styles to combine style definitions together ] + +Before starting the virtual machine (this is the sort the Table of User Styles rule): + [ First change empty style names to all-styles ] + repeat through the Table of User Styles: + if there is no style name entry: + now the style name entry is all-styles; + sort the Table of User Styles in style name order; + let row1 be 1; + let row2 be 2; + [ Overwrite the first row of each style with the specifications of subsequent rows of the style ] + while row2 <= the number of rows in the Table of User Styles: + choose row row2 in the Table of User Styles; + if there is a style name entry: + if (the style name in row row1 of the Table of User Styles) is the style name entry: + if there is a background color entry: + now the background color in row row1 of the Table of User Styles is the background color entry; + if there is a color entry: + now the color in row row1 of the Table of User Styles is the color entry; + if there is a first line indentation entry: + now the first line indentation in row row1 of the Table of User Styles is the first line indentation entry; + if there is a fixed width entry: + now the fixed width in row row1 of the Table of User Styles is the fixed width entry; + if there is a font weight entry: + now the font weight in row row1 of the Table of User Styles is the font weight entry; + if there is a indentation entry: + now the indentation in row row1 of the Table of User Styles is the indentation entry; + if there is a italic entry: + now the italic in row row1 of the Table of User Styles is the italic entry; + if there is a justification entry: + now the justification in row row1 of the Table of User Styles is the justification entry; + if there is a relative size entry: + now the relative size in row row1 of the Table of User Styles is the relative size entry; + if there is a reversed entry: + now the reversed in row row1 of the Table of User Styles is the reversed entry; + blank out the whole row; + otherwise: + now row1 is row2; + increment row2; + + + +Chapter - Setting the styles - unindexed + +Last before starting the virtual machine (this is the set text styles rule): + repeat through the Table of User Styles: + if there is a background color entry: + set the background color for the style name entry to the background color entry; + if there is a color entry: + set the color for the style name entry to the color entry; + if there is a first line indentation entry: + set the first line indentation for the style name entry to the first line indentation entry; + if there is a fixed width entry: + set fixed width for the style name entry to the fixed width entry; + if there is a font weight entry: + set the font weight for the style name entry to the font weight entry; + if there is a indentation entry: + set the indentation for the style name entry to the indentation entry; + if there is a italic entry: + set italic for the style name entry to the italic entry; + if there is a justification entry: + set the justification for the style name entry to the justification entry; + if there is a relative size entry: + set the relative size for the style name entry to the relative size entry; + if there is a reversed entry: + set reversed for the style name entry to the reversed entry; + +To set the background color for (style - a glulx text style) to (N - a text): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_BackColor, GTE_ConvertColour( {N} ) ); -). + +To set the color for (style - a glulx text style) to (N - a text): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_TextColor, GTE_ConvertColour( {N} ) ); -). + +To set the first line indentation for (style - a glulx text style) to (N - a number): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_ParaIndentation, {N} ); -). + +To set fixed width for (style - a glulx text style) to (N - truth state): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Proportional, ( {N} + 1 ) % 2 ); -). + +To set the font weight for (style - a glulx text style) to (N - a font weight): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Weight, {N} - 2 ); -). + +To set the indentation for (style - a glulx text style) to (N - a number): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Indentation, {N} ); -). + +To set italic for (style - a glulx text style) to (N - a truth state): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Oblique, {N} ); -). + +To set the justification for (style - a glulx text style) to (N - a text justification): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Justification, {N} - 1 ); -). + +To set the relative size for (style - a glulx text style) to (N - a number): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_Size, {N} ); -). + +To set reversed for (style - a glulx text style) to (N - a truth state): + (- GTE_SetStylehint( wintype_TextBuffer, {style}, stylehint_ReverseColor, {N} ); -). + +Include (- +[ GTE_SetStylehint wintype style hint N i; + if ( style == (+ all-styles +) ) + { + for ( i = 0: i < style_NUMSTYLES : i++ ) + { + glk_stylehint_set( wintype, i, hint, N ); + } + } + else + { + glk_stylehint_set( wintype, style - 2, hint, N ); + } +]; +-). + +[ Previously you would have to manually convert colours to their integer values, but in version 5 the extension will do it for you. Short (#FFF) web colours aren't supported. ] + +Include (- +[ GTE_ConvertColour txt p1 cp1 dsize i ch progress; + ! Transmute the text + cp1 = txt-->0; + p1 = TEXT_TY_Temporarily_Transmute( txt ); + dsize = BlkValueLBCapacity( txt ); + for ( i = 0 : i < dsize : i++ ) + { + ! Decode the hex characters + ch = BlkValueRead( txt, i ); + if ( ch == 0 ) + { + break; + } + else if ( ch > 47 && ch < 58 ) + { + progress = progress * 16 + ch - 48; + } + else if ( ch > 64 && ch < 71 ) + { + progress = progress * 16 + ch - 55; + } + else if ( ch > 96 && ch < 103 ) + { + progress = progress * 16 + ch - 87; + } + } + ! Clean up and return + TEXT_TY_Untransmute( txt, p1, cp1 ); + return progress; +]; +-). + + + +Chapter - Additional style phrases + +To say alert style: + (- glk_set_style( style_Alert ); -). + +To say blockquote style: + (- glk_set_style( style_BlockQuote ); -). + +To say header style: + (- glk_set_style( style_Header ); -). + +To say input style: + (- glk_set_style( style_Input ); -). + +To say note style: + (- glk_set_style( style_Note ); -). + +To say special-style-1: + (- glk_set_style( style_User1 ); -). +To say special style 1: + (- glk_set_style( style_User1 ); -). +To say first special/custom style: + (- glk_set_style( style_User1 ); -). + +To say special-style-2: + (- glk_set_style( style_User2 ); -). +To say special style 2: + (- glk_set_style( style_User2 ); -). +To say second special/custom style: + (- glk_set_style( style_User2 ); -). + + + +Glulx Text Effects ends here. + + + +---- Documentation ---- + +Glulx Text Effects provides an easy way to set up special text effects for Glulx. + + + +Chapter: Styles in Glulx + +Unlike the Z-Machine, which allows arbitrary combinations of features (such as color and boldness) to be applied to text, Glulx requires the author to define and then use text styles. + +There are eleven of these styles: + + Table of styles + normal-style the style used for regular text + italic-style used for italic text (this is what the "[italic type]" phrase uses) + bold-style used for bold text (this is what the "[bold type]" phrase uses) + fixed-letter-spacing-style used for monospaced text (this is what the "[fixed letter spacing]" phrase uses) + alert-style used when printing an end of game message such as "*** You have died. ***" + blockquote-style used for printing box quotations + header-style used to print the title of the game + input-style used for the player's own input + note-style used for messages such as "[Your score has increased by one point.]" + special-style-1 these two styles are not used by Inform, and you are free to use them for any purpose you want + special-style-2 + +Additionally, when defining styles you can set "all-styles" which will define all eleven styles at once. + + + +Chapter: Style features + +Each text style has the following features: + + Table of style features + background color specifies the background color of the text + color specifies the color of the text itself + fixed width a truth state (default: false). If true then the text will be displayed with a fixed width (monospace) font + font weight specifies the weight of the font. Can be set to "light-weight", "regular-weight" (the default), or "bold-weight" + indentation a number (default: 0) specifying the number of units of indentation for the whole block of text. Units are defined by interpreter, but are often equivalent to spaces + first line indentation a number (default: 0) specifying additional indentation for the first line of the text block + italic a truth state (default: false). If true then the text will be displayed in italics + justification can be set to "left-justified", "center-justified", "right-justified", or "left-right-justified" for justified on the left and right (often called full justification) + relative size a number (default: 0) specifying how many font sizes above or below the browser's default a style should be set to + reversed a truth state (default: false). If true then the foreground and background colors of the text will be reversed. This is most commonly used for the status line + +Not all interpreters support all of these features. Notably, Gargoyle does not support justification or font sizes. If the interpreter does not support one of the features it will just be quietly ignored. + + + +Chapter: Defining styles + +To define the features each style should have, add a table continuation to the Table of User Styles in your code. For example: + + Table of User Styles (continued) + style name color italic relative size + all-styles "#FF0000" true -- + header-style "#0000FF" false 1 + special-style-1 "#00FF00" + +This definition table above will make everything red and italics, except for the title which will be blue and a size bigger. Special style 1 is set to green, but it won't be used without the author manually turning it on. + +Your table continuation does not need to include every column in the Table of User Styles, nor does it need to define every style. You can also continue the table multiple times, and even define a style in multiple places; if you do then the definitions will be combined together. If you do not want to set a feature for a style you can leave it blank with "--". + +Colors are defined by specifying a web (CSS) color in a text. Web colors specify the red/green/blue components of a color in hexadecimal, and a correctly specified color will be 6 characters long (with an optional # at the beginning.) Note that short (#000) web colors are not supported. + +If you use a color many times you can define it as a text constant, and then use that in the table: + + Red is always "#FF0000". + + Table of User Styles (continued) + style name color + special-style-1 red + + + +Chapter: Using the styles + +You may invoke the text styles by using the following phrases + + Table of style phrases + normal-style "[roman type]" + italic-style "[italic type]" + bold-style "[bold type]" + fixed-letter-spacing-style "[fixed letter spacing]" (Return to regular variable spaced type with either "[variable letter spacing]" or just "[roman type]") + alert-style "[alert style]" + blockquote-style "[blockquote style]" + header-style "[header style]" + input-style "[input style]" + note-style "[note style]" + special-style-1 "[special-style-1]", "[first special style]", or "[first custom style]" (there are multiple options to support older code) + special-style-2 "[special-style-2]", "[second special style]", or "[second custom style]" + + + +Chapter: About this extension + +This extension was originally by Emily Short. Version 5 was rewritten by Dannii Willis. + +The latest version of this extension can be found at . This extension is released under the Creative Commons Attribution licence. Bug reports, feature requests or questions can be made at . + + + +Example: * Gaudy - A visually overpowering exercise in modifying all the built-in text styles. + + *: "Gaudy" + + Include Version 5 of Glulx Text Effects by Emily Short. + + Use scoring. + + Texty Room is a room. "This is a room of [bold type]bold[roman type] and [italic type]italic[roman type] texts as well as messages in [fixed letter spacing]fixed width[variable letter spacing] text." + + Table of User Styles (continued) + style name relative size color background color + italic-style -1 "#0000FF" [ blue ] -- + fixed-letter-spacing-style -- "#444444" [ dark-grey ] -- + header-style 10 -- -- + bold-style 2 "#888888" [ medium-grey ] "#80DAEB" + alert-style 5 "#FF0000" [ red ] + note-style -- "#00FF00" [ green ] + blockquote-style -- "#FFFF00" [ yellow ] + input-style -1 "#FF00FF" [ magenta ] + + Instead of waiting: + increase the score by 5. + + Instead of jumping: + end the story finally. + + Every turn: + display the boxed quotation "Tempus fugit." + + Test me with "z / z / z / jump". + + + +Example: ** The Gallic War - An excuse to print a large, fancily-formatted bit of text using custom styles. + + *: "The Gallic War" by Julius Caesar. + + The story headline is "An interactive campaign". + + Lessons is a room. + + Include Glulx Text Effects by Emily Short. + Include Basic Screen Effects by Emily Short. + + Table of User Styles (continued) + style name justification italic indentation first line indentation font weight color + special-style-2 left-right-justified true 15 -4 light-weight "#888888" [ medium-grey ] + + When play begins: + now the left hand status line is ""; + now right hand status line is ""; + say "[second custom style]Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit. + +Horum omnium fortissimi sunt Belgae, propterea quod a cultu atque humanitate provinciae longissime absunt, minimeque ad eos mercatores saepe commeant atque ea quae ad effeminandos animos pertinent important, proximique sunt Germanis, qui trans Rhenum incolunt, quibuscum continenter bellum gerunt. Qua de causa Helvetii quoque reliquos Gallos virtute praecedunt, quod fere cotidianis proeliis cum Germanis contendunt, cum aut suis finibus eos prohibent aut ipsi in eorum finibus bellum gerunt."; + pause the game; + say roman type; + now the left hand status line is "[location]"; + now the right hand status line is "[turn count]". + + Bank of the Garumna is a room. \ No newline at end of file diff --git a/retrospective/6L30/Extensions/Emily Short/Inanimate Listeners.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Inanimate Listeners.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Inanimate Listeners.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Inanimate Listeners.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Locksmith.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Locksmith.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Locksmith.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Locksmith.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Menus.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Menus.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Menus.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Menus.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Punctuation Removal.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Punctuation Removal.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Punctuation Removal.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Punctuation Removal.i7x diff --git a/retrospective/6L30/Extensions/Emily Short/Skeleton Keys.i7x b/retrospective/6L38/Internal/Extensions/Emily Short/Skeleton Keys.i7x similarity index 100% rename from retrospective/6L30/Extensions/Emily Short/Skeleton Keys.i7x rename to retrospective/6L38/Internal/Extensions/Emily Short/Skeleton Keys.i7x diff --git a/retrospective/6L30/Extensions/Eric Eve/Epistemology.i7x b/retrospective/6L38/Internal/Extensions/Eric Eve/Epistemology.i7x similarity index 98% rename from retrospective/6L30/Extensions/Eric Eve/Epistemology.i7x rename to retrospective/6L38/Internal/Extensions/Eric Eve/Epistemology.i7x index 413f13b93..b054cb4c0 100644 --- a/retrospective/6L30/Extensions/Eric Eve/Epistemology.i7x +++ b/retrospective/6L38/Internal/Extensions/Eric Eve/Epistemology.i7x @@ -1,4 +1,4 @@ -Version 7 of Epistemology by Eric Eve begins here. +Version 8 of Epistemology by Eric Eve begins here. "Keeping track of what the player character knows and sees." @@ -10,12 +10,15 @@ A thing can be either seen or unseen. A thing is usually unseen. the location is seen." but this turns out to be unacceptably slow in practice. The following code does approximately the same thing but much faster.] + Carry out looking (this is the mark items as seen when looking rule): unless in darkness: + now every backdrop in the location is seen; repeat with item running through things that are enclosed by the location: if the item is not enclosed by an opaque closed container: now the item is seen. + Carry out opening a container (this is the mark items as seen on opening a container rule): repeat with item running through things that are enclosed by the noun: if the item is unseen and the item is visible: @@ -57,7 +60,7 @@ Understand "epistat [any thing]" as requesting epistemic status of. Report requesting epistemic status of (this is the report epistemic status rule): say "[noun] - [if seen]seen[otherwise]unseen[end if] / [if familiar]familiar[otherwise]unfamiliar[end if] / - [if known]known[otherwise]unknown[end if]." + [if known]known[otherwise]unknown[end if]." (A). Epistemology ends here. diff --git a/retrospective/6L30/Extensions/Graham Nelson/Approximate Metric Units.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x similarity index 100% rename from retrospective/6L30/Extensions/Graham Nelson/Approximate Metric Units.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Approximate Metric Units.i7x diff --git a/retrospective/6L30/Extensions/Graham Nelson/English Language.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/English Language.i7x similarity index 100% rename from retrospective/6L30/Extensions/Graham Nelson/English Language.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/English Language.i7x diff --git a/retrospective/6L30/Extensions/Graham Nelson/Metric Units.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Metric Units.i7x similarity index 94% rename from retrospective/6L30/Extensions/Graham Nelson/Metric Units.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Metric Units.i7x index 47e430015..000efb445 100644 --- a/retrospective/6L30/Extensions/Graham Nelson/Metric Units.i7x +++ b/retrospective/6L38/Internal/Extensions/Graham Nelson/Metric Units.i7x @@ -247,8 +247,9 @@ of light produced is luminosity. A fully lit computer display of 2008 has a brightness of about 330 cd/sq m, and has a surface area of maybe 0.5 sq m, so pours out about 150 cd. This is more than a domestic light bulb produces, but the bulb is much, much brighter - maybe 150000 cd/sq m - -because the light comes out of a smaller area.) A luminance of 0.001 cd/sq m, -is so dim it can barely be seen, and up to about 2000000 cd/sq m, which would be painful to look at." +because the light comes out of a smaller area.) A luminance of 0.001 cd/sq m +is so dim it can barely be seen, whereas 2000000 cd/sq m would be painful +to look at." 1.0 cd/sq m (in metric units, in cd/sq m) or 1 candela per square meter (in candelas per square meter, singular) or 2 candelas per square meter @@ -280,8 +281,8 @@ down by 10000. units, in hectares, plural) specifies an area scaled up by 10000. The specification of area is "Measures the extent of a two-dimensional surface, -usually a patch of land or the covering of an object. Inform measures down to -1 sq cm, the area of a small coin, or up to 21 hectares, the grounds of a large +usually a patch of land or the covering of an object. 1 sq cm is about the +area of a small coin, whereas 20 hectares would be the grounds of a large country house or a typical French vineyard. A boxing ring is 36 sq m; a sports field about 6000 sq m." @@ -310,9 +311,8 @@ a volume scaled down by 1000000. The specification of volume is "Measures the extent of a three-dimensional space, usually the space taken up by an object or the space inside a -container. Inform measures down to 1 cc (or 1 ml - same thing), about a -teaspoon-full, or up to 2100 cu m, twice the capacity of an Olympic -swimming pool." +container. 1 cc (or 1 ml - same thing) is about a teaspoon-full, whereas +1000 cu m is roughly the capacity of an Olympic swimming pool." Length times area specifies a volume. @@ -469,11 +469,7 @@ would produce '45 ml', for instance. For detailed notes on each of the units, consult the Kinds index for any project using this extension. -There are three main restrictions. First, Inform can only represent numbers within a certain range. Each kind of value is set up on the assumption that writers will want it to model human-scale situations - length, for instance, varies from 1mm, the smallest conscious movement a human can make, up to 2150km or so, the length of a continent-spanning footpath. 'Metric Units' is an extension to help with real-world physics questions like how long a plate dropped off the roof takes to hit the ground, or when a rope will break, or how long a saucepan of water will take to boil. It won't be much use for celestial events like lightning strikes, where enormous energies are released for fleeting periods of time, or for tiny subatomic events. - -Secondly, calculations are done with fixed-point arithmetic and will inevitably involve small rounding errors. Working out the same quantity by two different methods, which ought to have the same result according to physics, will often produce slightly different answers because these errors accumulate differently. 'Metric Units' aspires to help the writer to get physical answers which are about right, not to be a precision tool. - -Thirdly, we haven't included every SI unit. There are hundreds of kinds of value which turn up in physics, and we only include the commonest 25 or so. The missing ones which have named SI units are: +We haven't included every SI unit. There are hundreds of kinds of value which turn up in physics, and we only include the commonest 25 or so. The missing ones which have named SI units are: angle (measured in radians), solid angle (measured in steradians), luminous flux (lux), electric capacitance (Farads), electric resistance (Ohms), electric conductance (Siemens), magnetic flux (Webers), magnetic field (Teslas), inductance (Henries), radioactivity (Becquerels), absorbed radioactive dose (Grays), equivalent radioactive dose (Sieverts), chemical quantity (mole), catalytic activity (katals). diff --git a/retrospective/6L30/Extensions/Graham Nelson/Rideable Vehicles.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x similarity index 100% rename from retrospective/6L30/Extensions/Graham Nelson/Rideable Vehicles.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Rideable Vehicles.i7x diff --git a/retrospective/6L30/Extensions/Graham Nelson/Standard Rules.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Standard Rules.i7x similarity index 94% rename from retrospective/6L30/Extensions/Graham Nelson/Standard Rules.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Standard Rules.i7x index ae880a260..41676dad5 100644 --- a/retrospective/6L30/Extensions/Graham Nelson/Standard Rules.i7x +++ b/retrospective/6L38/Internal/Extensions/Graham Nelson/Standard Rules.i7x @@ -4,286 +4,286 @@ Version 3/120430 of the Standard Rules by Graham Nelson begins here. of kinds, actions and phrases which make Inform what it is." [...and so on...] -Document rules_instead at doc100 "7.2" "7.2. Instead rules". -Document ph_continueaction ph_stopaction rules_before at doc101 "7.3" "7.3. Before rules". -Document PM_ActionNotSpecific PM_ActionTooSpecific PM_UnknownTryAction1 PM_UnknownTryAction2 ph_try ph_trysilently at doc102 "7.4" "7.4. Try and try silently". -Document rules_after at doc103 "7.5" "7.5. After rules". -Document PM_APWithDisjunction PM_APWithImmiscible at doc106 "7.8" "7.8. Rules applying to more than one action". -Document var_noun at doc108 "7.10" "7.10. The noun and the second noun". -Document PM_CantAssertAdjective PM_CantAssertNegatedEverywhere PM_CantAssertNegatedRelations PM_CantAssertNonKind PM_CantAssertQuantifier PM_NegatedVerb1 PM_NoSuchVerb PM_NoSuchVerbComma PM_TwoLikelihoods at doc11 "2.1" "2.1. Creating the world". -Document PM_APWithBadWhen PM_NonActionInPresenceOf at doc110 "7.12" "7.12. In the presence of, and when". -Document PM_GoingWithoutObject PM_GoingWrongKind at doc112 "7.14" "7.14. Going by, going through, going with". -Document KACTIONS PM_NamedAPWithActor at doc113 "7.15" "7.15. Kinds of action". -Document var_prompt at doc118 "8.2" "8.2. Changing the command prompt". -Document phs_surroundings var_sl at doc119 "8.3" "8.3. Changing the status line". -Document ph_say at doc12 "2.2" "2.2. Making rules". -Document ph_changeexit ph_changenoexit at doc121 "8.5" "8.5. Change of properties with values". -Document ph_move at doc123 "8.7" "8.7. Moving things". -Document ph_movebackdrop ph_updatebackdrop at doc124 "8.8" "8.8. Moving backdrops". -Document ph_remove at doc126 "8.10" "8.10. Removing things from play". -Document PM_BadNow1 PM_BadNow2 PM_BadNow3 PM_CantChangeKind PM_CantForceCalling PM_CantForceExistence PM_CantForceGeneralised PM_CantForceRelation PM_RedefinedNow ph_now at doc127 "8.11" "8.11. Now...". -Document ph_decrease ph_decrement ph_increase ph_increment at doc128 "8.12" "8.12. Increasing and decreasing". -Document PM_EnigmaticPronoun PM_EnigmaticThey PM_TooMuchQuotedText PM_UnendingComment PM_UnendingQuote PM_WordTooLong at doc13 "2.3" "2.3. Punctuation". -Document PM_CalledThe PM_CalledWithDash at doc131 "8.15" "8.15. Calling names". -Document ph_firstheld ph_holder ph_nextheld at doc133 "8.17" "8.17. Looking at containment by hand". -Document ph_randombetween ph_randomchance ph_seed at doc134 "8.18" "8.18. Randomness". -Document PM_RandomImpossible ph_randomdesc at doc135 "8.19" "8.19. Random choices of things". -Document ROOMPLAYBEGINS rules_wpb at doc136 "9.1" "9.1. When play begins". -Document var_score at doc137 "9.2" "9.2. Awarding points". -Document ph_end ph_ended ph_endfinally ph_endfinallysaying ph_endsaying ph_finallyended ph_notended ph_notfinallyended ph_resume rules_wpe at doc139 "9.4" "9.4. When play ends". -Document PM_NumberOfTurns rules_et at doc140 "9.5" "9.5. Every turn". -Document kind_time var_time at doc141 "9.6" "9.6. The time of day". -Document phs_timewords at doc142 "9.7" "9.7. Telling the time". -Document ph_durationhours ph_durationmins at doc143 "9.8" "9.8. Approximate times, lengths of time". -Document ph_shiftafter ph_shiftbefore ph_timeafter ph_timebefore at doc144 "9.9" "9.9. Comparing and shifting times". -Document ph_hourspart ph_minspart at doc145 "9.10" "9.10. Calculating times". -Document PM_AtWithoutTime PM_UnusedTimedEvent TIMEDEVENTS ph_attime ph_timefromnow ph_turnsfromnow at doc146 "9.11" "9.11. Future events". -Document PM_PTAPTooComplex at doc147 "9.12" "9.12. Actions as conditions". -Document PM_DescSubordinatePast PM_NonPresentTense PM_PTAPMakesCallings PM_PastActionCalled PM_PastCallings PM_PastSubordinate PM_PastTableEntries PM_PastTableLookup at doc148 "9.13" "9.13. The past and perfect tenses". -Document HEADINGS PM_BadTitleSentence PM_HeadingOverLine PM_HeadingStopsBeforeEndOfLine at doc15 "2.5" "2.5. Headings". -Document SCENESINTRO kind_scene at doc151 "10.1" "10.1. Introduction to scenes". -Document PM_ScenesBadCondition PM_ScenesDisallowCalled PM_ScenesNotPlay PM_ScenesOnly PM_ScenesOversetEnd PM_ScenesUnknownEnd at doc152 "10.2" "10.2. Creating a scene". -Document ph_scenetimesincebegan ph_scenetimesinceended ph_scenetimewhenbegan ph_scenetimewhenended at doc153 "10.3" "10.3. Using the Scene index". -Document ph_hasended ph_hashappened ph_hasnotended ph_hasnothappened at doc154 "10.4" "10.4. During scenes". -Document LINKINGSCENES at doc155 "10.5" "10.5. Linking scenes together". -Document PHRASES ph_nothing at doc160 "11.1" "11.1. What are phrases?". -Document PM_BareTo at doc161 "11.2" "11.2. The phrasebook". -Document PM_AdjacentTokens PM_BadTypeIndication PM_PhraseTooLong PM_SaySlashed PM_TokenMisunderstood PM_TokenWithEmptyBrackets PM_TokenWithNestedBrackets PM_TokenWithoutCloseBracket PM_TokenWithoutOpenBracket at doc162 "11.3" "11.3. Pattern matching". -Document ph_showme at doc163 "11.4" "11.4. The showme phrase". -Document PM_TruthStateToDecide kind_truthstate ph_consents ph_indarkness ph_whether at doc164 "11.5" "11.5. Conditions and questions". -Document PM_IfOutsidePhrase PM_WrongThen ph_if ph_unless at doc165 "11.6" "11.6. If". -Document PM_BeginWithoutEnd PM_BlockNestingTooDeep PM_BothBlockSyntaxes PM_CantUseOutsideStructure PM_EmptyIndentedBlock PM_EndWithoutBegin PM_MisalignedIndentation PM_NotInOldSyntax PM_PossibleUnterminatedIf PM_PossibleUnterminatedUnless PM_RunOnsInTabbedRoutine PM_WrongEnd at doc166 "11.7" "11.7. Begin and end". -Document PM_BlockWithinNonblock PM_CaseValueMismatch PM_CaseValueNonConstant PM_DoubleOtherwise PM_MisalignedCase PM_MisalignedOtherwise PM_MisarrangedOtherwise PM_NonCaseInIf PM_OtherwiseIfAfterOtherwise PM_OtherwiseInNonIf PM_OtherwiseWithoutIf PM_WrongOtherwise PM_WrongOtherwise2 PM_WrongOtherwise3 ph_otherwise ph_switch at doc167 "11.8" "11.8. Otherwise". -Document ph_while at doc168 "11.9" "11.9. While". -Document PM_CalledInRepeat ph_repeat at doc169 "11.10" "11.10. Repeat". -Document PM_BadRepeatDomain ph_runthrough at doc170 "11.11" "11.11. Repeat running through". -Document PM_CantUseOutsideLoop ph_break ph_next at doc171 "11.12" "11.12. Next and break". -Document ph_stop at doc172 "11.13" "11.13. Stop". -Document PM_NotAPhraseOption PM_NotTheOnlyPhraseOption PM_PhraseOptionsExclusive PM_SayWithPhraseOptions PM_TooManyPhraseOptions ph_listcontents at doc173 "11.14" "11.14. Phrase options". -Document ph_let ph_letdefault at doc174 "11.15" "11.15. Let and temporary variables". -Document ph_no ph_yes at doc175 "11.16" "11.16. New conditions, new adjectives". -Document PM_RedundantReturnKOV PM_ReturnWrongKind PM_UnknownValueToDecide ph_decideon at doc176 "11.17" "11.17. Phrases to decide other things". -Document ph_enumafter ph_enumbefore ph_enumfirst ph_enumlast at doc177 "11.18" "11.18. The value after and the value before". -Document ARSUMMARY at doc179 "12.2" "12.2. How actions are processed". -Document PM_TestBadRequirements PM_TestCommandTooLong PM_TestContainsUndo PM_TestDoubleWith PM_TestDuplicate PM_TestMultiWord PM_UnknownInternalTest at doc18 "2.8" "2.8. The TEST command". -Document var_person_asked at doc180 "12.3" "12.3. Giving instructions to other people". -Document rules_per at doc181 "12.4" "12.4. Persuasion". -Document rules_fail var_reason at doc182 "12.5" "12.5. Unsuccessful attempts". -Document NEWACTIONS PM_ActionAlreadyExists PM_ActionBothValues PM_ActionClauseUnknown PM_ActionMisapplied PM_GrammarMismatchesAction PM_MatchedAsTooLong PM_MultiwordPastParticiple ph_requirescarried ph_requirescarried2 ph_requireslight ph_requirestouch ph_requirestouch2 at doc184 "12.7" "12.7. New actions". -Document PM_ActionVarAnd PM_ActionVarOverspecific PM_ActionVarUnknownKOV PM_ActionVarValue PM_ActionVarsPastTense PM_BadMatchingSyntax PM_BadOptionalAPClause at doc187 "12.10" "12.10. Action variables". -Document PM_DuplicateRuleName PM_RuleWithComma at doc189 "12.12" "12.12. Check rules for actions by other people". -Document OUTOFWORLD at doc192 "12.15" "12.15. Out of world actions". -Document rules_ri at doc193 "12.16" "12.16. Reaching inside and reaching outside rules". -Document var_person_reaching at doc195 "12.18" "12.18. Changing reachability". -Document visibility at doc196 "12.19" "12.19. Changing visibility". -Document PM_SetStoredAction kind_storedaction ph_actionof ph_actionpart ph_actorpart ph_currentaction ph_involves ph_nounpart ph_secondpart ph_trystored ph_trystoredsilently at doc197 "12.20" "12.20. Stored actions". -Document PM_BadRelation PM_EveryWrongSide PM_KindRelatedToValue PM_PropForBadKOV PM_RelationWithBadProperty PM_RelationWithEitherOrProperty VERBS at doc199 "13.1" "13.1. Sentence verbs". -Document PM_BogusExtension at doc20 "2.10" "2.10. Installing extensions". -Document RELATIONS at doc201 "13.3" "13.3. What are relations?". -Document PM_BadKOVForRelationProperty PM_BothOneAndMany PM_CantCallBoth PM_CantCallLeft PM_CantCallRight PM_FRFUnavailable PM_OneOrVariousWithWhen PM_OneToOneMiscalled PM_RelatedKindsUnknown PM_RelationExists at doc203 "13.5" "13.5. Making new relations". -Document ph_showrelation at doc205 "13.7" "13.7. Relations in groups". -Document PM_DuplicateVerbs1 PM_DuplicateVerbs2 PM_DuplicateVerbs3 PM_PrepositionConjugated PM_PrepositionLong PM_PresentPluralTwice PM_VerbMalformed PM_VerbRelationUnknown PM_VerbRelationVague PM_VerbUnknownMeaning at doc207 "13.9" "13.9. Defining new assertion verbs". -Document PM_CanHave at doc208 "13.10" "13.10. Defining new prepositions". -Document ph_nextstep ph_numbersteps at doc209 "13.11" "13.11. Indirect relations". -Document PM_ExtInadequateVM PM_ExtMalformedVM PM_ExtMisidentified PM_ExtMisidentifiedEnds PM_ExtMiswordedBeginsHere PM_ExtVersionMalformed PM_IncludeExtQuoted at doc21 "2.11" "2.11. Including extensions". -Document PM_BadRelationCondition PM_Unassertable2 at doc210 "13.12" "13.12. Relations which express conditions". -Document ph_ifleft ph_ifright ph_leftdomain ph_leftlookup ph_leftlookuplist ph_rightdomain ph_rightlookup ph_rightlookuplist at doc211 "13.13" "13.13. Relations involving values". -Document ph_letrelation at doc213 "13.15" "13.15. Temporary relations". -Document phs_here phs_now at doc215 "14.1" "14.1. Tense and narrative viewpoint". -Document OPTIONS PM_UONotNumerical PM_UnknownUseOption at doc22 "2.12" "2.12. Use options". -Document kind_verb phs_adapt phs_adaptt phs_adaptv phs_adaptvt phs_infinitive phs_negate phs_negatet phs_negatev phs_negatevt phs_pastpart phs_prespart at doc223 "14.9" "14.9. Verbs as values". -Document phs_response at doc224 "14.10" "14.10. Responses". -Document PM_CantEquateValues PM_ElementOverflow PM_EvenOverflow-G PM_InequalityFailed PM_LiteralOverflow PM_ZMachineOverflow kind_number kind_real_number at doc228 "15.2" "15.2. Numbers and real numbers". -Document ph_nearestwholenumber at doc229 "15.3" "15.3. Real number conversions". -Document OPTIONSFILE at doc23 "2.13" "2.13. Administering classroom use". -Document phs_decimal phs_decimalplaces phs_realplaces phs_scientific phs_scientificplaces at doc230 "15.4" "15.4. Printing real numbers". -Document ph_cuberoot ph_divide ph_minus ph_nearest ph_plus ph_realsquareroot ph_remainder ph_squareroot ph_times at doc231 "15.5" "15.5. Arithmetic". -Document ph_absolutevalue ph_ceiling ph_exp ph_floor ph_logarithm ph_logarithmto ph_power ph_reciprocal at doc232 "15.6" "15.6. Powers and logarithms". -Document ph_arccosine ph_arcsine ph_arctangent ph_cosine ph_degrees ph_hyperbolicarccosine ph_hyperbolicarcsine ph_hyperbolicarctangent ph_hyperboliccosine ph_hyperbolicsine ph_hyperbolictangent ph_sine ph_tangent at doc233 "15.7" "15.7. Trigonometry". -Document PM_LPBuiltInKOV PM_LPEnumeration PM_LPNotKOV PM_NegationForbidden PM_NegationInternal at doc234 "15.8" "15.8. Units". -Document PM_DuplicateUnitSpec at doc235 "15.9" "15.9. Multiple notations". -Document PM_LPCantScaleTwice PM_LPCantScaleYet PM_LPTooLittleAccuracy at doc236 "15.10" "15.10. Scaling and equivalents". -Document PM_BadICLIdentifier STORYFILES at doc24 "2.14" "2.14. Limits and the Settings panel". -Document PM_LPElementTooLarge PM_LPNotAllNamed PM_LPTooComplicated PM_LPTooManyElements PM_LPWithoutElement at doc240 "15.14" "15.14. Notations including more than one number". -Document PM_BadLPNameOption PM_BadLPPartOption PM_LPFirstOptional PM_LPMultipleOptional at doc241 "15.15" "15.15. The parts of a number specification". -Document PM_TotalEitherOr PM_TotalTableColumn ph_total at doc243 "15.17" "15.17. Totals". -Document EQUATIONS PM_EquationBadArithmetic PM_EquationBadTarget PM_EquationDimensionPower PM_EquationDoesntEquate PM_EquationEquatesBadly PM_EquationEquatesMultiply PM_EquationIncomparable PM_EquationInsoluble PM_EquationLeadingZero PM_EquationMisnamed PM_EquationMisnumbered PM_EquationMispunctuated PM_EquationOperatorUnrecognised PM_EquationSymbolBadSub PM_EquationSymbolEqualsKOV PM_EquationSymbolMalformed PM_EquationSymbolMisdeclared PM_EquationSymbolMissing PM_EquationSymbolNonNumeric PM_EquationSymbolNonValue PM_EquationSymbolSpurious PM_EquationSymbolVague PM_EquationSymbolWrongKOV PM_EquationTokenUnrecognised PM_EquationTooComplex ph_letequation at doc244 "15.18" "15.18. Equations". -Document ARITHMETIC PM_BadArithmetic PM_BadLPEquivalent PM_BadLPOffset PM_DimensionNotBaseKOV PM_DimensionRedundant PM_DimensionsInconsistent PM_MultiplyingNonKOVs PM_NonDimensional PM_UnitSequenceOverflow at doc246 "15.20" "15.20. Multiplication of units". -Document PM_TableCoincidesWithKind PM_TableColumnAlready PM_TableColumnArticle PM_TableColumnBrackets PM_TableColumnEmptyLists PM_TableDefiningObject PM_TableDescriptionEntry PM_TableEntryGeneric PM_TableIncompatibleEntry PM_TableKindlessColumn PM_TableMisnamed PM_TableNameAmbiguous PM_TableNameDuplicate PM_TableOfBuiltInKind PM_TableOfExistingKind PM_TableOfQuantifiedKind PM_TablePlayerEntry PM_TableRowFull PM_TableTooManyColumns PM_TableUndefined PM_TableUnknownEntry PM_TableVariableEntry PM_TableWithBlankNames PM_TableWithoutRows TABLES at doc247 "16.1" "16.1. Laying out tables". -Document ph_numrows at doc248 "16.2" "16.2. Looking up entries". -Document ph_showmetable phs_currenttablerow phs_tablecolumn phs_tablerow at doc250 "16.4" "16.4. Changing entries". -Document PM_NoRowSelected ph_chooserandomrow ph_chooserow ph_chooserowwith at doc251 "16.5" "16.5. Choosing rows". -Document ph_repeattable ph_repeattablecol ph_repeattablecolreverse ph_repeattablereverse at doc252 "16.6" "16.6. Repeating through tables". -Document ph_thereis ph_thereisno at doc253 "16.7" "16.7. Blank entries". -Document ph_blankout ph_blankoutcol ph_blankoutrow ph_blankouttable ph_chooseblankrow ph_numblank ph_numfilled at doc256 "16.10" "16.10. Adding and removing rows". -Document ph_sortcolumn ph_sortcolumnreverse ph_sortrandom at doc257 "16.11" "16.11. Sorting". -Document kind_tablename at doc261 "16.15" "16.15. Varying which table to look at". -Document PM_TableDefiningNothing PM_TableDefiningTheImpossible at doc262 "16.16" "16.16. Defining things with tables". -Document PM_TableNotContinuation at doc264 "16.18" "16.18. Table continuations". -Document PM_TableAmendmentMisfit PM_TableAmendmentMismatch at doc265 "16.19" "16.19. Table amendments". -Document PM_BizarreToken PM_ComplexUnderstand PM_LiteralPunctuation PM_NontextualUnderstand PM_NotNewCommand PM_NotOldCommand PM_ObsoleteHeldTokens PM_OldVerbUsage PM_OverComplexToken PM_TextTokenRestricted PM_TextlessMistake PM_UnderstandAsActivity PM_UnderstandAsBadValue PM_UnderstandAsCompoundText PM_UnderstandCommaCommand PM_UnderstandCommandWhen PM_UnderstandEmptyText PM_UnderstandMismatch PM_UnderstandVague PM_UnknownToken PM_UnparsableKind PM_UseTextNotTopic PM_UseThingNotObject UNDERSTANDING someone_token at doc266 "17.1" "17.1. Understand". -Document PM_GrammarIllFounded PM_ThreeValuedLine PM_TooManyAliases PM_TooManyGrammarLines at doc267 "17.2" "17.2. New commands for old grammar". -Document TOKENS things_token at doc269 "17.4" "17.4. Standard tokens of grammar". -Document text_token at doc270 "17.5" "17.5. The text token". -Document var_understood at doc274 "17.9" "17.9. Understanding kinds of value". -Document PM_UnderstandAsQualified PM_UnderstandPluralValue at doc276 "17.11" "17.11. Understanding values". -Document PM_OverAmbitiousSlash PM_SlashedCommand at doc277 "17.12" "17.12. This/that". -Document NEWTOKENS PM_MixedOutcome PM_TwoValuedToken at doc278 "17.13" "17.13. New tokens". -Document MAP PM_DescriptionsEquated PM_SameKindEquated kind_room at doc28 "3.2" "3.2. Rooms and the map". -Document PM_BadReferringProperty PM_BadUnderstandProperty PM_BadUnderstandPropertyAs PM_UnknownUnderstandProperty PM_UnknownUnpermittedProperty at doc280 "17.15" "17.15. Understanding things by their properties". -Document PM_GrammarBadRelation PM_GrammarObjectlessRelation PM_GrammarValueRelation at doc281 "17.16" "17.16. Understanding things by their relations". -Document PM_BadWhen at doc282 "17.17" "17.17. Context: understanding when". -Document ph_setpronouns at doc283 "17.18" "17.18. Changing the meaning of pronouns". -Document rules_dtpm at doc284 "17.19" "17.19. Does the player mean...". -Document ACTIVITIES PM_BadActivityName kind_activity at doc287 "18.1" "18.1. What are activities?". -Document PM_BadWhenWhile at doc290 "18.4" "18.4. While clauses". -Document EXTACTIVITIES ph_carryout ph_carryoutwith ph_continueactivity at doc291 "18.5" "18.5. New activities". -Document PM_ActivityVarAnd PM_ActivityVarOverspecific PM_ActivityVarUnknownKOV PM_ActivityVarValue PM_ActivityVariableNameless at doc292 "18.6" "18.6. Activity variables". -Document ph_abandonactivity ph_abandonactivitywith ph_beginactivity ph_beginactivitywith ph_endactivity ph_endactivitywith ph_handlingactivity ph_handlingactivitywith at doc293 "18.7" "18.7. Beginning and ending activities manually". -Document act_con var_particular at doc295 "18.9" "18.9. Deciding the concealed possessions of something". -Document act_pn ph_omit at doc296 "18.10" "18.10. Printing the name of something". -Document act_ppn at doc297 "18.11" "18.11. Printing the plural name of something". -Document act_pan at doc298 "18.12" "18.12. Printing a number of something". -Document act_lc ph_group ph_groupart ph_grouptext at doc299 "18.13" "18.13. Listing contents of something". -Document PM_ExistingRegion PM_RegionInTwoRegions PM_RegionRelation REGIONS kind_region at doc30 "3.4" "3.4. Regions and the index map". -Document act_gt at doc300 "18.14" "18.14. Grouping together something". -Document act_resp at doc301 "18.15" "18.15. Issuing the response text of something". -Document act_details at doc302 "18.16" "18.16. Printing room description details of something". -Document act_idetails at doc303 "18.17" "18.17. Printing inventory details of something". -Document act_toodark at doc304 "18.18" "18.18. Printing a refusal to act in the dark". -Document act_nowdark at doc305 "18.19" "18.19. Printing the announcement of darkness". -Document act_nowlight at doc306 "18.20" "18.20. Printing the announcement of light". -Document act_darkname at doc307 "18.21" "18.21. Printing the name of a dark room". -Document act_darkdesc at doc308 "18.22" "18.22. Printing the description of a dark room". -Document act_csl at doc309 "18.23" "18.23. Constructing the status line". -Document KINDS PM_BothRoomAndSupporter PM_CantContainAndSupport PM_KindsIncompatible PM_MiseEnAbyme at doc31 "3.5" "3.5. Kinds". -Document act_wpa at doc310 "18.24" "18.24. Writing a paragraph about". -Document act_lni at doc311 "18.25" "18.25. Listing nondescript items of something". -Document act_pld at doc312 "18.26" "18.26. Printing the locale description of something". -Document act_cnlo at doc313 "18.27" "18.27. Choosing notable locale objects for something". -Document act_plp at doc314 "18.28" "18.28. Printing a locale paragraph about". -Document act_ds ph_placecontentsinscope ph_placeinscope at doc315 "18.29" "18.29. Deciding the scope of something". -Document act_clarify at doc316 "18.30" "18.30. Clarifying the parser's choice of something". -Document act_which at doc317 "18.31" "18.31. Asking which do you mean". -Document act_smn at doc318 "18.32" "18.32. Supplying a missing noun/second noun". -Document act_reading kind_snippet ph_changecommand ph_cutsnippet ph_rejectcommand ph_replacesnippet ph_snippetdoesnotinclude ph_snippetdoesnotmatch ph_snippetincludes ph_snippetmatches var_command at doc319 "18.33" "18.33. Reading a command". -Document act_implicitly at doc320 "18.34" "18.34. Implicitly taking something". -Document act_parsererror at doc321 "18.35" "18.35. Printing a parser error". -Document act_all at doc322 "18.36" "18.36. Deciding whether all includes". -Document act_banner phs_banner at doc323 "18.37" "18.37. Printing the banner text". -Document act_obit at doc324 "18.38" "18.38. Printing the player's obituary". -Document act_amuse at doc325 "18.39" "18.39. Amusing a victorious player". -Document act_startvm at doc326 "18.40" "18.40. Starting the virtual machine". -Document PM_RulebookWithAt PM_RulebookWithDefinition PM_RulebookWithTo RULEBOOKS kind_rule kind_rulebook at doc327 "19.1" "19.1. On rules". -Document PM_BadRulePreamble PM_BadRulePreambleWhen PM_RuleWithDefiniteArticle PM_RuleWithoutColon at doc329 "19.3" "19.3. New rules". -Document PM_PropertyNotPermitted at doc33 "3.7" "3.7. Properties depend on kind". -Document PM_BadRulePlacementNegation PM_ImproperRulePlacement PM_NoSuchRuleExists PM_PlaceWithMissingRule PM_UnspecifiedRulebookPlacement RLISTING at doc330 "19.4" "19.4. Listing rules explicitly". -Document rules_proc at doc331 "19.5" "19.5. Changing the behaviour of rules". -Document NEWRULEBOOKS ph_follow at doc334 "19.8" "19.8. New rulebooks". -Document ph_followfor at doc335 "19.9" "19.9. Basis of a rulebook". -Document PM_RulebookVariableAnd PM_RulebookVariableBadKind PM_RulebookVariableTooSpecific PM_RulebookVariableVague at doc336 "19.10" "19.10. Rulebook variables". -Document PM_BadDefaultOutcome PM_DefaultOutcomeTwice ph_failed ph_fails ph_nodecision ph_succeeded ph_succeeds at doc337 "19.11" "19.11. Success and failure". -Document PM_BadOutcomeClarification PM_DefaultNamedOutcomeTwice PM_DefaultOutcomeAlready PM_DuplicateOutcome PM_MisplacedRulebookOutcome PM_NonOutcomeProperty PM_WrongEndToPhrase ph_rulebookoutcome at doc338 "19.12" "19.12. Named outcomes". -Document ph_producedby ph_producedbyfor ph_succeedswith at doc339 "19.13" "19.13. Rulebooks producing values". -Document ph_abide ph_abideanon ph_abidefor at doc340 "19.14" "19.14. Abide by". -Document rules_internal at doc341 "19.15" "19.15. Two rulebooks used internally". -Document ph_charnum ph_linenum ph_numchars ph_numlines ph_numparas ph_numpwords ph_numupwords ph_numwords ph_paranum ph_pwordnum ph_upwordnum ph_wordnum at doc345 "20.3" "20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs". -Document ph_inlower ph_inupper ph_lowercase ph_sentencecase ph_titlecase ph_uppercase at doc346 "20.4" "20.4. Upper and lower case letters". -Document ph_exactlymatches ph_matches ph_nummatches at doc347 "20.5" "20.5. Matching and exactly matching". -Document ph_exactlymatchesre ph_matchesre ph_matchtext ph_nummatchesre ph_subexpressiontext at doc348 "20.6" "20.6. Regular expression matching". -Document ph_subform at doc349 "20.7" "20.7. Making new text with text substitutions". -Document PM_CantChangeEverywhere PM_EverywhereMisapplied PM_EverywhereNonBackdrop kind_backdrop at doc35 "3.9" "3.9. Backdrops". -Document ph_replace ph_replacechar ph_replaceline ph_replacepara ph_replacepword ph_replacepwordin ph_replacere ph_replaceupword ph_replaceword ph_replacewordin at doc350 "20.8" "20.8. Replacements". -Document kind_listof at doc352 "21.1" "21.1. Lists and entries". -Document PM_BadConstantListEntry PM_CantLetEmptyList PM_IncompatibleConstantListEntry PM_NonconstantConstantListEntry at doc353 "21.2" "21.2. Constant lists". -Document phs_listbraced phs_listdef phs_listindef at doc354 "21.3" "21.3. Saying lists of values". -Document ph_islistedin ph_isnotlistedin ph_repeatlist at doc355 "21.4" "21.4. Testing and iterating over lists". -Document ph_addatentry ph_addlistatentry ph_addlisttolist ph_addtolist ph_rementries ph_rementry ph_remfromlist ph_remlistfromlist at doc356 "21.5" "21.5. Building lists". -Document ph_altermultipleobjectlist ph_listofdesc ph_multipleobjectlist at doc357 "21.6" "21.6. Lists of objects". -Document ph_reverselist ph_rotatelist ph_rotatelistback ph_sortlist ph_sortlistproperty ph_sortlistpropertyreverse ph_sortlistrandom ph_sortlistreverse at doc359 "21.8" "21.8. Sorting, reversing and rotating lists". -Document ph_numberentries at doc360 "21.9" "21.9. Accessing entries in a list". -Document ph_changelength ph_extend ph_truncate ph_truncatefirst ph_truncatelast at doc361 "21.10" "21.10. Lengthening or shortening a list". -Document kind_description ph_valuematch at doc364 "22.2" "22.2. Descriptions as values". -Document ph_applied0 ph_applied1 ph_applied2 ph_applied3 ph_apply0 ph_apply1 ph_apply2 ph_apply3 at doc365 "22.3" "22.3. Phrases as values". -Document ph_appliedlist ph_filter ph_reduction at doc367 "22.5" "22.5. Map, filter and reduce". -Document PM_TextWithoutSubject PM_TwoAppearances at doc37 "3.11" "3.11. Two descriptions of things". -Document PM_UnknownVirtualMachine at doc375 "23.3" "23.3. Virtual machines and story file formats". -Document FIGURES kind_figurename at doc376 "23.4" "23.4. Gathering the figures". -Document PM_PictureDuplicate PM_PictureNotTextual at doc377 "23.5" "23.5. Declaring and previewing the figures". -Document ph_displayfigure at doc378 "23.6" "23.6. Displaying the figures". -Document SOUNDS kind_soundname at doc379 "23.7" "23.7. Recorded sounds". -Document PM_BadMapCell PM_BothWaysDoor PM_DoorInThirdRoom PM_DoorOverconnected PM_DoorToNonRoom PM_DoorUnconnected PM_RoomMissingDoor kind_door ph_backside ph_directionofdoor ph_frontside ph_othersideof at doc38 "3.12" "3.12. Doors". -Document PM_SoundDuplicate PM_SoundNotTextual ph_playsf at doc380 "23.8" "23.8. Declaring and playing back sounds". -Document ph_figureid ph_soundid at doc382 "23.10" "23.10. Some technicalities about figures and sounds". -Document EFILES at doc383 "23.11" "23.11. Files". -Document PM_BadFileIFID PM_BadFileOwner PM_FilenameDuplicate PM_FilenameNotTextual PM_FilenameUnsafe kind_externalfile at doc384 "23.12" "23.12. Declaring files". -Document ph_fileexists ph_readtable ph_writetable at doc385 "23.13" "23.13. Writing and reading tables to external files". -Document ph_appendtext ph_saytext ph_writetext at doc386 "23.14" "23.14. Writing, reading and appending text to files". -Document ph_fileready ph_markfilenotready ph_markfileready at doc387 "23.15" "23.15. Exchanging files with other programs". -Document PM_BadEpisode at doc397 "25.2" "25.2. Bibliographic data". -Document LCARDS at doc399 "25.4" "25.4. The Library Card". +Document PM_CantAssertAdjective PM_CantAssertNegatedEverywhere PM_CantAssertNegatedRelations PM_CantAssertNonKind PM_CantAssertQuantifier PM_NegatedVerb1 PM_NoSuchVerb PM_NoSuchVerbComma PM_TwoLikelihoods at doc10 "2.1" "2.1. Creating the world". +Document ph_continueaction ph_stopaction rules_before at doc100 "7.3" "7.3. Before rules". +Document PM_ActionNotSpecific PM_ActionTooSpecific PM_UnknownTryAction1 PM_UnknownTryAction2 ph_try ph_trysilently at doc101 "7.4" "7.4. Try and try silently". +Document rules_after at doc102 "7.5" "7.5. After rules". +Document PM_APWithDisjunction PM_APWithImmiscible at doc105 "7.8" "7.8. Rules applying to more than one action". +Document var_noun at doc107 "7.10" "7.10. The noun and the second noun". +Document PM_APWithBadWhen PM_NonActionInPresenceOf at doc109 "7.12" "7.12. In the presence of, and when". +Document ph_say at doc11 "2.2" "2.2. Making rules". +Document PM_GoingWithoutObject PM_GoingWrongKind at doc111 "7.14" "7.14. Going by, going through, going with". +Document KACTIONS PM_NamedAPWithActor at doc112 "7.15" "7.15. Kinds of action". +Document var_prompt at doc117 "8.2" "8.2. Changing the command prompt". +Document phs_surroundings var_sl at doc118 "8.3" "8.3. Changing the status line". +Document PM_EnigmaticPronoun PM_EnigmaticThey PM_TooMuchQuotedText PM_UnendingComment PM_UnendingQuote PM_WordTooLong at doc12 "2.3" "2.3. Punctuation". +Document ph_changeexit ph_changenoexit at doc120 "8.5" "8.5. Change of properties with values". +Document ph_move at doc122 "8.7" "8.7. Moving things". +Document ph_movebackdrop ph_updatebackdrop at doc123 "8.8" "8.8. Moving backdrops". +Document ph_remove at doc125 "8.10" "8.10. Removing things from play". +Document PM_BadNow1 PM_BadNow2 PM_BadNow3 PM_CantChangeKind PM_CantForceCalling PM_CantForceExistence PM_CantForceGeneralised PM_CantForceRelation PM_RedefinedNow ph_now at doc126 "8.11" "8.11. Now...". +Document ph_decrease ph_decrement ph_increase ph_increment at doc127 "8.12" "8.12. Increasing and decreasing". +Document PM_CalledThe PM_CalledWithDash at doc130 "8.15" "8.15. Calling names". +Document ph_firstheld ph_holder ph_nextheld at doc132 "8.17" "8.17. Looking at containment by hand". +Document ph_randombetween ph_randomchance ph_seed at doc133 "8.18" "8.18. Randomness". +Document PM_RandomImpossible ph_randomdesc at doc134 "8.19" "8.19. Random choices of things". +Document ROOMPLAYBEGINS rules_wpb at doc135 "9.1" "9.1. When play begins". +Document var_score at doc136 "9.2" "9.2. Awarding points". +Document ph_end ph_ended ph_endfinally ph_endfinallysaying ph_endsaying ph_finallyended ph_notended ph_notfinallyended ph_resume rules_wpe at doc138 "9.4" "9.4. When play ends". +Document PM_NumberOfTurns rules_et at doc139 "9.5" "9.5. Every turn". +Document HEADINGS PM_BadTitleSentence PM_HeadingOverLine PM_HeadingStopsBeforeEndOfLine at doc14 "2.5" "2.5. Headings". +Document kind_time var_time at doc140 "9.6" "9.6. The time of day". +Document phs_timewords at doc141 "9.7" "9.7. Telling the time". +Document ph_durationhours ph_durationmins at doc142 "9.8" "9.8. Approximate times, lengths of time". +Document ph_shiftafter ph_shiftbefore ph_timeafter ph_timebefore at doc143 "9.9" "9.9. Comparing and shifting times". +Document ph_hourspart ph_minspart at doc144 "9.10" "9.10. Calculating times". +Document PM_AtWithoutTime PM_UnusedTimedEvent TIMEDEVENTS ph_attime ph_timefromnow ph_turnsfromnow at doc145 "9.11" "9.11. Future events". +Document PM_PTAPTooComplex at doc146 "9.12" "9.12. Actions as conditions". +Document PM_DescSubordinatePast PM_NonPresentTense PM_PTAPMakesCallings PM_PastActionCalled PM_PastCallings PM_PastSubordinate PM_PastTableEntries PM_PastTableLookup at doc147 "9.13" "9.13. The past and perfect tenses". +Document SCENESINTRO kind_scene at doc150 "10.1" "10.1. Introduction to scenes". +Document PM_ScenesBadCondition PM_ScenesDisallowCalled PM_ScenesNotPlay PM_ScenesOnly PM_ScenesOversetEnd PM_ScenesUnknownEnd at doc151 "10.2" "10.2. Creating a scene". +Document ph_scenetimesincebegan ph_scenetimesinceended ph_scenetimewhenbegan ph_scenetimewhenended at doc152 "10.3" "10.3. Using the Scene index". +Document ph_hasended ph_hashappened ph_hasnotended ph_hasnothappened at doc153 "10.4" "10.4. During scenes". +Document LINKINGSCENES at doc154 "10.5" "10.5. Linking scenes together". +Document PHRASES ph_nothing at doc159 "11.1" "11.1. What are phrases?". +Document PM_BareTo at doc160 "11.2" "11.2. The phrasebook". +Document PM_AdjacentTokens PM_BadTypeIndication PM_PhraseTooLong PM_SaySlashed PM_TokenMisunderstood PM_TokenWithEmptyBrackets PM_TokenWithNestedBrackets PM_TokenWithoutCloseBracket PM_TokenWithoutOpenBracket at doc161 "11.3" "11.3. Pattern matching". +Document ph_showme at doc162 "11.4" "11.4. The showme phrase". +Document PM_TruthStateToDecide kind_truthstate ph_consents ph_indarkness ph_whether at doc163 "11.5" "11.5. Conditions and questions". +Document PM_IfOutsidePhrase PM_WrongThen ph_if ph_unless at doc164 "11.6" "11.6. If". +Document PM_BeginWithoutEnd PM_BlockNestingTooDeep PM_BothBlockSyntaxes PM_CantUseOutsideStructure PM_EmptyIndentedBlock PM_EndWithoutBegin PM_MisalignedIndentation PM_NotInOldSyntax PM_PossibleUnterminatedIf PM_PossibleUnterminatedUnless PM_RunOnsInTabbedRoutine PM_WrongEnd at doc165 "11.7" "11.7. Begin and end". +Document PM_BlockWithinNonblock PM_CaseValueMismatch PM_CaseValueNonConstant PM_DoubleOtherwise PM_MisalignedCase PM_MisalignedOtherwise PM_MisarrangedOtherwise PM_NonCaseInIf PM_OtherwiseIfAfterOtherwise PM_OtherwiseInNonIf PM_OtherwiseWithoutIf PM_WrongOtherwise PM_WrongOtherwise2 PM_WrongOtherwise3 ph_otherwise ph_switch at doc166 "11.8" "11.8. Otherwise". +Document ph_while at doc167 "11.9" "11.9. While". +Document PM_CalledInRepeat ph_repeat at doc168 "11.10" "11.10. Repeat". +Document PM_BadRepeatDomain ph_runthrough at doc169 "11.11" "11.11. Repeat running through". +Document PM_TestBadRequirements PM_TestCommandTooLong PM_TestContainsUndo PM_TestDoubleWith PM_TestDuplicate PM_TestMultiWord PM_UnknownInternalTest at doc17 "2.8" "2.8. The TEST command". +Document PM_CantUseOutsideLoop ph_break ph_next at doc170 "11.12" "11.12. Next and break". +Document ph_stop at doc171 "11.13" "11.13. Stop". +Document PM_NotAPhraseOption PM_NotTheOnlyPhraseOption PM_PhraseOptionsExclusive PM_SayWithPhraseOptions PM_TooManyPhraseOptions ph_listcontents at doc172 "11.14" "11.14. Phrase options". +Document ph_let ph_letdefault at doc173 "11.15" "11.15. Let and temporary variables". +Document ph_no ph_yes at doc174 "11.16" "11.16. New conditions, new adjectives". +Document PM_RedundantReturnKOV PM_ReturnWrongKind PM_UnknownValueToDecide ph_decideon at doc175 "11.17" "11.17. Phrases to decide other things". +Document ph_enumafter ph_enumbefore ph_enumfirst ph_enumlast at doc176 "11.18" "11.18. The value after and the value before". +Document ARSUMMARY at doc178 "12.2" "12.2. How actions are processed". +Document var_person_asked at doc179 "12.3" "12.3. Giving instructions to other people". +Document rules_per at doc180 "12.4" "12.4. Persuasion". +Document rules_fail var_reason at doc181 "12.5" "12.5. Unsuccessful attempts". +Document NEWACTIONS PM_ActionAlreadyExists PM_ActionBothValues PM_ActionClauseUnknown PM_ActionMisapplied PM_GrammarMismatchesAction PM_MatchedAsTooLong PM_MultiwordPastParticiple ph_requirescarried ph_requirescarried2 ph_requireslight ph_requirestouch ph_requirestouch2 at doc183 "12.7" "12.7. New actions". +Document PM_ActionVarAnd PM_ActionVarOverspecific PM_ActionVarUnknownKOV PM_ActionVarValue PM_ActionVarsPastTense PM_BadMatchingSyntax PM_BadOptionalAPClause at doc186 "12.10" "12.10. Action variables". +Document PM_DuplicateRuleName PM_RuleWithComma at doc188 "12.12" "12.12. Check rules for actions by other people". +Document PM_BogusExtension at doc19 "2.10" "2.10. Installing extensions". +Document OUTOFWORLD at doc191 "12.15" "12.15. Out of world actions". +Document rules_ri at doc192 "12.16" "12.16. Reaching inside and reaching outside rules". +Document var_person_reaching at doc194 "12.18" "12.18. Changing reachability". +Document visibility at doc195 "12.19" "12.19. Changing visibility". +Document PM_SetStoredAction kind_storedaction ph_actionof ph_actionpart ph_actorpart ph_currentaction ph_involves ph_nounpart ph_secondpart ph_trystored ph_trystoredsilently at doc196 "12.20" "12.20. Stored actions". +Document PM_BadRelation PM_EveryWrongSide PM_KindRelatedToValue PM_PropForBadKOV PM_RelationWithBadProperty PM_RelationWithEitherOrProperty VERBS at doc198 "13.1" "13.1. Sentence verbs". +Document PM_ExtInadequateVM PM_ExtMalformedVM PM_ExtMisidentified PM_ExtMisidentifiedEnds PM_ExtMiswordedBeginsHere PM_ExtVersionMalformed PM_IncludeExtQuoted at doc20 "2.11" "2.11. Including extensions". +Document RELATIONS at doc200 "13.3" "13.3. What are relations?". +Document PM_BadKOVForRelationProperty PM_BothOneAndMany PM_CantCallBoth PM_CantCallLeft PM_CantCallRight PM_FRFUnavailable PM_OneOrVariousWithWhen PM_OneToOneMiscalled PM_RelatedKindsUnknown PM_RelationExists at doc202 "13.5" "13.5. Making new relations". +Document ph_showrelation at doc204 "13.7" "13.7. Relations in groups". +Document PM_DuplicateVerbs1 PM_DuplicateVerbs2 PM_DuplicateVerbs3 PM_PrepositionConjugated PM_PrepositionLong PM_PresentPluralTwice PM_VerbMalformed PM_VerbRelationUnknown PM_VerbRelationVague PM_VerbUnknownMeaning at doc206 "13.9" "13.9. Defining new assertion verbs". +Document PM_CanHave at doc207 "13.10" "13.10. Defining new prepositions". +Document ph_nextstep ph_numbersteps at doc208 "13.11" "13.11. Indirect relations". +Document PM_BadRelationCondition PM_Unassertable2 at doc209 "13.12" "13.12. Relations which express conditions". +Document OPTIONS PM_UONotNumerical PM_UnknownUseOption at doc21 "2.12" "2.12. Use options". +Document ph_ifleft ph_ifright ph_leftdomain ph_leftlookup ph_leftlookuplist ph_rightdomain ph_rightlookup ph_rightlookuplist at doc210 "13.13" "13.13. Relations involving values". +Document ph_letrelation at doc212 "13.15" "13.15. Temporary relations". +Document phs_here phs_now at doc214 "14.1" "14.1. Tense and narrative viewpoint". +Document OPTIONSFILE at doc22 "2.13" "2.13. Administering classroom use". +Document kind_verb phs_adapt phs_adaptt phs_adaptv phs_adaptvt phs_infinitive phs_negate phs_negatet phs_negatev phs_negatevt phs_pastpart phs_prespart at doc222 "14.9" "14.9. Verbs as values". +Document phs_response at doc223 "14.10" "14.10. Responses". +Document PM_CantEquateValues PM_ElementOverflow PM_EvenOverflow-G PM_InequalityFailed PM_LiteralOverflow PM_ZMachineOverflow kind_number kind_real_number at doc227 "15.2" "15.2. Numbers and real numbers". +Document ph_nearestwholenumber at doc228 "15.3" "15.3. Real number conversions". +Document phs_decimal phs_decimalplaces phs_realplaces phs_scientific phs_scientificplaces at doc229 "15.4" "15.4. Printing real numbers". +Document PM_BadICLIdentifier STORYFILES at doc23 "2.14" "2.14. Limits and the Settings panel". +Document ph_cuberoot ph_divide ph_minus ph_nearest ph_plus ph_realsquareroot ph_remainder ph_squareroot ph_times at doc230 "15.5" "15.5. Arithmetic". +Document ph_absolutevalue ph_ceiling ph_exp ph_floor ph_logarithm ph_logarithmto ph_power ph_reciprocal at doc231 "15.6" "15.6. Powers and logarithms". +Document ph_arccosine ph_arcsine ph_arctangent ph_cosine ph_degrees ph_hyperbolicarccosine ph_hyperbolicarcsine ph_hyperbolicarctangent ph_hyperboliccosine ph_hyperbolicsine ph_hyperbolictangent ph_sine ph_tangent at doc232 "15.7" "15.7. Trigonometry". +Document PM_LPBuiltInKOV PM_LPEnumeration PM_LPNotKOV PM_NegationForbidden PM_NegationInternal at doc233 "15.8" "15.8. Units". +Document PM_DuplicateUnitSpec at doc234 "15.9" "15.9. Multiple notations". +Document PM_LPCantScaleTwice PM_LPCantScaleYet PM_LPTooLittleAccuracy at doc235 "15.10" "15.10. Scaling and equivalents". +Document PM_LPElementTooLarge PM_LPNotAllNamed PM_LPTooComplicated PM_LPTooManyElements PM_LPWithoutElement at doc239 "15.14" "15.14. Notations including more than one number". +Document PM_BadLPNameOption PM_BadLPPartOption PM_LPFirstOptional PM_LPMultipleOptional at doc240 "15.15" "15.15. The parts of a number specification". +Document PM_TotalEitherOr PM_TotalTableColumn ph_total at doc242 "15.17" "15.17. Totals". +Document EQUATIONS PM_EquationBadArithmetic PM_EquationBadTarget PM_EquationDimensionPower PM_EquationDoesntEquate PM_EquationEquatesBadly PM_EquationEquatesMultiply PM_EquationIncomparable PM_EquationInsoluble PM_EquationLeadingZero PM_EquationMisnamed PM_EquationMisnumbered PM_EquationMispunctuated PM_EquationOperatorUnrecognised PM_EquationSymbolBadSub PM_EquationSymbolEqualsKOV PM_EquationSymbolMalformed PM_EquationSymbolMisdeclared PM_EquationSymbolMissing PM_EquationSymbolNonNumeric PM_EquationSymbolNonValue PM_EquationSymbolSpurious PM_EquationSymbolVague PM_EquationSymbolWrongKOV PM_EquationTokenUnrecognised PM_EquationTooComplex ph_letequation at doc243 "15.18" "15.18. Equations". +Document ARITHMETIC PM_BadArithmetic PM_BadLPEquivalent PM_BadLPOffset PM_DimensionNotBaseKOV PM_DimensionRedundant PM_DimensionsInconsistent PM_MultiplyingNonKOVs PM_NonDimensional PM_UnitSequenceOverflow at doc245 "15.20" "15.20. Multiplication of units". +Document PM_TableCoincidesWithKind PM_TableColumnAlready PM_TableColumnArticle PM_TableColumnBrackets PM_TableColumnEmptyLists PM_TableDefiningObject PM_TableDescriptionEntry PM_TableEntryGeneric PM_TableIncompatibleEntry PM_TableKindlessColumn PM_TableMisnamed PM_TableNameAmbiguous PM_TableNameDuplicate PM_TableOfBuiltInKind PM_TableOfExistingKind PM_TableOfQuantifiedKind PM_TablePlayerEntry PM_TableRowFull PM_TableTooManyColumns PM_TableUndefined PM_TableUnknownEntry PM_TableVariableEntry PM_TableWithBlankNames PM_TableWithoutRows TABLES at doc246 "16.1" "16.1. Laying out tables". +Document ph_numrows at doc247 "16.2" "16.2. Looking up entries". +Document ph_showmetable phs_currenttablerow phs_tablecolumn phs_tablerow at doc249 "16.4" "16.4. Changing entries". +Document PM_NoRowSelected ph_chooserandomrow ph_chooserow ph_chooserowwith at doc250 "16.5" "16.5. Choosing rows". +Document ph_repeattable ph_repeattablecol ph_repeattablecolreverse ph_repeattablereverse at doc251 "16.6" "16.6. Repeating through tables". +Document ph_thereis ph_thereisno at doc252 "16.7" "16.7. Blank entries". +Document ph_blankout ph_blankoutcol ph_blankoutrow ph_blankouttable ph_chooseblankrow ph_numblank ph_numfilled at doc255 "16.10" "16.10. Adding and removing rows". +Document ph_sortcolumn ph_sortcolumnreverse ph_sortrandom at doc256 "16.11" "16.11. Sorting". +Document kind_tablename at doc260 "16.15" "16.15. Varying which table to look at". +Document PM_TableDefiningNothing PM_TableDefiningTheImpossible at doc261 "16.16" "16.16. Defining things with tables". +Document PM_TableNotContinuation at doc263 "16.18" "16.18. Table continuations". +Document PM_TableAmendmentMisfit PM_TableAmendmentMismatch at doc264 "16.19" "16.19. Table amendments". +Document PM_BizarreToken PM_ComplexUnderstand PM_LiteralPunctuation PM_NontextualUnderstand PM_NotNewCommand PM_NotOldCommand PM_ObsoleteHeldTokens PM_OldVerbUsage PM_OverComplexToken PM_TextTokenRestricted PM_TextlessMistake PM_UnderstandAsActivity PM_UnderstandAsBadValue PM_UnderstandAsCompoundText PM_UnderstandCommaCommand PM_UnderstandCommandWhen PM_UnderstandEmptyText PM_UnderstandMismatch PM_UnderstandVague PM_UnknownToken PM_UnparsableKind PM_UseTextNotTopic PM_UseThingNotObject UNDERSTANDING someone_token at doc265 "17.1" "17.1. Understand". +Document PM_GrammarIllFounded PM_ThreeValuedLine PM_TooManyAliases PM_TooManyGrammarLines at doc266 "17.2" "17.2. New commands for old grammar". +Document TOKENS things_token at doc268 "17.4" "17.4. Standard tokens of grammar". +Document text_token at doc269 "17.5" "17.5. The text token". +Document MAP PM_DescriptionsEquated PM_SameKindEquated kind_room at doc27 "3.2" "3.2. Rooms and the map". +Document var_understood at doc273 "17.9" "17.9. Understanding kinds of value". +Document PM_UnderstandAsQualified PM_UnderstandPluralValue at doc275 "17.11" "17.11. Understanding values". +Document PM_OverAmbitiousSlash PM_SlashedCommand at doc276 "17.12" "17.12. This/that". +Document NEWTOKENS PM_MixedOutcome PM_TwoValuedToken at doc277 "17.13" "17.13. New tokens". +Document PM_BadReferringProperty PM_BadUnderstandProperty PM_BadUnderstandPropertyAs PM_UnknownUnderstandProperty PM_UnknownUnpermittedProperty at doc279 "17.15" "17.15. Understanding things by their properties". +Document PM_GrammarBadRelation PM_GrammarObjectlessRelation PM_GrammarValueRelation at doc280 "17.16" "17.16. Understanding things by their relations". +Document PM_BadWhen at doc281 "17.17" "17.17. Context: understanding when". +Document ph_setpronouns at doc282 "17.18" "17.18. Changing the meaning of pronouns". +Document rules_dtpm at doc283 "17.19" "17.19. Does the player mean...". +Document ACTIVITIES PM_BadActivityName kind_activity at doc286 "18.1" "18.1. What are activities?". +Document PM_BadWhenWhile at doc289 "18.4" "18.4. While clauses". +Document PM_ExistingRegion PM_RegionInTwoRegions PM_RegionRelation REGIONS kind_region at doc29 "3.4" "3.4. Regions and the index map". +Document EXTACTIVITIES ph_carryout ph_carryoutwith ph_continueactivity at doc290 "18.5" "18.5. New activities". +Document PM_ActivityVarAnd PM_ActivityVarOverspecific PM_ActivityVarUnknownKOV PM_ActivityVarValue PM_ActivityVariableNameless at doc291 "18.6" "18.6. Activity variables". +Document ph_abandonactivity ph_abandonactivitywith ph_beginactivity ph_beginactivitywith ph_endactivity ph_endactivitywith ph_handlingactivity ph_handlingactivitywith at doc292 "18.7" "18.7. Beginning and ending activities manually". +Document act_con var_particular at doc294 "18.9" "18.9. Deciding the concealed possessions of something". +Document act_pn ph_omit at doc295 "18.10" "18.10. Printing the name of something". +Document act_ppn at doc296 "18.11" "18.11. Printing the plural name of something". +Document act_pan at doc297 "18.12" "18.12. Printing a number of something". +Document act_lc ph_group ph_groupart ph_grouptext at doc298 "18.13" "18.13. Listing contents of something". +Document act_gt at doc299 "18.14" "18.14. Grouping together something". +Document KINDS PM_BothRoomAndSupporter PM_CantContainAndSupport PM_KindsIncompatible PM_MiseEnAbyme at doc30 "3.5" "3.5. Kinds". +Document act_resp at doc300 "18.15" "18.15. Issuing the response text of something". +Document act_details at doc301 "18.16" "18.16. Printing room description details of something". +Document act_idetails at doc302 "18.17" "18.17. Printing inventory details of something". +Document act_toodark at doc303 "18.18" "18.18. Printing a refusal to act in the dark". +Document act_nowdark at doc304 "18.19" "18.19. Printing the announcement of darkness". +Document act_nowlight at doc305 "18.20" "18.20. Printing the announcement of light". +Document act_darkname at doc306 "18.21" "18.21. Printing the name of a dark room". +Document act_darkdesc at doc307 "18.22" "18.22. Printing the description of a dark room". +Document act_csl at doc308 "18.23" "18.23. Constructing the status line". +Document act_wpa at doc309 "18.24" "18.24. Writing a paragraph about". +Document act_lni at doc310 "18.25" "18.25. Listing nondescript items of something". +Document act_pld at doc311 "18.26" "18.26. Printing the locale description of something". +Document act_cnlo at doc312 "18.27" "18.27. Choosing notable locale objects for something". +Document act_plp at doc313 "18.28" "18.28. Printing a locale paragraph about". +Document act_ds ph_placecontentsinscope ph_placeinscope at doc314 "18.29" "18.29. Deciding the scope of something". +Document act_clarify at doc315 "18.30" "18.30. Clarifying the parser's choice of something". +Document act_which at doc316 "18.31" "18.31. Asking which do you mean". +Document act_smn at doc317 "18.32" "18.32. Supplying a missing noun/second noun". +Document act_reading kind_snippet ph_changecommand ph_cutsnippet ph_rejectcommand ph_replacesnippet ph_snippetdoesnotinclude ph_snippetdoesnotmatch ph_snippetincludes ph_snippetmatches var_command at doc318 "18.33" "18.33. Reading a command". +Document act_implicitly at doc319 "18.34" "18.34. Implicitly taking something". +Document PM_PropertyNotPermitted at doc32 "3.7" "3.7. Properties depend on kind". +Document act_parsererror at doc320 "18.35" "18.35. Printing a parser error". +Document act_all at doc321 "18.36" "18.36. Deciding whether all includes". +Document act_banner phs_banner at doc322 "18.37" "18.37. Printing the banner text". +Document act_obit at doc323 "18.38" "18.38. Printing the player's obituary". +Document act_amuse at doc324 "18.39" "18.39. Amusing a victorious player". +Document act_startvm at doc325 "18.40" "18.40. Starting the virtual machine". +Document PM_RulebookWithAt PM_RulebookWithDefinition PM_RulebookWithTo RULEBOOKS kind_rule kind_rulebook at doc326 "19.1" "19.1. On rules". +Document PM_BadRulePreamble PM_BadRulePreambleWhen PM_RuleWithDefiniteArticle PM_RuleWithoutColon at doc328 "19.3" "19.3. New rules". +Document PM_BadRulePlacementNegation PM_ImproperRulePlacement PM_NoSuchRuleExists PM_PlaceWithMissingRule PM_UnspecifiedRulebookPlacement RLISTING at doc329 "19.4" "19.4. Listing rules explicitly". +Document rules_proc at doc330 "19.5" "19.5. Changing the behaviour of rules". +Document NEWRULEBOOKS ph_follow at doc333 "19.8" "19.8. New rulebooks". +Document ph_followfor at doc334 "19.9" "19.9. Basis of a rulebook". +Document PM_RulebookVariableAnd PM_RulebookVariableBadKind PM_RulebookVariableTooSpecific PM_RulebookVariableVague at doc335 "19.10" "19.10. Rulebook variables". +Document PM_BadDefaultOutcome PM_DefaultOutcomeTwice ph_failed ph_fails ph_nodecision ph_succeeded ph_succeeds at doc336 "19.11" "19.11. Success and failure". +Document PM_BadOutcomeClarification PM_DefaultNamedOutcomeTwice PM_DefaultOutcomeAlready PM_DuplicateOutcome PM_MisplacedRulebookOutcome PM_NonOutcomeProperty PM_WrongEndToPhrase ph_rulebookoutcome at doc337 "19.12" "19.12. Named outcomes". +Document ph_producedby ph_producedbyfor ph_succeedswith at doc338 "19.13" "19.13. Rulebooks producing values". +Document ph_abide ph_abideanon ph_abidefor at doc339 "19.14" "19.14. Abide by". +Document PM_CantChangeEverywhere PM_EverywhereMisapplied PM_EverywhereNonBackdrop kind_backdrop at doc34 "3.9" "3.9. Backdrops". +Document rules_internal at doc340 "19.15" "19.15. Two rulebooks used internally". +Document ph_charnum ph_linenum ph_numchars ph_numlines ph_numparas ph_numpwords ph_numupwords ph_numwords ph_paranum ph_pwordnum ph_upwordnum ph_wordnum at doc344 "20.3" "20.3. Characters, words, punctuated words, unpunctuated words, lines, paragraphs". +Document ph_inlower ph_inupper ph_lowercase ph_sentencecase ph_titlecase ph_uppercase at doc345 "20.4" "20.4. Upper and lower case letters". +Document ph_exactlymatches ph_matches ph_nummatches at doc346 "20.5" "20.5. Matching and exactly matching". +Document ph_exactlymatchesre ph_matchesre ph_matchtext ph_nummatchesre ph_subexpressiontext at doc347 "20.6" "20.6. Regular expression matching". +Document ph_subform at doc348 "20.7" "20.7. Making new text with text substitutions". +Document ph_replace ph_replacechar ph_replaceline ph_replacepara ph_replacepword ph_replacepwordin ph_replacere ph_replaceupword ph_replaceword ph_replacewordin at doc349 "20.8" "20.8. Replacements". +Document kind_listof at doc351 "21.1" "21.1. Lists and entries". +Document PM_BadConstantListEntry PM_CantLetEmptyList PM_IncompatibleConstantListEntry PM_NonconstantConstantListEntry at doc352 "21.2" "21.2. Constant lists". +Document phs_listbraced phs_listdef phs_listindef at doc353 "21.3" "21.3. Saying lists of values". +Document ph_islistedin ph_isnotlistedin ph_repeatlist at doc354 "21.4" "21.4. Testing and iterating over lists". +Document ph_addatentry ph_addlistatentry ph_addlisttolist ph_addtolist ph_rementries ph_rementry ph_remfromlist ph_remlistfromlist at doc355 "21.5" "21.5. Building lists". +Document ph_altermultipleobjectlist ph_listofdesc ph_multipleobjectlist at doc356 "21.6" "21.6. Lists of objects". +Document ph_reverselist ph_rotatelist ph_rotatelistback ph_sortlist ph_sortlistproperty ph_sortlistpropertyreverse ph_sortlistrandom ph_sortlistreverse at doc358 "21.8" "21.8. Sorting, reversing and rotating lists". +Document ph_numberentries at doc359 "21.9" "21.9. Accessing entries in a list". +Document PM_TextWithoutSubject PM_TwoAppearances at doc36 "3.11" "3.11. Two descriptions of things". +Document ph_changelength ph_extend ph_truncate ph_truncatefirst ph_truncatelast at doc360 "21.10" "21.10. Lengthening or shortening a list". +Document kind_description ph_valuematch at doc363 "22.2" "22.2. Descriptions as values". +Document ph_applied0 ph_applied1 ph_applied2 ph_applied3 ph_apply0 ph_apply1 ph_apply2 ph_apply3 at doc364 "22.3" "22.3. Phrases as values". +Document ph_appliedlist ph_filter ph_reduction at doc366 "22.5" "22.5. Map, filter and reduce". +Document PM_BadMapCell PM_BothWaysDoor PM_DoorInThirdRoom PM_DoorOverconnected PM_DoorToNonRoom PM_DoorUnconnected PM_RoomMissingDoor kind_door ph_backside ph_directionofdoor ph_frontside ph_othersideof at doc37 "3.12" "3.12. Doors". +Document PM_UnknownVirtualMachine at doc374 "23.3" "23.3. Virtual machines and story file formats". +Document FIGURES kind_figurename at doc375 "23.4" "23.4. Gathering the figures". +Document PM_PictureDuplicate PM_PictureNotTextual at doc376 "23.5" "23.5. Declaring and previewing the figures". +Document ph_displayfigure at doc377 "23.6" "23.6. Displaying the figures". +Document SOUNDS kind_soundname at doc378 "23.7" "23.7. Recorded sounds". +Document PM_SoundDuplicate PM_SoundNotTextual ph_playsf at doc379 "23.8" "23.8. Declaring and playing back sounds". +Document ph_figureid ph_soundid at doc381 "23.10" "23.10. Some technicalities about figures and sounds". +Document EFILES at doc382 "23.11" "23.11. Files". +Document PM_BadFileIFID PM_BadFileOwner PM_FilenameDuplicate PM_FilenameNotTextual PM_FilenameUnsafe kind_externalfile at doc383 "23.12" "23.12. Declaring files". +Document ph_fileexists ph_readtable ph_writetable at doc384 "23.13" "23.13. Writing and reading tables to external files". +Document ph_appendtext ph_saytext ph_writetext at doc385 "23.14" "23.14. Writing, reading and appending text to files". +Document ph_fileready ph_markfilenotready ph_markfileready at doc386 "23.15" "23.15. Exchanging files with other programs". +Document kind_device at doc39 "3.14" "3.14. Devices and descriptions". +Document PM_BadEpisode at doc396 "25.2" "25.2. Bibliographic data". +Document LCARDS at doc398 "25.4" "25.4. The Library Card". +Document IFIDS at doc399 "25.5" "25.5. The Treaty of Babel and the IFID". Document PM_NoStartRoom PM_StartsOutsideRooms at doc4 "1.4" "1.4. The Go! button". -Document kind_device at doc40 "3.14" "3.14. Devices and descriptions". -Document IFIDS at doc400 "25.5" "25.5. The Treaty of Babel and the IFID". -Document PM_NoSuchPublicRelease release_files at doc401 "25.6" "25.6. The Release button and the Materials folder". -Document PM_ReleaseAlong at doc402 "25.7" "25.7. The Joy of Feelies". -Document release_cover at doc403 "25.8" "25.8. Cover art". -Document release_booklet release_postcard at doc404 "25.9" "25.9. An introductory booklet and postcard". -Document release_website at doc405 "25.10" "25.10. A website". -Document release_interpreter at doc406 "25.11" "25.11. A playable web page". -Document PM_RoomInIgnoredSource at doc410 "25.15" "25.15. Republishing existing works of IF". -Document release_solution at doc411 "25.16" "25.16. Walkthrough solutions". -Document release_card release_source at doc412 "25.17" "25.17. Releasing the source text". -Document MAPHINTS PM_MapBadRubric PM_MapDirectionClue PM_MapFromNonRoom PM_MapHintUnknown PM_MapLevelMisnamed PM_MapNonLateral PM_MapPlacement PM_MapPlacementDirection PM_MapSettingOfUnknown PM_MapSettingTooLong PM_MapSettingTypeFailed PM_MapSettingUnknown PM_MapToNonRoom PM_MapUnknownColour PM_MapUnknownOffset PM_MapUnknownOffsetBase at doc413 "25.18" "25.18. Improving the index map". -Document EPSMAP at doc414 "25.19" "25.19. Producing an EPS format map". -Document kind_vehicle at doc42 "3.16" "3.16. Vehicles and pushable things". -Document kind_person at doc43 "3.17" "3.17. Men, women and animals". -Document EXTENSIONS at doc430 "27.1" "27.1. The status of extensions". -Document SRULES at doc431 "27.2" "27.2. The Standard Rules". -Document PM_ExtBeginsAfterEndsHere PM_ExtEndsWithoutBegins PM_ExtMultipleBeginsHere PM_ExtMultipleEndsHere PM_ExtNoBeginsHere PM_ExtNoEndsHere at doc434 "27.5" "27.5. A simple example extension". -Document PM_ExtNoVersion PM_ExtVersionTooLow phs_compextcredits phs_extcredits at doc435 "27.6" "27.6. Version numbering". -Document PM_HeadingInPlaceOfUnincluded PM_HeadingInPlaceOfUnknown PM_UnequalHeadingInPlaceOf at doc438 "27.9" "27.9. Extensions can interact with other extensions". -Document PM_ImplicationCertain PM_ImplicationValueProperty at doc442 "27.13" "27.13. Implications". -Document PM_BadInlineExpansion PM_BadInlineTag PM_InlineRule PM_InlineTooLong PM_NonInlineBeginEnd PM_UnendingI6 at doc444 "27.15" "27.15. Defining phrases in Inform 6". -Document PM_BadObjectTranslation at doc450 "27.21" "27.21. Inform 6 objects and classes". -Document PM_NonPropertyTranslated PM_NonQuantityTranslated PM_QuantityTranslatedAlready PM_TranslatedToNonIdentifier PM_TranslatedTwice PM_TranslatedUnknownCategory PM_TranslatesActionAlready PM_TranslatesNonAction at doc451 "27.22" "27.22. Inform 6 variables, properties, actions, and attributes". -Document PM_GrammarTranslatedAlready at doc452 "27.23" "27.23. Inform 6 Understand tokens". -Document PM_UnicodeAlready PM_UnicodeNonLiteral PM_UnicodeOutOfRange at doc454 "27.25" "27.25. Naming Unicode characters". -Document PM_BadI6Inclusion PM_BeforeTheLibrary PM_NoSuchPart PM_NoSuchTemplate PM_WhenDefiningUnknown at doc455 "27.26" "27.26. The template layer". -Document PM_LabelNamespaceTooLong at doc458 "27.29" "27.29. Invocation labels, counters and storage". -Document kind_player's at doc47 "3.21" "3.21. The player's holdall". -Document PM_PartOfRoom PM_RoomOrDoorAsPart at doc49 "3.23" "3.23. Parts of things". -Document ph_locationof at doc51 "3.25" "3.25. The location of something". -Document PM_DirectionTooLong PM_ImproperlyMadeDirection PM_NamelessDirection PM_TooManyDirections kind_direction at doc52 "3.26" "3.26. Directions". -Document NEWKINDS at doc53 "4.1" "4.1. New kinds". -Document PM_PluralIsQuoted PM_PluralOfQuoted at doc56 "4.4" "4.4. Plural assertions". -Document KINDSVALUE at doc57 "4.5" "4.5. Kinds of value". -Document PM_ValueCantHaveProperties PM_ValueCantHaveVProperties at doc58 "4.6" "4.6. Properties again". -Document PM_EitherOrAsValue PM_MiscellaneousEOProblem PM_NonObjectCanBe PM_QualifiedCanBe PM_ThisIsEitherOr at doc59 "4.7" "4.7. New either/or properties". -Document PM_BadProvides PM_BadVisibilityWhen PM_PropertyCalledArticle PM_PropertyCalledPresence PM_PropertyKindClashes PM_PropertyKindUnknown PM_PropertyKindVague PM_PropertyNameForbidden PM_PropertyOfKind1 PM_PropertyTooSpecific PM_PropertyUninitialisable PM_RedundantThatVaries at doc60 "4.8" "4.8. New value properties". -Document PM_EitherOnThree at doc62 "4.10" "4.10. Conditions of things". -Document ph_defaultvalue at doc63 "4.11" "4.11. Default values of kinds". -Document PM_EmptyKind VARIABLES var_location at doc64 "4.12" "4.12. Values that vary". -Document PM_TooManyDuplicates at doc66 "4.14" "4.14. Duplicates". -Document PM_AssemblyLoop PM_AssemblyRegress PM_ComplexEvery at doc67 "4.15" "4.15. Assemblies and body parts". -Document PM_TSWithComma PM_TSWithPunctuation at doc70 "5.1" "5.1. Text with substitutions". -Document phs_apostrophe phs_bracket phs_closebracket phs_quotemark at doc71 "5.2" "5.2. How Inform reads quoted text". -Document phs_A phs_The phs_a phs_the phs_value at doc72 "5.3" "5.3. Text which names things". -Document phs_numwords phs_s at doc73 "5.4" "5.4. Text with numbers". -Document phs_Alistof phs_Thelistof phs_alistof phs_alistofconts phs_isalistof phs_islistof phs_isthelistof phs_listof phs_thelistof at doc74 "5.5" "5.5. Text with lists". -Document PM_SayEndIfWithoutSayIf PM_SayIfNested PM_SayOtherwiseWithoutIf phs_elseif phs_elseunless phs_endif phs_endunless phs_if phs_otherwise phs_unless at doc75 "5.6" "5.6. Text with variations". -Document PM_ComplicatedSayStructure PM_ComplicatedSayStructure2 PM_ComplicatedSayStructure3 PM_ComplicatedSayStructure4 PM_ComplicatedSayStructure5 phs_cycling phs_decreasing phs_firsttime phs_oneof phs_or phs_order phs_purelyrandom phs_random phs_sticky phs_stopping phs_thenpurelyrandom phs_thenrandom at doc76 "5.7" "5.7. Text with random alternatives". -Document ph_breakpending phs_clarifbreak phs_condparabreak phs_linebreak phs_nolinebreak phs_parabreak phs_runparaon phs_runparaonsls at doc77 "5.8" "5.8. Line breaks and paragraph breaks". -Document phs_bold phs_fixedspacing phs_italic phs_roman phs_varspacing at doc78 "5.9" "5.9. Text with type styles". -Document PM_MidTextUnicode PM_SayUnicode phs_unicode at doc80 "5.11" "5.11. Unicode characters". -Document ph_boxed at doc81 "5.12" "5.12. Displaying quotations". -Document DESCRIPTIONS ph_numberof at doc83 "6.1" "6.1. What are descriptions?". -Document PM_AdjDomainSlippery PM_AdjDomainSurreal PM_AdjDomainUnknown PM_ArticleAsAdjective PM_DefinitionBadCondition PM_DefinitionWithoutCondition at doc86 "6.4" "6.4. Defining new adjectives". -Document PM_ComparativeMisapplied PM_GradingCalled PM_GradingMisphrased PM_GradingNonLiteral PM_GradingUnknownProperty PM_GradingUnless PM_GradingWrongKOV PM_MultiwordGrading at doc89 "6.7" "6.7. Comparatives". -Document PM_OutOfPlay at doc92 "6.10" "6.10. Existence and there". -Document ph_bestroute ph_bestroutelength ph_bestroutethrough ph_bestroutethroughlength ph_doordirof ph_roomdirof ph_roomordoor at doc96 "6.14" "6.14. Adjacent rooms and routes through the map". -Document PM_ComplexDeterminer at doc97 "6.15" "6.15. All, each and every". -Document ACTIONS PM_APUnknown PM_APWithNoParticiple PM_NonActionIn kind_actionname at doc99 "7.1" "7.1. Actions". +Document PM_NoSuchPublicRelease release_files at doc400 "25.6" "25.6. The Release button and the Materials folder". +Document PM_ReleaseAlong at doc401 "25.7" "25.7. The Joy of Feelies". +Document release_cover at doc402 "25.8" "25.8. Cover art". +Document release_booklet release_postcard at doc403 "25.9" "25.9. An introductory booklet and postcard". +Document release_website at doc404 "25.10" "25.10. A website". +Document release_interpreter at doc405 "25.11" "25.11. A playable web page". +Document PM_RoomInIgnoredSource at doc409 "25.15" "25.15. Republishing existing works of IF". +Document kind_vehicle at doc41 "3.16" "3.16. Vehicles and pushable things". +Document release_solution at doc410 "25.16" "25.16. Walkthrough solutions". +Document release_card release_source at doc411 "25.17" "25.17. Releasing the source text". +Document MAPHINTS PM_MapBadRubric PM_MapDirectionClue PM_MapFromNonRoom PM_MapHintUnknown PM_MapLevelMisnamed PM_MapNonLateral PM_MapPlacement PM_MapPlacementDirection PM_MapSettingOfUnknown PM_MapSettingTooLong PM_MapSettingTypeFailed PM_MapSettingUnknown PM_MapToNonRoom PM_MapUnknownColour PM_MapUnknownOffset PM_MapUnknownOffsetBase at doc412 "25.18" "25.18. Improving the index map". +Document EPSMAP at doc413 "25.19" "25.19. Producing an EPS format map". +Document kind_person at doc42 "3.17" "3.17. Men, women and animals". +Document EXTENSIONS at doc429 "27.1" "27.1. The status of extensions". +Document SRULES at doc430 "27.2" "27.2. The Standard Rules". +Document PM_ExtBeginsAfterEndsHere PM_ExtEndsWithoutBegins PM_ExtMultipleBeginsHere PM_ExtMultipleEndsHere PM_ExtNoBeginsHere PM_ExtNoEndsHere at doc433 "27.5" "27.5. A simple example extension". +Document PM_ExtNoVersion PM_ExtVersionTooLow phs_compextcredits phs_extcredits at doc434 "27.6" "27.6. Version numbering". +Document PM_HeadingInPlaceOfUnincluded PM_HeadingInPlaceOfUnknown PM_UnequalHeadingInPlaceOf at doc437 "27.9" "27.9. Extensions can interact with other extensions". +Document PM_ImplicationCertain PM_ImplicationValueProperty at doc441 "27.13" "27.13. Implications". +Document PM_BadInlineExpansion PM_BadInlineTag PM_InlineRule PM_InlineTooLong PM_NonInlineBeginEnd PM_UnendingI6 at doc443 "27.15" "27.15. Defining phrases in Inform 6". +Document PM_BadObjectTranslation at doc449 "27.21" "27.21. Inform 6 objects and classes". +Document PM_NonPropertyTranslated PM_NonQuantityTranslated PM_QuantityTranslatedAlready PM_TranslatedToNonIdentifier PM_TranslatedTwice PM_TranslatedUnknownCategory PM_TranslatesActionAlready PM_TranslatesNonAction at doc450 "27.22" "27.22. Inform 6 variables, properties, actions, and attributes". +Document PM_GrammarTranslatedAlready at doc451 "27.23" "27.23. Inform 6 Understand tokens". +Document PM_UnicodeAlready PM_UnicodeNonLiteral PM_UnicodeOutOfRange at doc453 "27.25" "27.25. Naming Unicode characters". +Document PM_BadI6Inclusion PM_BeforeTheLibrary PM_NoSuchPart PM_NoSuchTemplate PM_WhenDefiningUnknown at doc454 "27.26" "27.26. The template layer". +Document PM_LabelNamespaceTooLong at doc457 "27.29" "27.29. Invocation labels, counters and storage". +Document kind_player's at doc46 "3.21" "3.21. The player's holdall". +Document PM_PartOfRoom PM_RoomOrDoorAsPart at doc48 "3.23" "3.23. Parts of things". +Document ph_locationof at doc50 "3.25" "3.25. The location of something". +Document PM_DirectionTooLong PM_ImproperlyMadeDirection PM_NamelessDirection PM_TooManyDirections kind_direction at doc51 "3.26" "3.26. Directions". +Document NEWKINDS at doc52 "4.1" "4.1. New kinds". +Document PM_PluralIsQuoted PM_PluralOfQuoted at doc55 "4.4" "4.4. Plural assertions". +Document KINDSVALUE at doc56 "4.5" "4.5. Kinds of value". +Document PM_ValueCantHaveProperties PM_ValueCantHaveVProperties at doc57 "4.6" "4.6. Properties again". +Document PM_EitherOrAsValue PM_MiscellaneousEOProblem PM_NonObjectCanBe PM_QualifiedCanBe PM_ThisIsEitherOr at doc58 "4.7" "4.7. New either/or properties". +Document PM_BadProvides PM_BadVisibilityWhen PM_PropertyCalledArticle PM_PropertyCalledPresence PM_PropertyKindClashes PM_PropertyKindUnknown PM_PropertyKindVague PM_PropertyNameForbidden PM_PropertyOfKind1 PM_PropertyTooSpecific PM_PropertyUninitialisable PM_RedundantThatVaries at doc59 "4.8" "4.8. New value properties". +Document PM_EitherOnThree at doc61 "4.10" "4.10. Conditions of things". +Document ph_defaultvalue at doc62 "4.11" "4.11. Default values of kinds". +Document PM_EmptyKind VARIABLES var_location at doc63 "4.12" "4.12. Values that vary". +Document PM_TooManyDuplicates at doc65 "4.14" "4.14. Duplicates". +Document PM_AssemblyLoop PM_AssemblyRegress PM_ComplexEvery at doc66 "4.15" "4.15. Assemblies and body parts". +Document PM_TSWithComma PM_TSWithPunctuation at doc69 "5.1" "5.1. Text with substitutions". +Document phs_apostrophe phs_bracket phs_closebracket phs_quotemark at doc70 "5.2" "5.2. How Inform reads quoted text". +Document phs_A phs_The phs_a phs_the phs_value at doc71 "5.3" "5.3. Text which names things". +Document phs_numwords phs_s at doc72 "5.4" "5.4. Text with numbers". +Document phs_Alistof phs_Thelistof phs_alistof phs_alistofconts phs_isalistof phs_islistof phs_isthelistof phs_listof phs_thelistof at doc73 "5.5" "5.5. Text with lists". +Document PM_SayEndIfWithoutSayIf PM_SayIfNested PM_SayOtherwiseWithoutIf phs_elseif phs_elseunless phs_endif phs_endunless phs_if phs_otherwise phs_unless at doc74 "5.6" "5.6. Text with variations". +Document PM_ComplicatedSayStructure PM_ComplicatedSayStructure2 PM_ComplicatedSayStructure3 PM_ComplicatedSayStructure4 PM_ComplicatedSayStructure5 phs_cycling phs_decreasing phs_firsttime phs_oneof phs_or phs_order phs_purelyrandom phs_random phs_sticky phs_stopping phs_thenpurelyrandom phs_thenrandom at doc75 "5.7" "5.7. Text with random alternatives". +Document ph_breakpending phs_clarifbreak phs_condparabreak phs_linebreak phs_nolinebreak phs_parabreak phs_runparaon phs_runparaonsls at doc76 "5.8" "5.8. Line breaks and paragraph breaks". +Document phs_bold phs_fixedspacing phs_italic phs_roman phs_varspacing at doc77 "5.9" "5.9. Text with type styles". +Document PM_MidTextUnicode PM_SayUnicode phs_unicode at doc79 "5.11" "5.11. Unicode characters". +Document ph_boxed at doc80 "5.12" "5.12. Displaying quotations". +Document DESCRIPTIONS ph_numberof at doc82 "6.1" "6.1. What are descriptions?". +Document PM_AdjDomainSlippery PM_AdjDomainSurreal PM_AdjDomainUnknown PM_ArticleAsAdjective PM_DefinitionBadCondition PM_DefinitionWithoutCondition at doc85 "6.4" "6.4. Defining new adjectives". +Document PM_ComparativeMisapplied PM_GradingCalled PM_GradingMisphrased PM_GradingNonLiteral PM_GradingUnknownProperty PM_GradingUnless PM_GradingWrongKOV PM_MultiwordGrading at doc88 "6.7" "6.7. Comparatives". +Document PM_OutOfPlay at doc91 "6.10" "6.10. Existence and there". +Document ph_bestroute ph_bestroutelength ph_bestroutethrough ph_bestroutethroughlength ph_doordirof ph_roomdirof ph_roomordoor at doc95 "6.14" "6.14. Adjacent rooms and routes through the map". +Document PM_ComplexDeterminer at doc96 "6.15" "6.15. All, each and every". +Document ACTIONS PM_APUnknown PM_APWithNoParticiple PM_NonActionIn kind_actionname at doc98 "7.1" "7.1. Actions". +Document rules_instead at doc99 "7.2" "7.2. Instead rules". [...and so on...] Use ineffectual translates as (- ! Use ineffectual does nothing. -). @@ -423,6 +423,7 @@ A region is a kind. [9] An object has a text called specification. An object has a text called indefinite appearance text. An object has a value called variable initial value. +An object has a text called list grouping key. An object has a text called printed name. An object has a text called printed plural name. @@ -736,6 +737,7 @@ The fixed in place property translates into I6 as "static". The transparent property translates into I6 as "transparent". The visited property translates into I6 as "visited". The marked for listing property translates into I6 as "workflag". +The list grouping key property translates into I6 as "list_together". The indefinite article property translates into I6 as "article". The carrying capacity property translates into I6 as "capacity". @@ -1295,9 +1297,9 @@ The list writer internal rule translates into I6 as "closed" (O), "closed and locked" (P), "containing" (Q), - " (on [if the noun is a person]whom[otherwise]which[end if] " (R), + "on [if the noun is a person]whom[otherwise]which[end if] " (R), ", on top of [if the noun is a person]whom[otherwise]which[end if] " (S), - " (in [if the noun is a person]whom[otherwise]which[end if] " (T), + "in [if the noun is a person]whom[otherwise]which[end if] " (T), ", inside [if the noun is a person]whom[otherwise]which[end if] " (U), "[regarding list writer internals][are]" (V), "[regarding list writer internals][are] nothing" (W), @@ -4949,19 +4951,22 @@ To group (OS - description of objects) together (documented at ph_group): (- objectloop({-my:1} provides list_together) if ({-matches-description:1:OS}) - {-my:1}.list_together = {-list-together:unarticled}; + BlkValueCopy({-my:1}.list_together, {-list-together:unarticled}); -). To group (OS - description of objects) together giving articles (documented at ph_groupart): (- objectloop({-my:1} provides list_together) if ({-matches-description:1:OS}) - {-my:1}.list_together = {-list-together:articled}; + BlkValueCopy({-my:1}.list_together, {-list-together:articled}); -). To group (OS - description of objects) together as (T - text) (documented at ph_grouptext): (- + {-my:2} = BlkValueCreate(TEXT_TY); + {-my:2} = TEXT_TY_SubstitutedForm({-my:2}, {-by-reference:T}); objectloop({-my:1} provides list_together) if ({-matches-description:1:OS}) - {-my:1}.list_together = {-by-reference:T}; + BlkValueCopy({-my:1}.list_together, {-my:2}); + BlkValueFree({-my:2}); -). To omit contents in listing (documented at ph_omit): diff --git a/retrospective/6L30/Extensions/Graham Nelson/Unicode Character Names.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x similarity index 100% rename from retrospective/6L30/Extensions/Graham Nelson/Unicode Character Names.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Unicode Character Names.i7x diff --git a/retrospective/6L30/Extensions/Graham Nelson/Unicode Full Character Names.i7x b/retrospective/6L38/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x similarity index 100% rename from retrospective/6L30/Extensions/Graham Nelson/Unicode Full Character Names.i7x rename to retrospective/6L38/Internal/Extensions/Graham Nelson/Unicode Full Character Names.i7x diff --git a/retrospective/6L30/Syntax.preform b/retrospective/6L38/Internal/Languages/English/Syntax.preform similarity index 99% rename from retrospective/6L30/Syntax.preform rename to retrospective/6L38/Internal/Languages/English/Syntax.preform index 13a43e242..34e6cf25e 100644 --- a/retrospective/6L30/Syntax.preform +++ b/retrospective/6L38/Internal/Languages/English/Syntax.preform @@ -1006,7 +1006,7 @@ language English bite bitten | blow blown | break broken | - browbeat browbeaten | + browbeat browbeaten | choose chosen | cleave cloven | come come | @@ -1014,13 +1014,13 @@ language English draw drawn | drink drunk | drive driven | - eat eaten | + eat eaten | fall fallen | - fly flown | + fly flown | forbear forborne | forbid forbidden | forego foregone | - foreknow foreknown | + foreknow foreknown | forelie forlain | forerun forerun | foresee foreseen | @@ -1028,57 +1028,57 @@ language English forgive forgiven | forgo forgone | forsake forsaken | - forswear forsworn | + forswear forsworn | freeze frozen | - ghostwrite ghostwritten | + ghostwrite ghostwritten | give given | - go gone | + go gone | grow grown | - hew hewn | + hew hewn | hide hidden | - interweave interwoven | + interweave interwoven | know known | lade laden | - misbecome misbecome | - misbeget misbegotten | - mischoose mischosen | + misbecome misbecome | + misbeget misbegotten | + mischoose mischosen | misdo misdone | misget misgotten | misgive misgiven | misknow misknown | - misshape misshapen | - misspeak misspoken | + misshape misshapen | + misspeak misspoken | mistake mistaken | - miswrite miswritten | - mow mown | + miswrite miswritten | + mow mown | outdo outdone | outgrow outgrown | outgrow outgrown | outrun outrun | - outshine outshone | - outswear outsworn | - outthrow outthrown | - overbear overborne | - overblow overblown | - overclothe overclad | - overcome overcome | + outshine outshone | + outswear outsworn | + outthrow outthrown | + overbear overborne | + overblow overblown | + overclothe overclad | + overcome overcome | overdo overdone | - overdraw overdrawn | - overdrink overdrunk | - overdrive overdriven | + overdraw overdrawn | + overdrink overdrunk | + overdrive overdriven | overeat overeaten | overfly overflown | - overgrow overgrown | + overgrow overgrown | overlie overlain | - override overridden | + override overridden | overrun overrun | oversee overseen | oversew oversewn | - overshake overshaken | - overstride overstridden | - overtake overtaken | - overwear overworn | - overwrite overwritten | + overshake overshaken | + overstride overstridden | + overtake overtaken | + overwear overworn | + overwrite overwritten | partake partaken | plead pled | redo redone | @@ -1093,10 +1093,10 @@ language English ring rung | rise risen | rive riven | - run run | - saw sawn | - see seen | - sew sewn | + run run | + saw sawn | + see seen | + sew sewn | shake shaken | shave shaven | shear shorn | @@ -1109,7 +1109,7 @@ language English sink sunk | slay slain | smite smitten | - sow sown | + sow sown | speak spoken | spin spun | spit spit | @@ -1127,19 +1127,19 @@ language English thrive thriven | throw thrown | tread trodden | - underbear underborne | + underbear underborne | underdo underdone | - underdraw underdrawn | + underdraw underdrawn | undergo undergone | - undergrow undergrown | - underrun underrun | - undertake undertaken | - underwrite underwritten | + undergrow undergrown | + underrun underrun | + undertake undertaken | + underwrite underwritten | undo undone | wake woken | wear worn | weave woven | - withdraw withdrawn | + withdraw withdrawn | wring wrung | write written @@ -1769,11 +1769,11 @@ language English ::= *c 0ked | *e 1ed | - *ey 0ed + *y 0ed ::= *e 1ed | - *y 1ied | + *y 1ied | * 0ed ::= diff --git a/retrospective/6L30/Extensions/Reserved/Languages/English/about.txt b/retrospective/6L38/Internal/Languages/English/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/English/about.txt rename to retrospective/6L38/Internal/Languages/English/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/English/flag.png b/retrospective/6L38/Internal/Languages/English/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/English/flag.png rename to retrospective/6L38/Internal/Languages/English/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/Languages/French/about.txt b/retrospective/6L38/Internal/Languages/French/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/French/about.txt rename to retrospective/6L38/Internal/Languages/French/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/French/flag.png b/retrospective/6L38/Internal/Languages/French/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/French/flag.png rename to retrospective/6L38/Internal/Languages/French/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/Languages/German/about.txt b/retrospective/6L38/Internal/Languages/German/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/German/about.txt rename to retrospective/6L38/Internal/Languages/German/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/German/flag.png b/retrospective/6L38/Internal/Languages/German/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/German/flag.png rename to retrospective/6L38/Internal/Languages/German/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Italian/about.txt b/retrospective/6L38/Internal/Languages/Italian/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Italian/about.txt rename to retrospective/6L38/Internal/Languages/Italian/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Italian/flag.png b/retrospective/6L38/Internal/Languages/Italian/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Italian/flag.png rename to retrospective/6L38/Internal/Languages/Italian/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Spanish/about.txt b/retrospective/6L38/Internal/Languages/Spanish/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Spanish/about.txt rename to retrospective/6L38/Internal/Languages/Spanish/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Spanish/flag.png b/retrospective/6L38/Internal/Languages/Spanish/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Spanish/flag.png rename to retrospective/6L38/Internal/Languages/Spanish/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Swedish/about.txt b/retrospective/6L38/Internal/Languages/Swedish/about.txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Swedish/about.txt rename to retrospective/6L38/Internal/Languages/Swedish/about.txt diff --git a/retrospective/6L30/Extensions/Reserved/Languages/Swedish/flag.png b/retrospective/6L38/Internal/Languages/Swedish/flag.png similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Languages/Swedish/flag.png rename to retrospective/6L38/Internal/Languages/Swedish/flag.png diff --git a/retrospective/6L30/Extensions/Reserved/CblorbModel.html b/retrospective/6L38/Internal/Miscellany/CblorbModel.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/CblorbModel.html rename to retrospective/6L38/Internal/Miscellany/CblorbModel.html diff --git a/retrospective/6L30/Extensions/Reserved/Cover.jpg b/retrospective/6L38/Internal/Miscellany/Cover.jpg similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Cover.jpg rename to retrospective/6L38/Internal/Miscellany/Cover.jpg diff --git a/retrospective/6L30/Extensions/Reserved/DefaultCover.jpg b/retrospective/6L38/Internal/Miscellany/DefaultCover.jpg similarity index 100% rename from retrospective/6L30/Extensions/Reserved/DefaultCover.jpg rename to retrospective/6L38/Internal/Miscellany/DefaultCover.jpg diff --git a/retrospective/6L30/Extensions/Reserved/ExtensionFileModel.html b/retrospective/6L38/Internal/Miscellany/ExtensionFileModel.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/ExtensionFileModel.html rename to retrospective/6L38/Internal/Miscellany/ExtensionFileModel.html diff --git a/retrospective/6L30/Extensions/Reserved/ExtensionsModel.html b/retrospective/6L38/Internal/Miscellany/ExtensionsModel.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/ExtensionsModel.html rename to retrospective/6L38/Internal/Miscellany/ExtensionsModel.html diff --git a/retrospective/6L30/Extensions/Reserved/IntroductionToIF.pdf b/retrospective/6L38/Internal/Miscellany/IntroductionToIF.pdf similarity index 100% rename from retrospective/6L30/Extensions/Reserved/IntroductionToIF.pdf rename to retrospective/6L38/Internal/Miscellany/IntroductionToIF.pdf diff --git a/retrospective/6L30/Extensions/Reserved/Postcard.pdf b/retrospective/6L38/Internal/Miscellany/Postcard.pdf similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Postcard.pdf rename to retrospective/6L38/Internal/Miscellany/Postcard.pdf diff --git a/retrospective/6L30/Extensions/Reserved/Small Cover.jpg b/retrospective/6L38/Internal/Miscellany/Small Cover.jpg similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Small Cover.jpg rename to retrospective/6L38/Internal/Miscellany/Small Cover.jpg diff --git a/retrospective/6L30/Extensions/Reserved/WinExtensionFileModel.html b/retrospective/6L38/Internal/Miscellany/WinExtensionFileModel.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/WinExtensionFileModel.html rename to retrospective/6L38/Internal/Miscellany/WinExtensionFileModel.html diff --git a/retrospective/6L30/Extensions/Reserved/WinExtensionsModel.html b/retrospective/6L38/Internal/Miscellany/WinExtensionsModel.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/WinExtensionsModel.html rename to retrospective/6L38/Internal/Miscellany/WinExtensionsModel.html diff --git a/retrospective/6L30/Extensions/Reserved/definitions.html b/retrospective/6L38/Internal/Miscellany/definitions.html similarity index 92% rename from retrospective/6L30/Extensions/Reserved/definitions.html rename to retrospective/6L38/Internal/Miscellany/definitions.html index 135a93c13..01a2361dd 100644 --- a/retrospective/6L30/Extensions/Reserved/definitions.html +++ b/retrospective/6L38/Internal/Miscellany/definitions.html @@ -1,2076 +1,8 @@ -*=ph_carryout=* - -

This phrase carries out the given activity, which must be one not applying to any value. Example:

- -

-carry out the assaying activity; -

- - -*=ph_carryoutwith=* - -

This phrase carries out the given activity, which must apply to a kind of value matching the one supplied. Example:

- -

-carry out the analysing activity with the pitchblende; -
carry out the announcing activity with the score; -

- - -*=ph_continueactivity=* - -

This phrase should be used only in rules in activity rulebooks. It causes the current rule to end, but without result, so that the activity continues rather than stopping as a result of the rule. This is useful for rulebooks (like the "for" rulebook of an activity) where the default is that a rule does stop the activity.

- -*=ph_writetext=* - -

This phrase makes the given text become the entire contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

- -

-write "Jackdaws love my big sphinx of quartz." to the file of Abecedary Wisdom; -

- - -*=ph_appendtext=* - -

This phrase adds the given text to the end of the current contents of the named file (creating it if it does not exist on disc). Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

- -

-append "Jinxed wizards pluck ivy from the big quilt." to the file of Abecedary Wisdom; -

- - -*=ph_saytext=* - -

This text expands to the contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

- -

-"[text of the File of Abecedary Wisdom]" -

- - -*=ph_rulebookoutcome=* - -

This phrase produces the (named) outcome of the phrase most recently followed. Example:

- -

-follow the audibility rules; -
if the outcome of the rulebook is the absolute silence outcome: -
    say "You could hear a pin drop in here." -

- - -*=ph_holder=* - -

This phrase produces the container, supporter, carrier, wearer or room in which the object resides.

- -*=ph_firstheld=* - -

This phrase produces the first of the list of things held by the object. Example:

- -

-first thing held by Baroness Orczy -

- - -*=ph_nextheld=* - -

This phrase produces the next item of the list of things held by something. Example: suppose Baroness Orczy is carrying a lapdog and a string of pearls.

- -

-next thing held after the lapdog -

- -

is then the string of pearls.

- -*=ph_requirestouch=* - -

This condition is true if the action being processed is one whose (first) noun is an object which needs to be touchable by the actor. For example, it's true for "taking", but false for "examining".

- -*=ph_requirestouch2=* - -

This condition is true if the action being processed is one whose second noun is an object which needs to be touchable by the actor. For example, it's true for "putting the brick in the sack", but false for "throwing the brick at the window".

- -*=ph_requirescarried=* - -

This condition is true if the action being processed is one whose (first) noun is an object which needs to be carried by the actor. For example, it's true for "dropping", but false for "taking".

- -*=ph_requirescarried2=* - -

This condition is true if the action being processed is one whose second noun is an object which needs to be carried by the actor.

- -*=ph_requireslight=* - -

This condition is true if the action being processed is one which can only be performed if the actor has light to see by. For example, it's true for "examining", but false for "dropping".

- -*=ph_writetable=* - -

This phrase causes the entire contents of the given table to be written out to the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

- -

-write File of Glaciation Data from the Table of Antarctic Reserves -

- -

Any blank rows in the table are automatically moved to the bottom, and only the non-blank rows are written.

- -*=ph_readtable=* - -

This phrase causes the entire contents of the given table to be read in from the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

- -

-read File of Glaciation Data into the Table of Antarctic Reserves -

- -

Any rows left spare at the foot of the table are automatically blanked. On the other hand if the file is too large to fit into the table - with too many columns or too many rows - a run-time problem is produced.

- -*=ph_fileexists=* - -

This condition is true if the file-system used by the player appears to contain a file with the right name. For example, if we declared:

- -

-The binary File of Glaciation Data is called "icedata". -

- -

and then tested

- -

-if the File of Glaciation Data exists, ... -

- -

then Inform would search for a file called "icedata". (The arrangements for where this might be stored, and its filename extension, vary from platform to platform.)

- -*=ph_randomdesc=* - -

This phrase makes a uniformly random choice from values satisfying the description given. Example:

- -

-a random visited room -
a random scene -

- -

A problem message is issued if the range is too large (for instance, "a random text"). Unexpected results may follow if no value fits the description, unless we are describing objects, in which case the result is the special value "nothing".

- -*=phs_oneof=* - -

This text substitution produces no text. It's used only for a side-effect: it switches between a number of alternative texts, which follow it and are divided by "[or]" substitutions, according to a strategy given in a closing substitution. Example:

- -

-"You flip the coin. [one of]Heads[or]Tails[purely at random]!" -

- -

Here there are just two alternatives, and the strategy is "purely at random". Exactly half of the time the text will be printed as "You flip the coin. Heads!"; and the other half, "You flip the coin. Tails!".

- -*=phs_or=* - -

This text substitution produces no text, and can be used only in a "[one of]..." construction. It divides alternative wordings. Example:

- -

-"You flip the coin. [one of]Heads[or]Tails[purely at random]!" -

- - -*=phs_purelyrandom=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen uniformly randomly.

- -*=phs_thenpurelyrandom=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, but that after that they are chosen uniformly randomly.

- -*=phs_random=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random except that the same choice cannot come up twice running. This is useful to avoid the deadening effect of repeating the exact same message. Example:

- -

-"The light changes randomly again; now it's [one of]green[or]amber[or]red[at random]." -

- -

Here we can safely say the light "changes", because the new colour cannot be the same as the one printed the last time.

- -*=phs_thenrandom=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, and then after that, at random except that the same choice cannot come up twice running. Example:

- -

-"Maybe the murderer is [one of]Colonel Mustard[or]Professor Plum[or]Cardinal Cerise[then at random]." -

- - -*=phs_sticky=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that a random choice is made the first time the text is printed, but that it sticks from there on. Example:

- -

-"The newspaper headline is: [one of]War Casualties[or]Terrorists[or]Banks[sticky random] [one of]Continue To Expand[or]Lose Out[sticky random]." -

- -

Although the newspaper headline will change with each playing, it will not alter during play.

- -*=phs_decreasing=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random, except that the first is most likely to be chosen, the second is next most likely, and so on down to the rarest at the end. Example:

- -

-"Zorro strides by, [one of]looking purposeful[or]grim-faced[or]deep in thought[or]suppressing a yawn[or]scratching his ribs[or]trying to conceal that he has cut himself shaving[as decreasingly likely outcomes]." -

- -

There are six outcomes here: the first is six times as likely as the last, and those in between are similarly scaled, so Zorro cuts himself shaving only once in 21 tries, while he looks purposeful almost a third of the time.

- -*=phs_order=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. A random order is chosen for the alternative passages of text, and they are used in that order as the text is printed again and again. When one random cycle finishes, a new one begins. The effect is somewhat like the "shuffle album" feature on an iPod. Example:

- -

-"You dip into the chapter on [one of]freshwater fish[or]hairless mammals[or]extinct birds[or]amphibians such as the black salamander[in random order]." -

- -

One small restriction: if there are more than 32 variations, purely random choices will be printed, and there will be no guarantee that repeats are prevented.

- -*=phs_cycling=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: after the last one is reached, we start again from the first. Example:

- -

-"The pundits discuss [one of]the weather[or]world events[or]celebrity gossip[cycling]." -

- - -*=phs_stopping=* - -

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: once the last one is reached, it's used forever after. Example:

- -

-"[one of]The phone rings[or]The phone rings a second time[or]The phone rings again[stopping]." -

- - -*=phs_firsttime=* - -

This pair of text substitutions causes whatever is between them to be printed only the first time the text is printed. Example:

- -

-"The screen door squeaks loudly as when you open it. [first time]Well, you'll get used to it eventually. [only]" -

- -

This is exactly equivalent to

- -

-"The screen door squeaks loudly as when you open it. [one of]Well, you'll get used to it eventually. [or][stopping]"; -

- -

but easier to read.

- -*=ph_shiftbefore=* - -

This phrase produces a time earlier by the amount given, keeping within the 24 hour clock. Example:

- -

-7 hours before 5:30 AM -

- -

produces 10:30 PM.

- -*=ph_shiftafter=* - -

This phrase produces a time later by the amount given, keeping within the 24 hour clock. Example:

- -

-9 hours after 11 AM -

- -

produces 8 PM.

- -*=ph_timebefore=* - -

This condition is true if the first time occurs earlier in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it.

- -*=ph_timeafter=* - -

This condition is true if the first time occurs later in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it.

- -*=phs_response=* - -

This text substitution writes out the current text of the given response.

- -*=ph_charnum=* - -

This phrase produces the Nth character from the text, counting from 1. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Example:

- -

-character number 8 in "numberless projects of social reform" -

- -

produces "e". If the index is less than 1 or more than the length of the text, the result is an empty text, "".

- -*=ph_numchars=* - -

This phrase produces the number of characters from the text. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Examples:

- -

-number of characters in "War and Peace" -
number of characters in "" -

- -

produce 13 and 0 respectively.

- -*=ph_wordnum=* - -

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

- -

-word number 3 in "ice-hot, don't you think?" -

- -

produces "don't". If the index is less than 1 or more than the number of words in the text, the result is an empty text, "".

- -*=ph_numwords=* - -

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

- -

-number of words in "ice-hot, don't you think?" -

- -

produces 5.

- -*=ph_pwordnum=* - -

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

- -

-punctuated word number 2 in "ice-hot, don't you think?" -

- -

produces "-". The punctuated words here are "ice", "-", "hot", ",", "don't", "you", "think", "?". If two or more punctuation marks are adjacent, they are counted as different words, except for runs of dashes or periods: thus ",," has two punctuated words, but "--" and "..." have only one each. If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

- -*=ph_numpwords=* - -

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

- -

-number of punctuated words in "ice-hot, don't you think?" -

- -

produces 8; see if you can find them all.

- -*=ph_upwordnum=* - -

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

- -

-unpunctuated word number 1 in "ice-hot, don't you think?" -

- -

produces "ice-hot,". The unpunctuated words in "ice-hot, don't you think?" are "ice-hot,", "don't", "you", "think?". If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

- -*=ph_numupwords=* - -

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

- -

-number of unpunctuated words in "ice-hot, don't you think?" -

- -

produces just 4.

- -*=ph_linenum=* - -

This phrase produces the Nth line from the text, counting from 1. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have.

- -*=ph_numlines=* - -

This phrase produces the number of lines in the text. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have. Example: the number of lines in

- -

-"Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)" -

- -

is 3.

- -*=ph_paranum=* - -

This phrase produces the Nth paragraph from the text, counting from 1.

- -*=ph_numparas=* - -

This phrase produces the number of paragraphs in the text. Example: the number of paragraphs in

- -

-"Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)" -

- -

is 2.

- -*=ph_plus=* - -

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

- -

-200 + 1 = 201 -
10:04 AM + two minutes = 10:06 AM -

- - -*=ph_minus=* - -

This phrase performs signed subtraction on the given values, whose kinds must agree, and produces the result. Examples:

- -

-200 - 1 = 199 -
10:04 AM - two minutes = 10:02 AM -

- - -*=ph_times=* - -

This phrase performs signed multiplication on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

- -

-201 times 3 = 603 -
two minutes times 4 = eight minutes -

- - -*=ph_divide=* - -

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

- -

-201 divided by 3 = 67 -
twenty minutes divided by 4 = five minutes -
twenty minutes divided by five minutes = 4 -

- -

Division rounds down to the nearest whole number. An attempt to divide a number by 0 will cause a run-time problem message; but an attempt to divide a real number by 0 will instead produce plus infinity or minus infinity.

- -*=ph_remainder=* - -

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and then produces the remainder. Examples:

- -

-remainder after dividing 201 by 5 = 1 -
remainder after dividing twenty minutes by 7 = six minutes -

- -

It is mathematically impossible to divide by 0, so any attempt to find the remainder after dividing a number by 0 will cause a run-time problem message. For a real number this won't arise and the remainder will usually be 0.0.

- -*=ph_nearest=* - -

This phrase rounds the given value off, rounding upward in boundary cases. Examples:

- -

-201 to the nearest 5 = 200 -
205 to the nearest 10 = 210 -
10:27 AM to the nearest five minutes = 10:25 AM -

- - -*=ph_squareroot=* - -

This phrase produces an approximate square root, to the nearest integer, of the given value, which must be of a kind which has square roots. Example:

- -

-square root of 16 = 4 -

- -

Trying to take the square root of a negative number will cause a run-time problem, because then we can't even nearly solve it.

- -*=ph_realsquareroot=* - -

This phrase produces a square root, as accurately as a real number can hold it, of the given value, which must be of a kind which has square roots. Example:

- -

-real square root of 2 = 1.41421 -

- -

The real square root of a negative number is nonexistent.

- -*=ph_cuberoot=* - -

This phrase produces an approximate cube root, to the nearest integer, of the given value, which must be of a kind which has cube roots. Example:

- -

-cube root of 27 = 3 -
cube root of -27 = -3 -

- - -*=ph_timefromnow=* - -

This phrase causes the given rule to be run at a given time offset from the current time of day. Example:

- -

-the egg-timer clucks in 18 minutes from now; -

- - -*=ph_turnsfromnow=* - -

This phrase causes the given rule to be run at a given number of turns after the current one. Example:

- -

-the egg-timer clucks in four turns from now; -

- - -*=ph_attime=* - -

This phrase causes the given rule to be run at a given time of day. Example:

- -

-the egg-timer clucks at 11:35 AM; -

- - -*=ph_succeeds=* - -

This causes the current rule to end immediately, with its outcome considered to be a success. That means the rulebook being worked through will also end, and also be a success.

- -*=ph_fails=* - -

This causes the current rule to end immediately, with its outcome considered to be a failure. That means the rulebook being worked through will also end, and also be a failure.

- -*=ph_nodecision=* - -

This causes the current rule to end immediately, but with no outcome. That means the rulebook being worked through will continue to run on, beginning with the next rule.

- -*=ph_succeeded=* - -

This condition is true if the most recently followed rule ended in success. Example:

- -

-follow the hypothetical clever rule; -
if rule succeeded: -
    ... -

- - -*=ph_failed=* - -

This condition is true if the most recently followed rule ended in failure. Example:

- -

-follow the hypothetical clever rule; -
if rule failed: -
    ... -

- -

Note that this is not the opposite of "rule succeeded", because there's a third possibility: that it ended with no outcome.

- -*=ph_now=* - -

This phrase makes the condition become true. Examples:

- -

-now the score is 100; -
now the player is Kevin; -
now the front door is open; -
now Mr Darcy is wearing the top hat; -
now all the doors are open; -
now all of the things in the sack are in the box; -

- -

Inform issues a problem message if the condition asks to do the impossible ("now 3 is an even number") or is vague ("now the duck is not in the Lily Pond") or not in the present tense ("now the front door had been open").

- -*=ph_defaultvalue=* - -

Produces the default value of the kind named. Examples:

- -

-The silver repeater is here. "You catch sight of a silver repeater watch, hands immobile at [default value of time]." -

- -

produces the output:

- -

-You catch sight of a silver repeater watch, hands immobile at 9:00 am. -

- -

because nine in the morning is the default time in Inform. If we have:

- -

-Brightness is a kind of value. The brightnesses are guttering, weak, radiant and blazing. -

- -

then "default value of brightness" is guttering, the first brightness created. When it comes to kinds of object, we sometimes have to be a little careful. For example,

- -

-default value of room -

- -

is always going to be fine (it's always the first room created in the source text). But

- -

-default value of vehicle -

- -

would produce a Problem message if there were no vehicles in the world.

- -*=ph_setpronouns=* - -

This phrase adjusts the meaning of pronouns like IT, HIM, HER and THEM in the command parser as if the object mentioned has become the subject of conversation. Example: the combination of

- -

-set pronouns from the key; -
set pronouns from Bunny; -

- -

might change IT to mean the silver key and HIM to mean Harry "Bunny" Manders, while leaving HER and THEM unaltered.

- -*=ph_repeattable=* - -

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from top to bottom. Blank rows are skipped. Example:

- -

-To list the succession: -
    say "The Succession List runs as follows..."; -
    repeat through the Table of Recent Monarchs: -
        say "[accession entry]: [name entry] ([family entry])." -

- - -*=ph_repeattablereverse=* - -

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from bottom to top. Blank rows are skipped.

- -*=ph_repeattablecol=* - -

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

- -

-repeat through the Table of Recent Monarchs in name order: ... -
repeat through the Table of Recent Monarchs in accession order: ... -

- -

work through the same table in rather different orders. The sequence is lower to higher (small numbers to high numbers, A to Z, and so on); insert "reverse" after "in" to reverse this.

- -*=ph_repeattablecolreverse=* - -

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

- -

-repeat through the Table of Recent Monarchs in reverse name order: ... -
repeat through the Table of Recent Monarchs in reverse accession order: ... -

- -

work through the same table in rather different orders. The sequence is higher to lower (high numbers to small numbers, Z to A, and so on); delete the "reverse" after "in" to reverse this.

- -*=ph_reverselist=* - -

This phrase puts the list in reverse order. The old entry 1 becomes the new last entry, and so on: reversing an empty list or a list containing only one entry leaves it unchanged. Example:

- -

-let L be {11, 12, 14, 15, 16, 17}; -
reverse L; -

- -

results in L being {17, 16, 15, 14, 12, 11}.

- -*=ph_sortlist=* - -

This phrase puts the list into ascending order. Example:

- -

-let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM}; -
sort L; -

- -

results in L being {9:01 AM, 11:13 AM, 4:21 PM, 6 PM}.

- -*=ph_sortlistreverse=* - -

This phrase puts the list into descending order. Example:

- -

-let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM}; -
sort L in reverse order; -

- -

results in L being {6 PM, 4:21 PM, 11:13 AM, 9:01 AM}.

- -*=ph_sortlistrandom=* - -

This phrase puts the list into a uniformly random order, shuffling it as if it were a pack of cards. Example:

- -

-let L be {1, 2, 3, 4, 5, 6}; -
sort L in random order; -

- -

might result in L being {3, 1, 5, 6, 4, 2}. Or any of 719 other arrangements, including being left as it was.

- -*=ph_sortlistproperty=* - -

This phrase puts the list into ascending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

- -

-let L be the list of people; -
sort L in carrying capacity order; -

- -

would arrange people with weaklings first, titans last.

- -*=ph_sortlistpropertyreverse=* - -

This phrase puts the list into descending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

- -

-let L be the list of people; -
sort L in reverse carrying capacity order; -

- -

would arrange people with titans first, weaklings last.

- -*=ph_rotatelist=* - -

This phrase shuffles the entries of the list forwards (to the right) by one place, so that the 1st becomes 2nd, the 2nd becomes 3rd, and so on until the last, which becomes the new first entry. Example:

- -

-let L be { "cow", "heifer", "bullock" }; -
rotate L; -

- -

results in L being { "bullock", "cow", "heifer" }.

- -*=ph_rotatelistback=* - -

This phrase shuffles the entries of the list backwards (to the left) by one place, so that the 3rd becomes 2nd, the 2nd becomes 1st, and so on; the previous 1st entry becomes the new last entry. Example:

- -

-let L be { "cow", "heifer", "bullock" }; -
rotate L backwards; -

- -

results in L being { "heifer", "bullock", "cow"}. (This achieves the same effect as "reverse L; rotate L; reverse L;" but is a little faster, and a lot less effort to read.)

- -*=ph_yes=* - -

This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition true.

- -*=ph_no=* - -

This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition false.

- -*=phs_unicode=* - -

This text substitution produces the Unicode character named (or numbered). Example:

- -

-"[unicode 321]odz Churchyard" -

- -

produces a Polish slashed L. If the Unicode Character Names or Unicode Full Character Names extensions are included, characters can also be named as well as numbered:

- -

-"[unicode Latin capital letter L with stroke]odz Churchyard" -

- - -*=ph_placeinscope=* - -

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the given object in scope, making it accessible to the player's commands, regardless of where it is in the model world. Examples:

- -

-place the distant volcano in scope; -
place the lacquered box in scope, but not its contents; -

- -

Ordinarily if something is placed in scope, then so are its parts and (in the case of a supporter or a transparent or open container) its contents; using the "but not its contents" option we can place just the box itself in scope.

- -*=ph_placecontentsinscope=* - -

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the things inside or on top of the given object in scope, making them accessible to the player's commands, but it does nothing to place the object itself in scope. (It might of course be in scope anyway, and if it is then this phrase won't remove it.) Example:

- -

-place the contents of the lacquered box in scope; -
place the contents of the Marbled Steps in scope; -

- -

Note that the object in question can be a room, as in this second example.

- -*=ph_figureid=* - -

This phrase produces the ID number used in the eventual Glulx file for the given figure.

- -*=ph_soundid=* - -

This phrase produces the ID number used in the eventual Glulx file for the given sound effect.

- -*=ph_let=* - -

This phrase creates a new temporary variable, starting it with the value supplied. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Examples:

- -

-let outer bull be 25; -
let the current appearance be "reddish brown"; -
let the special room be Marley Wood; -

- -

The kinds of these are deduced from the values given, so that, for instance,

- -

-say "The outer bull scores [the outer bull in words] when you practice archery in [special room]." -

- -

produces

- -

-The outer bull scores twenty-five when you practice archery in Marley Wood. -

- -

The variable name should be a new one; if it's the name of an existing one, then the kinds must agree. So:

- -

-let outer bull be 25; -
let outer bull be 50; -

- -

is a legal combination, because the second "let" simply changes the value of the existing "outer bull" variable to a different number.

- -*=ph_letdefault=* - -

This phrase creates a new temporary variable of the given kind. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

- -

-let inner bull be a number; -

- -

The variable created holding the default value for that kind - in this case, the number 0. A handful of very obscure kinds have no default values, and then a problem message is produced. Inform also disallows:

- -

-let the conveyance be a vehicle; -

- -

because temporary variables aren't allowed to have kinds more specific than "object". (This is a good thing: suppose there are no vehicles in the world?) It's quite safe in such cases to use

- -

-let the conveyance be an object; -

- -

instead, which creates it as the special object value "nothing".

- -*=phs_realplaces=* - -

This text substitution writes out the number to the given number of decimal places. Examples:

- -

-"The semicircle is roughly [pi to 3 decimal places] paces around." -

- -

produces "The semicircle is roughly 3.142 paces around." The number of places can only usefully be from 1 to 8. Note that, for example, "[1.235 x 10^-7 to 3 decimal places]" produces 0.0; "[1.235 x 10^8 to 3 decimal places]"...

- -*=phs_decimal=* - -

This text substitution writes out the number in decimal form, that is, avoiding "x 10^n" even for very large or very small quantities. For example,

- -

-"[1.23457 x 10^8 in decimal notation]" -

- -

produces 123457000.0 rather than 1.23457 x 10^8. This can look pretty extreme: for example, "[1.8986 x 10^27 in decimal notation]", the mass of the planet Jupiter in kilograms, produces 1898597440000000000000000000.0.

- -*=phs_decimalplaces=* - -

This text substitution writes out the number in decimal form, but rounding to the accuracy given.

- -*=phs_scientific=* - -

This text substitution writes out the number in scientific form, that is, using "x 10^n" even for easy-to-judge quantities. For example,

- -

-"[the reciprocal of 137 in scientific notation]" -

- -

produces 7.29927 x 10^-3 rather than 0.0073. This can look odd: for example, "[pi in scientific notation]" comes out as 3.14159 × 10^0 rather than 3.14159.

- -*=phs_scientificplaces=* - -

This text substitution writes out the number in scientific form, but rounding to the accuracy given.

- -*=ph_thereis=* - -

This condition is true if the entry referred to exists, that is, that is, the space for it in the table is not blank. Examples:

- -

-if there is a symbol corresponding to an atomic number of 30 in the Table of Standard Elements ... -
if there is an atomic number in row 2 of the Table of Standard Elements ... -

- - -*=ph_thereisno=* - -

This condition is true if the entry referred to does not exist, that is, the space for it in the table is blank. Examples:

- -

-if there is no symbol corresponding to an atomic number of 30 in the Table of Standard Elements ... -
if there is no atomic number in row 2 of the Table of Standard Elements ... -

- - -*=phs_bracket=* - -

This text substitution expands to a single open square bracket, avoiding the problem that a literal [ in text would look to Inform like the opening of a substitution. Example:

- -

-"He [bracket]Lord Astor[close bracket] would, wouldn't he?" -

- -

prints as "He [Lord Astor] would, wouldn't he?".

- -*=phs_closebracket=* - -

This text substitution expands to a single close square bracket, avoiding the problem that a literal ] in text would look to Inform like the closing of a substitution. Example:

- -

-"He [bracket]Lord Astor[close bracket] would, wouldn't he?" -

- -

prints as "He [Lord Astor] would, wouldn't he?".

- -*=phs_apostrophe=* - -

This text substitution expands to a single quotation mark, avoiding Inform's ordinary rule of converting literal single quotation marks to double at the edges of words. Example:

- -

-Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin[apostrophe] mister?'" -

- -

produces:

- -

-Lucy snaps, "What's the matter? You don't trust my cookin' mister?" -

- -

A more abbreviated form would be:

- -

-Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin['] mister?'" -

- -

which has exactly the same meaning.

- -*=phs_quotemark=* - -

This text substitution expands to a double quotation mark. Most of the time this is unnecessary because of Inform's rule of converting literal single quotation marks to double at the edges of words, so it's needed only if we want a double-quote in the middle of a word for some reason. Example:

- -

-"The compass reads 41o21'23[quotation mark]E." -

- -

which produces: The compass reads 41o21'23"E. (Note that ["] is not allowed; a double-quotation mark is never allowed inside double-quoted text, not even in a text substitution.)

- -*=ph_subform=* - -

This takes a text and makes substitution occur immediately. For example,

- -

-substituted form of "time of death, [time of day]" -

- -

produces something like "time of death, 9:15 AM" rather than "time of death, [time of day]". It's entirely legal to apply this to text which never had any substitutions in, so

- -

-substituted form of "balloon" -

- -

produces "balloon".

- -*=ph_if=* - -

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is true. (If the condition must contain a comma for some reason, the block form should be used.) Example:

- -

-if the red door is open, say "You could try going east?" -

- - -*=ph_unless=* - -

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is false. (If the condition must contain a comma for some reason, the block form should be used.) Example:

- -

-unless the red door is closed, say "You could try going east?" -

- - -*=ph_changelength=* - -

This phrase alters the given list so that it now has exactly the number of entries given. Example:

- -

-change L to have 21 entries; -

- -

If L previously had more than 21 entries, they are thrown away (and lost forever); if L previously had fewer, then new entries are created, using the default value for whatever kind of value L holds. So extending a list of numbers will pad it out with 0s, but extending a list of texts will pad it out with the empty text "", and so on.

- -*=ph_truncate=* - -

This phrase alters the given list so that it now has no more than the number of entries given. Example:

- -

-truncate L to 8 entries; -

- -

shortens L to length 8 if it is currently longer than that, trimming entries from the end, but would (for instance) leave a list of length 3 unchanged. Note that

- -

-truncate L to 0 entries; -

- -

empties it to { }, the list with nothing in.

- -*=ph_truncatefirst=* - -

This phrase alters the given list so that it now consists only of the initial part of the list with the given length. Example:

- -

-truncate L to the first 4 entries; -

- -

turns {1, 3, 5, 7, 9, 11} to {1, 3, 5, 7}.

- -*=ph_truncatelast=* - -

This phrase alters the given list so that it now consists only of the final part of the list with the given length. Example:

- -

-truncate L to the last 4 entries; -

- -

turns {1, 3, 5, 7, 9, 11} to {5, 7, 9, 11}.

- -*=ph_extend=* - -

This phrase pads out the list with default values as needed so that it now has at least the given length. (If the list is already at least that length, nothing is done.) Example:

- -

-extend L to 80 entries; -

- -

lengthens L to length 80 if it is currently shorter than that.

- -*=ph_matchesre=* - -

This condition is true if any contiguous part of the text can be matched against the given regular expression. Examples:

- -

-if "taramasalata" matches the regular expression "a.*l", ... -

- -

is true, since this looks for a part of "taramasalata" which begins with "a", continues with any number of characters, and finishes with "l"; so it matches "aramasal". (Not "asal", because it gets the makes the leftmost match it can.) The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

- -*=ph_exactlymatchesre=* - -

This condition is true if the whole text (starting from the beginning and finishing at the end) can be matched against the given regular expression. The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

- -*=ph_nummatchesre=* - -

This produces the number of times that contiguous pieces of the text can be matched against the regular expression, without allowing them to overlap.

- -*=ph_matchtext=* - -

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. Example:

- -

-if "taramasalata" matches the regular expression "m.*l": -
    say "[text matching regular expression]."; -

- -

says "masal."

- -*=ph_subexpressiontext=* - -

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. The number must be from 1 to 9, and must correspond to one of the bracketed groups in the expression just matched. Example: after

- -

-if "taramasalata" matches the regular expression "a(r.*l)a(.)": -

- -

the "text matching regular expression" is "aramasalat", the "text matching subexpression 1" is "ramasal", and "text matching subexpression 2" is "t".

- -*=ph_listofdesc=* - -

This phrase produces the list of all values matching the given description. Inform will issue a problem message if the result would be an infinite list, or one which is impractical to test: for instance "list of even numbers" is not feasible.

- -*=ph_multipleobjectlist=* - -

This phrase produces the current multiple object list as a value. The list will be the collection of objects found to match a plural noun like ALL in the most recent command typed by the player. If there is no multiple object, say if the command was TAKE PEAR, the list will be empty: it won't be a list of size 1.

- -*=ph_altermultipleobjectlist=* - -

This phrase sets the multiple object list to the given value. The list is ordinarily the collection of objects found to match a plural noun like ALL in the most recent command typed by the player, but using this phrase at the right moment (before the "generate action rule" in the turn sequence rules takes effect).

- -*=ph_appliedlist=* - -

This phrase takes the list, applies the phrase to each entry in the list, and forms a new list of the result. Example:

- -

-To decide what number is double (N - a number) (this is doubling): -
    decide on N plus N. -

- -

Then "doubling applied to 2" produces 4, by the simpler definition of "applied to", but also:

- -

-doubling applied to {2, 3, 4} -

- -

produces the list {4, 6, 8}.

- -*=ph_filter=* - -

This phrase produces a new list which is a thinner version of the one given, so that it contains only those values which match the description given. Example:

- -

-filter to even numbers of {3, 8, 4, 19, 7} -

- -

produces {8, 4}, with the values 3, 19, and 7 failing to make it through. A sufficiently fine filter may well thin out a list to a single entry, or even no entries at all, but the result is always a list.

- -*=ph_reduction=* - -

This phrase works through the list and accumulates the values in it, using the phrase supplied. Example: if we have

- -

-To decide what number is the sum of (N - number) and (M - number) -
    (this is summing): -
    decide on N + M. -

- -

then the summing reduction of {3, 8, 4, 19, 7} is the number 41, obtained by

- -

-(((3 + 8) + 4) + 19) + 7 -

- -

so that the summing phrase has been used four times.

- -*=ph_end=* - -

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is not considered final.

- -*=ph_endfinally=* - -

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is considered final, and any hidden menu options will be revealed.

- -*=ph_endsaying=* - -

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is not considered final. Example:

- -

-end the story saying "You have been stymied" -

- - -*=ph_endfinallysaying=* - -

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is considered final, and any hidden menu options will be revealed. Example:

- -

-end the story finally saying "You have defeated Sauron" -

- - -*=ph_ended=* - -

This condition is true if an end has been declared using one of the "end the story..." phrases.

- -*=ph_notended=* - -

This condition is true if no end has been declared using one of the "end the story..." phrases.

- -*=ph_finallyended=* - -

This condition is true if an end has been declared using one of the "end the story finally..." phrases, so that an ending has been reached which the author feels is a completion of the player's experience.

- -*=ph_notfinallyended=* - -

This condition is true if an end has been declared using one of the "end the story..." phrases, but not "finally", so the author feels that the player can get further experience by playing again and trying different approaches.

- -*=ph_resume=* - -

This phrase causes an ended story to resume exactly as if no "end the story..." phrase had been used. Example:

- -

-When play ends: -
    if the story has not ended finally: -
        say "Oh dear. Still, here's another chance."; -
        resume the story. -

- -

The phrase is likely to be sensible only as part of a "when play ends" rule. Other traditional uses include giving the player three lives, as in an old-school arcade machine.

- -*=ph_repeat=* - -

This phrase causes the block of phrases following it to be repeated once for each value in the given range, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

- -

-repeat with counter running from 1 to 10: -
    ... -

- -

This, and runs through the given phrases ten times. Within those phrases, a special value called "counter" has the value 1 the first time through, then the value 2, then 3 and so on up to 10. (It can of course be called whatever we like: this is only an example.) The range can be from any kind where ranges make sense - anything on which arithmetic can be done, so for instance

- -

-repeat with moment running from 4 PM to 4:07 PM: -
    ... -

- -

and also any enumeration:

- -

-Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. -

- - -

-... -
    repeat with hue running from orange to indigo: -
        ... -

- - -*=ph_playsf=* - -

This phrase causes the sound effect to be played. If the option "one time only" is used, it will have no effect if the sound effect has been played before. Example:

- -

-play the sound of rustling leaves; -

- - -*=ph_inlower=* - -

This condition is true if every character in the text is a lower case letter. Examples: this is true for "wax", but false for "wax seal" or "eZ mOnEy".

- -*=ph_inupper=* - -

This condition is true if every character in the text is in upper case. Examples: this is true for "BEESWAX", but false for "ROOM 101".

- -*=ph_lowercase=* - -

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

- -

-"a ticket to tromsø via østfold" -

- - -*=ph_uppercase=* - -

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

- -

-"A TICKET TO TROMSØ VIA ØSTFOLD" -

- - -*=ph_titlecase=* - -

This phrase produces a new version of the given text, but with casing of words changed to title casing: this capitalises the first letter of each word, and lowers the rest. Example: "a ticket to Tromsø via Østfold" becomes

- -

-"A Ticket To Tromsø Via Østfold" -

- - -*=ph_sentencecase=* - -

This phrase produces a new version of the given text, but with casing of words changed to sentence casing: this capitalises the first letter of each sentence and reduces the rest to lower case. Example: "a ticket to Tromsø via Østfold" becomes

- -

-"A ticket to tromsø via østfold" -

- - -*=ph_enumfirst=* - -

This phrase produces the first-created value of the given kind, which should be an enumeration. Example: if we have

- -

-Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. -

- -

then "first value of colour" is red.

- -*=ph_enumlast=* - -

This phrase produces the last-created value of the given kind, which should be an enumeration. Example: if we have

- -

-Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. -

- -

then "last value of colour" is violet.

- -*=ph_enumafter=* - -

This phrase produces the next-created value of the given kind, which should be an enumeration. Example: if we have

- -

-Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. -

- -

then "colour after orange" is yellow.

- -*=ph_enumbefore=* - -

This phrase produces the previous-created value of the given kind, which should be an enumeration. Example: if we have

- -

-Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. -

- -

then "colour before blue" is green.

- -*=ph_numrows=* - -

This phrase produces the number of rows (including any blank rows) in the given table. Example:

- -

-number of rows in the Table of Selected Elements -

- - -*=ph_numberof=* - -

This phrase counts the number of values matching the description, which may of course be 0. Example:

- -

-number of open doors -

- -

produces the number of doors, anywhere in the model world, which are currently open. A Problem message is produced if the number is potentially infinite, or impractical to count: for instance, Inform rejects "number of odd numbers".

- -*=phs_listbraced=* - -

This text substitution produces the list in the form of "{", then a comma-separated list, and then "}", which looks less like an English sentence but more mathematical. Example:

- -

-"[list of people in brace notation]" -

- -

might produce "{ yourself, Mr Darcy, Flashman }".

- -*=phs_listdef=* - -

This text substitution writes out the list in sentence form, adding the appropriate definite articles. Example:

- -

-let L be {the piano, the music stand}; -
say "[L with definite articles]"; -

- -

says "the piano and the music stand".

- -*=phs_listindef=* - -

This text substitution writes out the list in sentence form, adding the appropriate indefinite articles. Example:

- -

-let L be {the piano, the music stand}; -
say "[L with definite articles]"; -

- -

says "a piano and a music stand".

- -*=ph_scenetimesincebegan=* - -

This phrase produces the time since the named scene began, which only makes sense, of course, if it has indeed begun. Example:

- -

-time since Entire Game began -

- - -*=ph_scenetimesinceended=* - -

This phrase produces the time since the named scene ended, which only makes sense, of course, if it has indeed ended. Example:

- -

-time since Formal Dinner ended -

- - -*=ph_scenetimewhenbegan=* - -

This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene began.

- -*=ph_scenetimewhenended=* - -

This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene ended.

- -*=ph_snippetmatches=* - -

This condition is true if the given snippet exactly matches the specification. Example:

- -

-if the player's command matches "room [number]", ... -

- -

will be true if the command is ROOM 101, but not if it's EXPLORE ROOM 7.

- -*=ph_snippetdoesnotmatch=* - -

This condition is true if the given snippet does not exactly match the specification.

- -*=ph_snippetincludes=* - -

This condition is true if the given snippet includes words matching the specification, either at the beginning, in the middle, or at the end. Example:

- -

-if the player's command includes "room [number]", ... -

- -

will be true if the command is ROOM 101, EXPLORE ROOM 7, or ROOM 22 AHOY, but not if it's VISIT ROOM GAMMA 7.

- -*=ph_snippetdoesnotinclude=* - -

This condition is true if the given snippet does not include any run of words which matches the specification.

- -*=ph_rejectcommand=* - -

This phrase should be used only in rules for the "reading a command" activity. It tells Inform not to bother analysing the text further, but to go back to the keyboard. (No time passes; no turn elapses; nothing happens in the simulated world.)

- -*=ph_replacesnippet=* - -

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the snippet of command, usually the "matched text" found immediately before, with the given text. Example:

- -

-if the player's command includes "room [number]": -
    replace the matched text with "office". -

- - -*=ph_cutsnippet=* - -

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the snippet of command, usually the "matched text" found immediately before, with the given text. Example:

- -

-if the player's command includes "or else": -
    cut the matched text. -

- - -*=ph_changecommand=* - -

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the current command text entirely. Example:

- -

-After reading a command: -
    let T be "[the player's command]"; -
    replace the regular expression "\p" in T with ""; -
    change the text of the player's command to T. -

- -

This converts the player's command to text, which is then manipulated by searching for any punctuation mark and replacing it with blank text (that is, deleted), and then put back again as the new command.

- -*=ph_movebackdrop=* - -

This phrase moves the backdrop so that it is now present in every room matching the given description. Example: If we define

- -

-A room can be wet or dry. A room is usually dry. The Rock Pool is wet. -

- -

then we can write

- -

-move the stream backdrop to all wet rooms; -

- -

This phrasing, "move the ... backdrop to all ..." is deliberately meant to look unlike the simpler "move ... to ...", to emphasise that this kind of movement is possible only for backdrops.

- -*=ph_updatebackdrop=* - -

This phrase runs through all backdrops in the model world and makes sure they are correctly in, or not in, the current location, so that everything appears right from the player's point of view. Example:

- -

-The Upper Cave is above the Rock Pool. The Ledge is east of the Pool. The stream is a backdrop. -

- - -

-When play begins: -
    move the stream backdrop to all wet rooms. -

- - -

-A lever is in the Cave. The lever is fixed in place. -

- - -

-Instead of pulling the lever when the Cave is dry: -
    now the Cave is wet; -
    now the lever is in the Rock Pool; -
    now the lever is portable; -
    update backdrop positions; -
    say "The old rusty lever pulls away, and the thin cave wall goes with it, so that a stream bursts into the cave, falling to the pool below." -

- - -*=ph_showme=* - -

This phrase is intended for testing purposes only. If used in a story file running inside the Inform application, it prints a line of text showing the given value and its kind; in a Released story file, it does nothing at all. Example:

- -

-When play begins: showme 11. -

- -

produces

- -

-number: 11 -

- -

More usefully:

- -

-Every turn: showme the score. -

- -

Now, every turn, we get a line in the story's transcript like so:

- -

-"score" = number: 0 -

- -

Inform uses the quotation marks and equals sign to show that it had to do some work to find the answer. "score" wasn't a constant value - it was a variable, and Inform had to look up the current value.

- -*=ph_sortrandom=* - -

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, in a uniformly random order, and any blank rows at the bottom. Example:

- -

-sort the Table of Recent Monarchs in random order; -

- - -*=ph_sortcolumn=* - -

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has ascending order, and any blank rows at the bottom. Example:

- -

-sort the Table of Recent Monarchs in accession order; -

- -

Ascending order means 1 up to 10, say, or A up to Z, with blank values coming last.

- -*=ph_sortcolumnreverse=* - -

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has descending order, and any blank rows at the bottom. Example:

- -

-sort the Table of Recent Monarchs in reverse name order; -

- -

Descending order means 10 down to 1, say, or Z down to A, with blank values coming last.

- -*=ph_addtolist=* - -

This phrase adds the given value to the end of the list. Example:

- -

-let L be {60, 168}; -
add 360 to L; -

- -

results in L being {60, 168, 360}. Note that the value is added even if it already occurs somewhere in L; this can be avoided with "if absent". So:

- -

-add 168 to L, if absent; -

- -

would do nothing - it is already there.

- -*=ph_addlisttolist=* - -

This phrase adds the first list to the end of the second. Example:

- -

-let L be {2, 3, 5, 7}; -
add {11, 13, 17, 19} to L; -

- -

results in L being {2, 3, 5, 7, 11, 13, 17, 19}.

- -*=ph_addatentry=* - -

This phrase adds the given value so that it becomes the entry with that index number in the list. Example:

- -

-let L be {1, 2, 3, 4, 8, 24}; -
add 12 at entry 6 in L; -

- -

sets L to {1, 2, 3, 4, 8, 12, 24}. If there are N entries in L, then we can add at any of entries 1 up to N+1: adding at entry N+1 means adding at the end. The phrase option "if absent" makes the phrase do nothing if the value already exists anywhere in L.

- -*=ph_addlistatentry=* - -

This phrase adds the first list to the second so that it begins at the given position. Example:

- -

-let L be {1, 2, 3, 4}; -
add {4, 8, 12} at entry 3 in L; -

- -

results in L being {1, 2, 4, 8, 12, 3, 4}.

- -*=ph_remfromlist=* - -

This phrase removes every instance of the given value from the list. Example:

- -

-let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; -
remove 1 from L; -

- -

results in L being {3, 4, 5, 9, 2, 6, 5, 3}. Ordinarily "remove 7 from L" would produce a run-time problem, since L does not contain the value 7, but using the "if present" option lets us off this: the phrase then does nothing if L does not contain the value to be removed.

- -*=ph_remlistfromlist=* - -

This phrase removes every instance of any value in the first list from the second. Example:

- -

-let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; -
remove {0, 2, 4, 6, 8} from L; -

- -

results in L being {3, 1, 5, 9, 5, 3}. If both lists are large, this can be a slow process, and we might do better by sorting them and trying a more sophisticated method. But this is convenient for anything reasonable-sized.

- -*=ph_rementry=* - -

This phrase removes the entry at the given position, counting from 1 as the first entry. (Once it is removed, the other entries shuffle down.) Example:

- -

-let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; -
remove entry 3 from L; -

- -

results in L being {3, 1, 1, 5, 9, 2, 6, 5, 3}.

- -*=ph_rementries=* - -

This phrase removes the entries at the given range of positions, counting from 1 as the first entry. (Once they are removed, the other entries shuffle down.) Example:

- -

-let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; -
remove entries 3 to 6 from L; -

- -

results in L being {3, 1, 2, 6, 5, 3}.

- -*=phs_timewords=* - -

This text substitution produces the given time written out in English sentence form. For example:

- -

-"Through the glass you can see the reversed hands reading [the time of day in words]." -

- -

might produce

- -

-Through the glass you can see the reversed hands reading twenty to nine. -

- - -*=ph_move=* - -

This phrase moves the first-named object to the second. Example:

- -

-move the genie's lamp to Aladdin's Cave; -

- -

The first object named has to be a thing; the destination must be a room, as here, a container, a supporter, or a person. When something is moved, all its parts and contents (and all their contents, and so on) move with it. If the thing being moved is a person, then the destination is required to be a room or an enterable container. (In particular, a person cannot be carried by another person.)

-

Two options can be used if the object being moved is the player.

- -

-move the player to Aladdin's Cave, without printing a room description -

- -

omits the description which would otherwise be produced. A compromise is to use:

- -

-move the player to Aladdin's Cave, printing an abbreviated room description -

- -

which gives a full description if the player has never been here before, but only a brief one if it is a familiar scene. These options have no effect for any other objects being moved.

- -*=ph_follow=* - -

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such). Example:

- -

-follow the advance time rule; -
follow the appraisal rulebook; -

- - -*=ph_replacechar=* - -

This phrase acts on the named text by placing the given text in place of the Nth character, counting from 1. Example:

- -

-let V be "mope"; -
replace character number 3 in V with "lecul"; -
say V; -

- -

says "molecule".

- -*=ph_replaceword=* - -

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing or punctuation. Example:

- -

-let V be "Does the well run dry?"; -
replace word number 3 in V with "jogger"; -
say V; -

- -

says "Does the jogger run dry?".

- -*=ph_replacepword=* - -

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation runs as words in their own right. Example:

- -

-let V be "Frankly, yes, I agree."; -
replace punctuated word number 2 in V with ":"; -
say V; -

- -

says "Frankly: yes, I agree.".

- -*=ph_replaceupword=* - -

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation as part of a word just as if it were lettering. Example:

- -

-let V be "Frankly, yes, I agree."; -
replace unpunctuated word number 2 in V with "of course"; -
say V; -

- -

says "Frankly, of course I agree.".

- -*=ph_replaceline=* - -

This phrase acts on the named text by placing the given text in place of the Nth line, counting from 1. Lines are divided by paragraph or line breaks.

- -*=ph_replacepara=* - -

This phrase acts on the named text by placing the given text in place of the Nth paragraph, counting from 1.

- -*=ph_replace=* - -

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible. Example:

- -

-replace the text "a" in V with "z" -

- -

changes every lower-case "a" to "z": the same thing done with the "case insensitively" option would change each "a" or "A" to "z".

- -*=ph_replacewordin=* - -

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word. Example:

- -

-replace the word "Bob" in V with "Robert" -

- -

changes "Bob got on the Bobsleigh" to "Robert got on the Bobsleigh".

- -*=ph_replacepwordin=* - -

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word or run of punctuation.

- -*=ph_replacere=* - -

This phrase acts on the named text by matching the regular expression and replacing anything which fits it, as many non-overlapping times as possible. Example:

- -

-replace the regular expression "\d+" in V with "..." -

- -

changes "The Battle of Waterloo, 1815, rivalled Trafalgar, 1805" to "The Battle of Waterloo, ..., rivalled Trafalgar, ...". The "case insensitively" causes lower and upper case letters to be treated as if the same letter.

-

When replacing a regular expression, the replacement text also has a few special meanings (though, thankfully, many fewer than for the expression itself). Once again "\n" and "\t" can be used for line break and tab characters, and "\\" must be used for an actual backslash. But, very usefully, "\1" to "\9" expand as the contents of groups numbered 1 to 9, and "\0" to the exact text matched. So:

- -

-replace the regular expression "\d+" in V with "roughly \0" -

- -

adds the word "roughly" in front of any run of digits in V, because \0 becomes in turn whichever run of digits matched. And

- -

-replace the regular expression "(\w+) (.*)" in V with "\2, \1" -

- -

performs the transformation "Frank Booth" to "Booth, Frank".

-

Finally, prefixing the number by "l" or "u" forces the text it represents into lower or upper case, respectively. For instance:

- -

-replace the regular expression "\b(\w)(\w*)" in X with "\u1\l2"; -

- -

changes the casing of X to "title casing", where each individual word is capitalised. (This is a little slow on large texts, since so many matches and replacements are made: it's more efficient to use the official phrases for changing case.)

- -*=ph_roomdirof=* - -

This phrase produces the room which the given map direction leads to, or the special value "nothing" if it leads nowhere. If it leads to a door, the result is the room through that door. Examples:

- -

-say "You look north into [the room north from the Garden]." -
if the room north from the Garden is nothing, say "The grass leads nowhere." -

- - -*=ph_doordirof=* - -

This phrase produces the door which the given map direction leads to, or the special value "nothing" if it leads nowhere or to a room. Examples:

- -

-let the barrier be the door north from the Garden; -
if the barrier is a door, say "Well, [the barrier] is in the way."; -

- - -*=ph_roomordoor=* - -

This phrase produces the object which the given map direction leads to, which will always be either a room, a door or the special value "nothing". The phrase is used mainly by the Standard Rules, for technical reasons, and usually it's better to use "room ... from ..." or "door ... from ..." instead.

- -*=ph_bestroute=* - -

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms, or produces "nothing" if there is no way through at all. Example:

- -

-The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room]." -

- -

Best routes are ordinarily forbidden to go through doors, but if the suffix "using doors" is added as an option then any open or openable and unlocked door may be used on the way; and if "using even locked doors" is given, then any door at all will do. Since magnetism is no respecter of property, that seems right here:

- -

-The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room, using even locked doors]." -

- - -*=ph_bestroutethrough=* - -

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms which match the given description, or produces "nothing" if there is no way through at all. Example:

- -

-best route from the Drawbridge to the Keep through visited rooms -

- -

The condition - in this case, that "visited rooms" must be used - also applies to both ends of the journey, so if either Drawbridge or Keep are unvisited then this is "nothing". (Similarly, saying something like "...through containers" would mean there is never a route.)

- -*=ph_bestroutelength=* - -

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms. If A and B are the same, the answer is 0; if there is no route at all, the answer is -1. Example:

- -

-The description of the proximity gadget is "You are now [number of moves from the location to the Sundial] moves from the Sundial."; -

- - -*=ph_bestroutethroughlength=* - -

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms matching the given description. If A and B are the same, the answer is 0; if there is no route at all, or if either A or B fail to match the description themselves, the answer is -1.

- -*=ph_boxed=* - -

This phrase displays the given text on screen in an overlaid box. For reasons to do with the way such quotations are plotted onto the screen, their text is treated literally: no substitutions in square brackets are obeyed. The quotation will only ever appear once, regardless of the number of times the "display the boxed quotation ..." phrase is reached. Rather than being shown immediately - and thus, probably, scrolling away before it can be seen - the display is held back until the next command prompt is shown to the player. Example:

- -

-After looking in the Wabe, display the boxed quotation -
    "And 'the wabe' is the grass-plot round -
    a sun-dial, I suppose? said Alice, -
    surprised at her own ingenuity. -

- - -

-    Of course it is. It's called 'wabe,' -
    you know, because it goes a long way -
    before it, and a long way behind it -- -

- - -

-    -- Lewis Carroll". -

- -

This was the original example used in Trinity, by Brian Moriarty, which invented the idea. A player exploring Kensington Gardens comes upon a location enigmatically called The Wabe; and by way of explanation, this quotation pops up.

- -*=ph_matches=* - -

This condition is true if the second text occurs anywhere inside the first. Examples:

- -

-if "[score]" matches the text "3", ... -

- -

tests whether the digit 3 occurs anywhere in the score, as printed out; and

- -

-if the printed name of the location matches the text "the", ... -

- -

tests to see whether "the" can be found anywhere in the current room's name. Note that the location "Smotheringly Hot Jungle" would pass this test - it's there if you look. On the other hand, "The Orangery" would not, because "The" does not match against "the". We can get around this in a variety of ways, one of which is to tell Inform to be insensitive to the case (upper or lower) of letters:

- -

-if the printed name of the location matches the text "the", case insensitively: ... -

- - -*=ph_exactlymatches=* - -

This condition is true if the second text matches the first, starting at the beginning and finishing at the end. This appears to be the same as testing if one is equal to the other, but that's not quite true: for example,

- -

-if "[score]" exactly matches the text "[best score]", ... -

- -

is true if the score and best score currently print out as the same text, which will be true if they are currently equal as numbers; but

- -

-if "[score]" is "[best score]", ... -

- -

is never true - these are different texts, even if they sometimes look the same.

- -*=ph_nummatches=* - -

This produces the number of times the second text occurs within the first. The matches are not allowed to overlap. Example:

- -

-number of times "pell-mell sally" matches the text "ll" = 3 -
number of times "xyzzy" matches the text "Z" = 0 -
number of times "xyzzy" matches the text "Z", case insensitively = 2 -
number of times "aaaaaaaa" matches the text "aaaa" = 2 -

- - -*=ph_say=* - -

This phrase writes out the given text for the player to read. Normally it is simply shown on screen, not spoken aloud, unless software adapted for partially sighted people is being used.

- -*=ph_durationmins=* - -

This phrase converts numbers into lengths of time. Example:

- -

-15 minutes -

- -

Because it's a phrase, not just a notation for writing constants down, the number doesn't have to be given literally:

- -

-let X be 5; -
if the player is in the Slow Room, now X is 10; -
let deadline be the time of day plus X minutes; -

- -

Note that lengths of time can't exceed 1440 minutes.

- -*=ph_durationhours=* - -

This phrase converts numbers into lengths of time. Example:

- -

-10 hours -

- -

Note that lengths of time can't exceed 24 hours.

- -*=ph_changeexit=* - -

This phrase alters the map so that the given map connection is made. Note that connections can be made to rooms, but not doors: the positions of doors are fixed. Example:

- -

-change the east exit of the Closet to the Tsar's Imperial Dining Salon -

- -

Since "nothing" is not a room, this doesn't allow us to change the exit to nothing, so there is a separate definition of:

- -

-change the west exit of the Closet to nothing -

- - -*=ph_changenoexit=* - -

This phrase alters the map so that the given map connection is unmade. Example:

- -

-change the west exit of the Closet to nowhere -

- - -*=phs_bold=* - -

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in bold face. "[roman type]" should be used to switch back to normal. Example:

- -

-"Jane looked down. [bold type]Danger[roman type], the sign read." -

- - -*=phs_italic=* - -

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in italics. "[roman type]" should be used to switch back to normal. Example:

- -

-"This is [italic type]very suspicious[roman type], said Peter." -

- - -*=phs_roman=* - -

This text substitution produces no text. It's used only for a side-effect: to return to ordinary Roman type after a previous use of "[bold type]" or "[italic type]".

- -*=phs_fixedspacing=* - -

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear with fixed letter spacing. In variable letter spacing, a lower case "m" is much wider than an "l", which is natural to the eye since it has been printing practice since the Renaissance. Fixed letter spacing is more like typewriting, and it is best used to reproduce typewritten text or printed notices; it can also be convenient for making simple diagrams. Example:

- -

-"On the door is written: [fixed letter spacing]J45--O-O-O[variable letter spacing]." -

- - -*=phs_varspacing=* - -

This text substitution produces no text. It's used only for a side-effect: to return to ordinary letter spacing after a previous use of "[fixed letter spacing]".

- -*=phs_numwords=* - -

This text substitution writes out the number in English text. Example:

- -

-"You've been wandering around for [turn count in words] turns now." -

- -

might produce "You've been wandering around for two hundred and thirteen turns now." The "and" here is natural on one side of the Atlantic but not the other - so with the "Use American dialect." option in place, it disappears.

- -*=phs_s=* - -

This text substitution prints a letter "s" unless the last number printed was 1. Example:

- -

-"You've been wandering around for [turn count in words] turn[s] now." -

- -

produces "... for one turn now." or "... for two turns now." as appropriate. Note that it reacts only to numbers, not to other arithmetic values like times (or, for instance, weights from the "Metric Units" extension).

- *=ph_fileready=*

This condition is true if the file exists and is marked as being ready to read; that is, it is not in a state where another program is currently writing it. Example:

- -

+ +

if ready to read the file of Invariants, ...

@@ -2078,8 +10,8 @@ if ready to read the file of Invariants, ... *=ph_markfileready=*

This phrase marks that we have finished writing to the given file, so that any external program is welcome to read it now. Example:

- -

+ +

mark the file of Invariants as ready to read;

@@ -2087,168 +19,174 @@ mark the file of Invariants as ready to read; *=ph_markfilenotready=*

This phrase marks that we are about to start writing to the given file, so that any external program should wait until we're finished if it wants to read the file. Example:

- -

+ +

mark the file of Invariants as not ready to read;

-*=ph_ceiling=* +*=ph_succeedswith=* -

Produces the largest integer value greater than or equal to the one given. Examples:

- -

-ceiling of pi = 4.0 -
ceiling of -16.315 = -16.0 +

This phrase can only be used in a rule which produces a value, and the value given must be of the right kind. It causes the current rule to finish immediately, to succeed, and to produce the value given.

+ +*=ph_producedby=* + +

This phrase is used to follow the named rule, and to collect the resulting value.

+ +*=ph_producedbyfor=* + +

This phrase is used to follow the named rule based on the value given, and to collect the resulting value.

+ +*=ph_randombetween=* + +

This phrase produces a uniformly random value in the range given. Examples:

+ +

+a random number from 10 to 99 +
a random time from 2:31 PM to 2:57 PM

-

(Note that the result is still a real number; it simply has no fractional part any more.)

- -*=ph_floor=* - -

Produces the largest integer value less than or equal to the one given. Examples:

- -

-floor of pi = 3.0 -
floor of -16.315 = -17.0 +

If we make a new kind of value:

+ +

+A cloud pattern is a kind of value. The cloud patterns are cumulus, altocumulus, cumulonimbus, stratus, cirrus, nimbus, nimbostratus.

-

(Note that the result is still a real number; it simply has no fractional part any more.)

+

then we can also take random values from it:

+ +

+a random cloud pattern between stratus and nimbus +

+ +

which has three possible outcomes, all equally likely.

-*=ph_absolutevalue=* +*=ph_randomchance=* -

Removes the sign from a value, leaving positive numbers alone but making negative ones positive. Examples:

- -

-absolute value of 62.1 = 62.1 -
absolute value of 0 = 0.0 -
absolute value of -62.1 = 62.1 -
absolute value of minus infinity = plus infinity +

This condition is true X/Yths of the time, where X and Y are the numbers. Example:

+ +

+if a random chance of 2 in 3 succeeds, ... +

+ +

Here is a rule which applies only 15% of the time:

+ +

+Instead of waiting when a random chance of 15 in 100 succeeds: ...

-*=ph_reciprocal=* +*=ph_seed=* -

Calculates 1/x, that is, divides up 1 into this many pieces. Examples:

- -

-reciprocal of -2 = -0.5 -
reciprocal of 0.1 = 10.0 -
reciprocal of 7 = 0.14286 -
reciprocal of plus infinity = 0.0 +

This phrase changes the seed number as specified. Any random numbers generated after that depend only on the seed. Example: the following sentence will "fix" the process of generating these random numbers so that they are not random at all - the same sequence of random numbers will be produced on each run.

+ +

+When play begins, seed the random-number generator with 1234. +

+ +

The seed value "1234" can be anything positive; a different sequence of random numbers will be produced for each different seed value. A seed value of 0 restores the RNG to properly random behaviour again.

+ +*=ph_numberof=* + +

This phrase counts the number of values matching the description, which may of course be 0. Example:

+ +

+number of open doors +

+ +

produces the number of doors, anywhere in the model world, which are currently open. A Problem message is produced if the number is potentially infinite, or impractical to count: for instance, Inform rejects "number of odd numbers".

+ +*=ph_writetext=* + +

This phrase makes the given text become the entire contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

+ +

+write "Jackdaws love my big sphinx of quartz." to the file of Abecedary Wisdom;

-*=ph_power=* +*=ph_appendtext=* -

Computes x to the power y. Examples:

- -

-2 to the power 4 = 16.0 -
100 to the power 0.5 = 10.0 -
7 to the power -1 = 0.14286 -
pi to the power 0 = 1.0 -

- -

In the words of the Glulx specification document (section 2.12), "the special cases are breathtaking": if you need to know exactly what, say, "minus infinity to the power Y" will do for different cases of Y, refer to the detail of the "pow" opcode.

- -*=ph_exp=* - -

Computes e to the given power, where e is the base of natural logarithms. Examples:

- -

-exponential of 0 = 1.0 -
exponential of 1 = e = 2.7182818 -
exponential of -10 = 4.53999 x 10^-5 -
exponential of 10 = 22026.46484 -
exponential of logarithm of 7.12 = 7.12 +

This phrase adds the given text to the end of the current contents of the named file (creating it if it does not exist on disc). Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

+ +

+append "Jinxed wizards pluck ivy from the big quilt." to the file of Abecedary Wisdom;

-*=ph_logarithmto=* +*=ph_saytext=* -

Finds what power the base would have to be raised to in order to get this value. Examples:

- -

-logarithm to base 10 of 1000000 = 6.0 -
logarithm to base 10 of 350 = 2.54407 -
logarithm to base 2 of 256 = 8.0 -

- -

Logarithms of zero or negative numbers are nonexistent. Note that "logarithm to base 10 of ..." is what most calculators call simply "log", but Inform doesn't: it uses "log" for natural logarithms.

- -*=ph_logarithm=* - -

Finds what power e would have to be raised to in order to get this value. Examples:

- -

-logarithm of e = 1.0 -
logarithm of 1 = 0.0 -
logarithm of 1000 = 6.90776 -
logarithm of exponential of 7.12 = 7.12 -

- -

Logarithms of zero or negative numbers are nonexistent. This is the function which most calculators label as "ln", for "log natural", but in mathematical and scientific papers it's more often written "log", and Inform follows that convention.

- -*=phs_extcredits=* - -

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Extensions whose authors have chosen the "use authorial modesty" option are missed out. Example:

- -

-Standard Rules version 2/090402 by Graham Nelson +

This text expands to the contents of the named file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

+ +

+"[text of the File of Abecedary Wisdom]"

-*=phs_compextcredits=* +*=ph_beginactivity=* -

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Every extension is included, even those whose authors have opted for "use authorial modesty". Example:

- -

-Standard Rules version 2/090402 by Graham Nelson -
Locksmith version 9 by Emily Short +

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to nothing. Example:

+ +

+begin the assaying activity; +

+ +

In all cases a matching "end the ... activity" or else "abandon the ... activity" phrase must be reached.

+ +*=ph_beginactivitywith=* + +

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to a value of a matching kind. Example:

+ +

+begin the analysing activity with the pitchblende; +

+ +

In all cases a matching "end the ... activity with ..." or else "abandon the ... activity with..." phrase must be reached.

+ +*=ph_endactivity=* + +

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to nothing. Example:

+ +

+end the assaying activity; +

+ +

This must only happen to match an earlier "begin the ... activity" phrase.

+ +*=ph_endactivitywith=* + +

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to a value of a matching kind. Example:

+ +

+end the analysing activity with the pitchblende; +

+ +

This must only happen to match an earlier "begin the ... activity with..." phrase.

+ +*=ph_handlingactivity=* + +

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The activity must be one which doesn't apply to any value.)

+ +*=ph_handlingactivitywith=* + +

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The given value must be the one it is being applied to.)

+ +*=ph_abandonactivity=* + +

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

+ +

+abandon the assaying activity;

-*=ph_showmetable=* +*=ph_abandonactivitywith=* -

This phrase prints a crude but sometimes useful display on screen of the current contents of the named table. It's intended for authors to see when testing, not for players to see.

- -*=phs_currenttablerow=* - -

This text substitution produces a crude but sometimes useful listing of the entries in the currently chosen table row.

- -*=phs_tablerow=* - -

This text substitution produces a crude but sometimes useful listing of the entries in the specified row.

- -*=phs_tablecolumn=* - -

This text substitution produces a crude but sometimes useful listing of the entries in the specified column.

- -*=ph_runthrough=* - -

This phrase causes the block of phrases following it to be repeated once for each value matching the description, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

- -

-repeat with item running through open containers: -
    ... +

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

+ +

+abandon the analysing activity with the pitchblende;

-

If there are no containers, or they are all closed, the phrases will not be followed at all. Inform will issue a Problem message if the range of the loop may be infinite: for example, it won't allow:

- -

-repeat with X running through odd numbers: -
    ... -

- -

On the other hand it will allow:

- -

-repeat with T running through times: -
    ... -

- -

which repeats 1440 times, starting with T at midnight and finishing at 11:59 PM. See the Kinds index for which kinds of value can be repeated through.

*=phs_adapt=* @@ -2292,329 +230,497 @@ repeat with T running through times: *=phs_prespart=* -

Produces the present participle of the given verb. For example, "[past participle of the verb carry]" is "carried". Warning: because modal verbs like "should" or "might" are defective in English, this will produce odd results on them - "shoulding" and "mighting", for example.

+

Produces the present participle of the given verb. For example, "[present participle of the verb carry]" is "carrying". Warning: because modal verbs like "should" or "might" are defective in English, this will produce odd results on them - "shoulding" and "mighting", for example.

-*=ph_followfor=* +*=ph_move=* -

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such), and applies it to the value given, which must be of a matching kind. Example:

- -

-follow the reaching inside rulebook for the electrified cage; +

This phrase moves the first-named object to the second. Example:

+ +

+move the genie's lamp to Aladdin's Cave; +

+ +

The first object named has to be a thing; the destination must be a room, as here, a container, a supporter, or a person. When something is moved, all its parts and contents (and all their contents, and so on) move with it. If the thing being moved is a person, then the destination is required to be a room or an enterable container. (In particular, a person cannot be carried by another person.)

+

Two options can be used if the object being moved is the player.

+ +

+move the player to Aladdin's Cave, without printing a room description +

+ +

omits the description which would otherwise be produced. A compromise is to use:

+ +

+move the player to Aladdin's Cave, printing an abbreviated room description +

+ +

which gives a full description if the player has never been here before, but only a brief one if it is a familiar scene. These options have no effect for any other objects being moved.

+ +*=ph_remove=* + +

Removes the given object from play, so that it is not present in any room. We are not permitted to remove rooms, or doors, or the player, from play; but we are permitted to remove backdrops, making them disappear from all rooms in which they are present. Example:

+ +

+remove the gold coin from play;

-*=ph_try=* +*=phs_linebreak=* -

This phrase makes the action, which has to be named literally, take effect now. Example:

- -

-Instead of entering the trapdoor, try going up. +

This text substitution produces a line break. Example:

+ +

+"There is an endless sense of[line break]falling and[line break]falling."

-

It's as if the player had typed GO UP as a command. Note that the action has to be specific:

- -

-try eating something; +

Line breaks are not paragraph breaks, so the result is:

+ +

+There is an endless sense of +
falling and +
falling.

-

is not allowed, since it doesn't say exactly what is to be eaten.

+

with no extra vertical spacing between these lines.

-*=ph_trysilently=* +*=phs_nolinebreak=* -

This phrase makes the action, which has to be named literally, take effect now, under the "silent" convention which means that routine messages aren't printed. Example:

- -

-try silently taking the napkin; +

This text substitution produces no text. It's used only for a side-effect: it prevents a line break where Inform might otherwise assume one. Example:

+ +

+"The chorus sing [one of]Jerusalem[or]Rule, Britannia![no line break][at random]."

-

Silence is maintained only if this new action, the taking of the napkin, is successful (so if the napkin is successfully taken, the text "Taken." will not appear): if the action should fail, a suitable objection will be voiced as usual.

- -*=ph_actionof=* - -

This phrase produces a literally typed action as a value. Example:

- -

-now the best idea yet is the action of pushing the button; +

Here the "[no line break]" stops Inform from thinking that the exclamation mark means a sentence ending - it's part of the name of the song "Rule, Britannia!". So we get

+ +

+The chorus sing Rule, Britannia!.

-

The action must be specific in every respect, so "action of taking something" or "action of doing something" will not work - "taking something" is really a general description of many possible actions, not an action in its own right.

+

with no line break between the "!" and ".".

-*=ph_currentaction=* +*=phs_runparaon=* -

This phrase produces the action currently being processed as a value - it literally stores the action, and remembers, if necessary, the exact wording of the player's command at the time it was stored - so that even actions arising from commands like LOOK UP X100 IN THE CODE BOOK can be stored faithfully. Examples:

- -

-let the present whim be the current action; -
say "How you would like to be [current action]."; +

This text substitution produces no text. It's used only for a side-effect: it prevents a paragraph break occurring after the present text is printed, in case Inform might be tempted to place one there. Example:

+ +

+Before taking something, say "Very well. [run paragraph on]".

-

This only makes sense if an action is currently going on, so it shouldn't be used in "every turn" rules, for instance.

- -*=ph_trystored=* - -

This phrase makes the stored action take effect now. Example:

- -

-try the present whim; +

This allows the reply to, say, TAKE ENVELOPE to be

+ +

+Very well. Taken.

-

If the present whim contains, say, the action of taking the beach ball, then the effect is exactly the same as "try taking the beach ball". The stored action isn't destroyed or otherwise used up in the process, so it can be tried again another time, as often as we like.

- -*=ph_trystoredsilently=* - -

This phrase makes the stored action take effect now, under the "silent" convention which means that routine messages aren't printed. Example:

- -

-silently try the present whim; +

rather than

+ +

+Very well.

-

If the present whim contains, say, the action of taking the beach ball, and the action succeeds, nothing is printed, but if something goes awry then a message is printed to say why. Either way, the effect is exactly the same as "try silently taking the beach ball".

+ +

+Taken. +

+ +

which is how texts produced by different rules would normally be shown. (It's a traditional printer's term. See Oldfield's Manual of Typography, 1892, under "When two paragraphs are required to be made into one, or, in technical language, 'to run on'.")

-*=ph_actionpart=* +*=phs_parabreak=* -

This phrase produces the action name part of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

- -

-action name part of the current action = throwing it at action +

This text substitution produces a paragraph break. Example:

+ +

+"This is not right.[paragraph break]No, something is terribly wrong." +

+ +

Paragraph breaks have a little vertical spacing in them, unlike mere line breaks, so the result is:

+ +

+This is not right. +

+ + +

+No, something is terribly wrong.

-*=ph_nounpart=* +*=phs_condparabreak=* -

This phrase produces the (first) noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

- -

-noun part of the current action = the brick +

This text substitution either produces a paragraph break, or no text at all. It marks a place where Inform can put a paragraph break if necessary; in effect it simulates what Inform does every time a "before" or similar rule finishes. If there is text already printed, and text then follows on, a paragraph break is made. But if not, nothing is done. This is sometimes useful when producing a large amount of text which changes with the circumstances so that it is hard to predict in advance whether a paragraph break is needed or not.

+ +*=ph_breakpending=* + +

This condition is true if text has recently been said in such a way that Inform expects to add a paragraph break at the next opportunity (for instance when the present rule ends and another one says something, or when a "[conditional paragraph break]" is made).

+ +*=phs_clarifbreak=* + +

This text substitution produces a line break, and then also a paragraph break if the text immediately following is a room description brought about by having gone to to a different room and looking around, in which case a line break should be added. In traditional IF, this is used when clarifying what Inform thinks the player intended by a given command. Example:

+ +

+say "(first opening [the noun])[command clarification break]";

-

If the noun is something other than an object, this produces just "nothing", the non-object.

- -*=ph_secondpart=* - -

This phrase produces the second noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

- -

-second noun part of the current action = Biggles -

- -

If the second noun is something other than an object (for instance for the command SET DIAL TO 3417 it would be the number 3417), this produces just "nothing", the non-object.

- -*=ph_actorpart=* - -

This phrase produces the person who would be carrying out the action if it were being tried. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

- -

-actor part of the current action = Algy +

might result in

+ +

+(first opening the valise) +
You rummage through the valise for tickets, but find nothing.

-*=ph_involves=* +*=phs_runparaonsls=* -

This condition is true if the object appears as any of the actor, the noun or the second noun in the action. Example:

- -

-if the current action involves Algy +

This text substitution produces no text. It's used only for a side-effect: it indicates that the current printing position does not follow a skipped line, and that further material is expected which will run on from the previous paragraph, but that if no further material turns up then a skipped line would be needed before the next command prompt. (It's very likely that only the Standard Rules will ever need this.)

+ +*=ph_minspart=* + +

This phrase converts a time to a number, then takes the result mod 60, which in effect produces the number of minutes after the hours are thrown away. Example:

+ +

+minutes part of 12:41 PM

-

would be true for "give revolver to Algy", "Algy trying flying the Sopwith Camel", "examine Algy" and so on, but false for "ask Raymond about secret airfield".

+

produces 41.

-*=ph_beginactivity=* +*=ph_hourspart=* -

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to nothing. Example:

- -

-begin the assaying activity; +

This phrase converts a time to a number, then divides the result by 60, which in effect produces the number of hours after minutes are thrown away. Example:

+ +

+hours part of 8:21 AM

-

In all cases a matching "end the ... activity" or else "abandon the ... activity" phrase must be reached.

+

produces 8.

-*=ph_beginactivitywith=* +*=phs_unicode=* -

This phrase causes the named activity to become active, and runs its "before" rulebook. The activity must be one which applies to a value of a matching kind. Example:

- -

-begin the analysing activity with the pitchblende; +

This text substitution produces the Unicode character named (or numbered). Example:

+ +

+"[unicode 321]odz Churchyard"

-

In all cases a matching "end the ... activity with ..." or else "abandon the ... activity with..." phrase must be reached.

- -*=ph_endactivity=* - -

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to nothing. Example:

- -

-end the assaying activity; -

- -

This must only happen to match an earlier "begin the ... activity" phrase.

- -*=ph_endactivitywith=* - -

This phrase runs the "after" rulebook of the activity and then causes it to become inactive. The activity must be one which applies to a value of a matching kind. Example:

- -

-end the analysing activity with the pitchblende; -

- -

This must only happen to match an earlier "begin the ... activity with..." phrase.

- -*=ph_handlingactivity=* - -

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The activity must be one which doesn't apply to any value.)

- -*=ph_handlingactivitywith=* - -

This should be used only where the given activity has been started with "begin ..." and will be finished with "end ...". It runs the "for" rules for the activity, and then comes out true if none of those for rules intervened in the handling of that activity. (The given value must be the one it is being applied to.)

- -*=ph_abandonactivity=* - -

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

- -

-abandon the assaying activity; +

produces a Polish slashed L. If the Unicode Character Names or Unicode Full Character Names extensions are included, characters can also be named as well as numbered:

+ +

+"[unicode Latin capital letter L with stroke]odz Churchyard"

-*=ph_abandonactivitywith=* +*=ph_inlower=* -

This phrase ends an activity at once (without consulting any further rulebooks, including its "after" rulebook). It can only be used with an activity which has had its "begin" but not yet its "end" phrase; it is a drastic remedy best taken only if it is clear that circumstances have changed so that the activity now seems inappropriate. It must not be used during one of the rules for the activity: it can only be used between the begin and for stages, or between the for and end stages.

- -

-abandon the analysing activity with the pitchblende; +

This condition is true if every character in the text is a lower case letter. Examples: this is true for "wax", but false for "wax seal" or "eZ mOnEy".

+ +*=ph_inupper=* + +

This condition is true if every character in the text is in upper case. Examples: this is true for "BEESWAX", but false for "ROOM 101".

+ +*=ph_lowercase=* + +

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

+ +

+"a ticket to tromsø via østfold"

-*=ph_decideon=* +*=ph_uppercase=* -

This phrase can only be used in the body of a definition of a phrase to decide a value. It causes the calculation to end immediately, with the outcome being the given value, which must be of the kind expected. Example:

- -

-To decide which number is double (N - a number): -
    let D be N times N; -
    decide on D. +

This phrase produces a new version of the given text, but with all upper case letters reduced to lower case. Example: "a ticket to Tromsø via Østfold" becomes

+ +

+"A TICKET TO TROMSØ VIA ØSTFOLD" +

+ + +*=ph_titlecase=* + +

This phrase produces a new version of the given text, but with casing of words changed to title casing: this capitalises the first letter of each word, and lowers the rest. Example: "a ticket to Tromsø via Østfold" becomes

+ +

+"A Ticket To Tromsø Via Østfold" +

+ + +*=ph_sentencecase=* + +

This phrase produces a new version of the given text, but with casing of words changed to sentence casing: this capitalises the first letter of each sentence and reduces the rest to lower case. Example: "a ticket to Tromsø via Østfold" becomes

+ +

+"A ticket to tromsø via østfold" +

+ + +*=ph_ceiling=* + +

Produces the largest integer value greater than or equal to the one given. Examples:

+ +

+ceiling of pi = 4.0 +
ceiling of -16.315 = -16.0 +

+ +

(Note that the result is still a real number; it simply has no fractional part any more.)

+ +*=ph_floor=* + +

Produces the largest integer value less than or equal to the one given. Examples:

+ +

+floor of pi = 3.0 +
floor of -16.315 = -17.0 +

+ +

(Note that the result is still a real number; it simply has no fractional part any more.)

+ +*=ph_absolutevalue=* + +

Removes the sign from a value, leaving positive numbers alone but making negative ones positive. Examples:

+ +

+absolute value of 62.1 = 62.1 +
absolute value of 0 = 0.0 +
absolute value of -62.1 = 62.1 +
absolute value of minus infinity = plus infinity +

+ + +*=ph_reciprocal=* + +

Calculates 1/x, that is, divides up 1 into this many pieces. Examples:

+ +

+reciprocal of -2 = -0.5 +
reciprocal of 0.1 = 10.0 +
reciprocal of 7 = 0.14286 +
reciprocal of plus infinity = 0.0 +

+ + +*=ph_power=* + +

Computes x to the power y. Examples:

+ +

+2 to the power 4 = 16.0 +
100 to the power 0.5 = 10.0 +
7 to the power -1 = 0.14286 +
pi to the power 0 = 1.0 +

+ +

In the words of the Glulx specification document (section 2.12), "the special cases are breathtaking": if you need to know exactly what, say, "minus infinity to the power Y" will do for different cases of Y, refer to the detail of the "pow" opcode.

+ +*=ph_exp=* + +

Computes e to the given power, where e is the base of natural logarithms. Examples:

+ +

+exponential of 0 = 1.0 +
exponential of 1 = e = 2.7182818 +
exponential of -10 = 4.53999 x 10^-5 +
exponential of 10 = 22026.46484 +
exponential of logarithm of 7.12 = 7.12 +

+ + +*=ph_logarithmto=* + +

Finds what power the base would have to be raised to in order to get this value. Examples:

+ +

+logarithm to base 10 of 1000000 = 6.0 +
logarithm to base 10 of 350 = 2.54407 +
logarithm to base 2 of 256 = 8.0 +

+ +

Logarithms of zero or negative numbers are nonexistent. Note that "logarithm to base 10 of ..." is what most calculators call simply "log", but Inform doesn't: it uses "log" for natural logarithms.

+ +*=ph_logarithm=* + +

Finds what power e would have to be raised to in order to get this value. Examples:

+ +

+logarithm of e = 1.0 +
logarithm of 1 = 0.0 +
logarithm of 1000 = 6.90776 +
logarithm of exponential of 7.12 = 7.12 +

+ +

Logarithms of zero or negative numbers are nonexistent. This is the function which most calculators label as "ln", for "log natural", but in mathematical and scientific papers it's more often written "log", and Inform follows that convention.

+ +*=phs_banner=* + +

This text substitution expands to the banner text giving bibliographic details of the current story file, rather like the opening credits of a movie, or the title page of a book.

+ +*=ph_snippetmatches=* + +

This condition is true if the given snippet exactly matches the specification. Example:

+ +

+if the player's command matches "room [number]", ... +

+ +

will be true if the command is ROOM 101, but not if it's EXPLORE ROOM 7.

+ +*=ph_snippetdoesnotmatch=* + +

This condition is true if the given snippet does not exactly match the specification.

+ +*=ph_snippetincludes=* + +

This condition is true if the given snippet includes words matching the specification, either at the beginning, in the middle, or at the end. Example:

+ +

+if the player's command includes "room [number]", ... +

+ +

will be true if the command is ROOM 101, EXPLORE ROOM 7, or ROOM 22 AHOY, but not if it's VISIT ROOM GAMMA 7.

+ +*=ph_snippetdoesnotinclude=* + +

This condition is true if the given snippet does not include any run of words which matches the specification.

+ +*=ph_rejectcommand=* + +

This phrase should be used only in rules for the "reading a command" activity. It tells Inform not to bother analysing the text further, but to go back to the keyboard. (No time passes; no turn elapses; nothing happens in the simulated world.)

+ +*=ph_replacesnippet=* + +

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the snippet of command, usually the "matched text" found immediately before, with the given text. Example:

+ +

+if the player's command includes "room [number]": +
    replace the matched text with "office". +

+ + +*=ph_cutsnippet=* + +

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the snippet of command, usually the "matched text" found immediately before, with the given text. Example:

+ +

+if the player's command includes "or else": +
    cut the matched text. +

+ + +*=ph_changecommand=* + +

This phrase should be used only in "after" rules for the "reading a command" activity; it replaces the current command text entirely. Example:

+ +

+After reading a command: +
    let T be "[the player's command]"; +
    replace the regular expression "\p" in T with ""; +
    change the text of the player's command to T. +

+ +

This converts the player's command to text, which is then manipulated by searching for any punctuation mark and replacing it with blank text (that is, deleted), and then put back again as the new command.

+ +*=ph_rulebookoutcome=* + +

This phrase produces the (named) outcome of the phrase most recently followed. Example:

+ +

+follow the audibility rules; +
if the outcome of the rulebook is the absolute silence outcome: +
    say "You could hear a pin drop in here."

*=ph_nothing=*

This phrase does nothing at all. It is very occasionally useful to make a rule which does nothing:

- -

+ +

This is the largely ineffective rule:
    do nothing.

-*=ph_total=* +*=ph_increase=* -

This phrase produces the total of some property held by all of the values matching the description. A problem message is produced if the values in question can't have that property ("the total carrying capacity of scenes"), or if it holds a kind of value which can't meaningfully be added up ("the total description of open doors"). Example:

- -

-total carrying capacity of people in the Deep Pool +

This phrases increases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

+ +

+increase the score by 8; +
increase the time of day by 5 minutes;

-*=phs_listof=* +*=ph_decrease=* -

This text substitution produces a list, in sentence form, of everything matching the description. Example:

- -

-"Mr Darcy glares proudly at you. He is wearing [list of things worn by Darcy] and carrying [list of things carried by Darcy]." -

- -

And, if this were from a dramatisation of the novel by Miss Fielding rather than Miss Austen, we might find:

- -

-Mr Darcy glares proudly at you. He is wearing a pair of Newcastle United boxer shorts and carrying a self-help book. -

- -

If the description matches nothing - for instance, if Darcy has empty hands - then "nothing" is printed.

- -*=phs_alistof=* - -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article. Example:

- -

-a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary +

This phrases decreases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

+ +

+decrease the score by 6; +
decrease the carrying capacity of the player by 10;

-*=phs_Alistof=* +*=ph_increment=* -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article, and the first is capitalised, so that it can be used at the beginning of a sentence. Example:

- -

-A maritime bill of lading, some hemp rope and Falconer's Naval Dictionary +

This phrases increases the variable, table entry, list entry, or property by 1. Example:

+ +

+increment the score;

-*=phs_thelistof=* +*=ph_decrement=* -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article. Example:

- -

-the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

This phrases decreases the variable, table entry, list entry, or property by 1. Example:

+ +

+decrement the score;

-*=phs_Thelistof=* +*=ph_appliedlist=* -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article, and the first is capitalised, so that it can be used at the beginning of a sentence. Example:

- -

-The maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

This phrase takes the list, applies the phrase to each entry in the list, and forms a new list of the result. Example:

+ +

+To decide what number is double (N - a number) (this is doubling): +
    decide on N plus N.

- -*=phs_islistof=* - -

This text substitution produces a list, in sentence form, of everything matching the description. The whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

- -

-is marlin-spike -
are maritime bill of lading, hemp rope and Falconer's Naval Dictionary +

Then "doubling applied to 2" produces 4, by the simpler definition of "applied to", but also:

+ +

+doubling applied to {2, 3, 4}

+

produces the list {4, 6, 8}.

-*=phs_isalistof=* +*=ph_filter=* -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

- -

-is a marlin-spike -
are a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary +

This phrase produces a new list which is a thinner version of the one given, so that it contains only those values which match the description given. Example:

+ +

+filter to even numbers of {3, 8, 4, 19, 7}

+

produces {8, 4}, with the values 3, 19, and 7 failing to make it through. A sufficiently fine filter may well thin out a list to a single entry, or even no entries at all, but the result is always a list.

-*=phs_isthelistof=* +*=ph_reduction=* -

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

- -

-is the marlin-spike -
are the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

This phrase works through the list and accumulates the values in it, using the phrase supplied. Example: if we have

+ +

+To decide what number is the sum of (N - number) and (M - number) +
    (this is summing): +
    decide on N + M.

- -*=phs_alistofconts=* - -

This text substitution produces a list, in sentence form, of everything matching the description, noting any contents in brackets. This is really intended only to be used by the Standard Rules.

- -*=ph_valuematch=* - -

This condition is true if the value matches the description; the kinds must be compatible, or Inform will issue a problem message. There is no point using this for cases where the description is given explicitly:

- -

-if 4 matches even numbers, ... +

then the summing reduction of {3, 8, 4, 19, 7} is the number 41, obtained by

+ +

+(((3 + 8) + 4) + 19) + 7

-

because it is easier to write just:

- -

-if 4 is an even number, ... -

- -

So this condition is only useful when the description is stored in some variable, and its identity is not known.

+

so that the summing phrase has been used four times.

*=ph_nextstep=* @@ -2636,172 +742,508 @@ number of steps via the overlooking relation from the Folly to the Chinese Lake

The result is 0 if the two endpoints are the same, or -1 if no route exists.

-*=ph_stop=* +*=ph_thereis=* -

This phrase causes the current rule to end immediately. It is most often used in the definition of other phrases:

- -

-To judge the score: -
    if the score is 0, stop; -
    say "The score is [score in words] more than it was a half-hour ago." +

This condition is true if the entry referred to exists, that is, that is, the space for it in the table is not blank. Examples:

+ +

+if there is a symbol corresponding to an atomic number of 30 in the Table of Standard Elements ... +
if there is an atomic number in row 2 of the Table of Standard Elements ...

-

In the case when the score is 0, the "stop" ends the phrase immediately, so that the subsequent text is printed only if the score is not 0.

-

"Stop" can also be used in action rules, though this is not very good style - it's clearer to use "stop the action", which is exactly equivalent.

-*=ph_islistedin=* +*=ph_thereisno=* -

This condition is true if the given value, which must be of a compatible kind, is one of those in the list. For instance, if L is our list of the numbers 2, 3, 5, 7 and 11 then 5 is listed in it but 6 is not.

+

This condition is true if the entry referred to does not exist, that is, the space for it in the table is blank. Examples:

+ +

+if there is no symbol corresponding to an atomic number of 30 in the Table of Standard Elements ... +
if there is no atomic number in row 2 of the Table of Standard Elements ... +

+ -*=ph_isnotlistedin=* +*=ph_numberentries=* -

This condition is true if the given value, which must be of a compatible kind, is not one of those in the list.

+

This phrase produces the number of positions in the list. Example:

+ +

+the number of entries in {1, 1, 1, 3, 1} +

+ +

is 5, even though there are only two genuinely different items in the list.

-*=ph_repeatlist=* +*=ph_decideon=* -

This phrase causes the block of phrases following it to be repeated once for each item in the given list, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

- -

-let L be {2, 3, 5, 7, 11, 13, 17, 19}; -
repeat with prime running through L: +

This phrase can only be used in the body of a definition of a phrase to decide a value. It causes the calculation to end immediately, with the outcome being the given value, which must be of the kind expected. Example:

+ +

+To decide which number is double (N - a number): +
    let D be N times N; +
    decide on D. +

+ + +*=ph_otherwise=* + +

This phrase can only be used as part of an "if ...:" or "unless: ...", and provides an alternative block of phrases to follow if the first block isn't followed. Example:

+ +

+if N is 2: +
    ... +
otherwise:
    ...

-

If the list is empty, nothing happens: the "..." phrase(s) are never tried.

- -*=ph_next=* - -

This phrase can only be used inside a "repeat" or "while" block, and causes the current repetition of the block to finish immediately. That either means the next repetition begins, or (if we are already at the last one) the loop ends too. Example:

- -

-repeat with X running from 1 to 10: -
    if X is 4, next; -
    say "[X] ". +

When there is only a single phrase we can use the shortened form:

+ +

+if N is 2, say "Hooray, N is 2!"; +
otherwise say "Boo, N is not 2...";

-

produces the text "1 2 3 5 6 7 8 9 10 ", with no "4" because the "say" phrase was never reached on the fourth repetition.

- -*=ph_break=* - -

This phrase can only be used inside "repeat", "while" block, and causes both the current repetition and the entire loop to finish immediately. Example:

- -

-repeat with X running from 1 to 10: -
    if X is 7, break; -
    say "[X] ". +

We can also supply an alternative condition:

+ +

+if N is 1: +
    ... +
otherwise if N is 2: +
    ... +
otherwise if N is greater than 4: +
    ...

-

produces the text "1 2 3 4 5 6 ", with nothing after "6" because the loop was broken at that point. The "say" wasn't reached on the 7th repetition, and the 8th, 9th and 10th never happened.

+

At most one of the "..." clauses is ever reached - the first which works out.

-*=phs_surroundings=* +*=ph_switch=* -

This text substitution produces a succinct description of where the player is, be this in darkness, in a lighted room or inside an opaque container such as a large packing case. Example:

- -

-now the left hand status line is "You: [the player's surroundings]"; +

This phrase switches between a variety of possible blocks of phrases to follow, depending on the value given. Example:

+ +

+if the dangerous item is: +
    -- the electric hairbrush: +
        say "Mind your head."; +
    -- the silver spoon: +
        say "Steer clear of the cutlery drawer." +

+ +

One alternative is allowed to be "otherwise", which is used only if none of the other cases apply, and which therefore guarantees that in any situation exactly one of the blocks will be followed.

+ +

+if N is: +
    -- 1: say "1."; +
    -- 2: say "2."; +
    -- otherwise: say "Neither 1 nor 2.";

-*=phs_if=* +*=ph_boxed=* -

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is true. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is false. Example:

- -

-The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask". +

This phrase displays the given text on screen in an overlaid box. For reasons to do with the way such quotations are plotted onto the screen, their text is treated literally: no substitutions in square brackets are obeyed. The quotation will only ever appear once, regardless of the number of times the "display the boxed quotation ..." phrase is reached. Rather than being shown immediately - and thus, probably, scrolling away before it can be seen - the display is held back until the next command prompt is shown to the player. Example:

+ +

+After looking in the Wabe, display the boxed quotation +
    "And 'the wabe' is the grass-plot round +
    a sun-dial, I suppose? said Alice, +
    surprised at her own ingenuity.

-

we find that the cask is described as "a broached, empty cask" when open, and "a sealed wine cask" when closed. A longer example which begins and ends with fixed text, but has two alternatives in the middle:

- -

-The Customs Wharf is a room. "Amid the bustle of the quayside, [if the cask is open]many eyes stray to your broached cask. [otherwise]nobody takes much notice of a man heaving a cask about. [end if]Sleek gondolas jostle at the plank pier." + +

+    Of course it is. It's called 'wabe,' +
    you know, because it goes a long way +
    before it, and a long way behind it -- +

+ + +

+    -- Lewis Carroll". +

+ +

This was the original example used in Trinity, by Brian Moriarty, which invented the idea. A player exploring Kensington Gardens comes upon a location enigmatically called The Wabe; and by way of explanation, this quotation pops up.

+ +*=ph_valuematch=* + +

This condition is true if the value matches the description; the kinds must be compatible, or Inform will issue a problem message. There is no point using this for cases where the description is given explicitly:

+ +

+if 4 matches even numbers, ... +

+ +

because it is easier to write just:

+ +

+if 4 is an even number, ... +

+ +

So this condition is only useful when the description is stored in some variable, and its identity is not known.

+ +*=ph_chooseblankrow=* + +

This phrase chooses a row in the given table which is currently blank under every column. A run-time problem message is issued if no rows are blank. Example:

+ +

+choose a blank row in Table 3; +
now element entry is "Fluorine"; +
now symbol entry is "F"; +
now atomic number entry is 9; +
now atomic weight entry is 19;

-*=phs_unless=* +*=ph_numblank=* -

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is false. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is true. Example:

- -

-The Customs Hall is a room. "With infinite slowness, with ledgers and quill pens, the clerks ruin their eyesight.[unless the player is a woman] They barely even glance in your direction." +

This phrase produces the number of rows in the given table which are entirely blank (that is, blank under every column).

+ +*=ph_numfilled=* + +

This phrase produces the number of rows in the given table which are not entirely blank (that is, at least one column has a value in this row).

+ +*=ph_blankout=* + +

This phrase replaces the entry referred to with a blank, erasing any value previously stored there. Example:

+ +

+choose row 1 in the Table of Fish Habitats; +
blank out the salinity entry;

-*=phs_otherwise=* +*=ph_blankoutrow=* -

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It switches from text which appears if the condition is true, to text which appears if it is false. Example:

- -

-The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask". +

This phrase replaces the currently chosen row with blanks, erasing any value previously stored under any of the columns. Example:

+ +

+choose row 1 in the Table of Fish Habitats; +
blank out the whole row;

-*=phs_endif=* +*=ph_blankoutcol=* -

This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[if ...]".

- -*=phs_endunless=* - -

This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[unless ...]".

- -*=phs_elseif=* - -

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, but this one does. Example:

- -

-The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise if transparent]sealed cask half-full of sloshing wine[otherwise]sealed wine cask". +

This phrase replaces the currently chosen column with blanks, erasing any value previously stored in any of the rows. Example:

+ +

+blank out the whole salinity column in the Table of Fish Habitats;

-*=phs_elseunless=* +*=ph_blankouttable=* -

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, and this one is false too.

+

This phrase replaces every row of the currently chosen table with blanks, erasing any value previously stored anywhere in it. Example:

+ +

+blank out the whole of the Table of Fish Habitats; +

+ +

This is only really useful when a Table is being used to hold working space for some calculation or other.

-*=ph_increase=* +*=ph_yes=* -

This phrases increases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

- -

-increase the score by 8; -
increase the time of day by 5 minutes; +

This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition true.

+ +*=ph_no=* + +

This phrase can only be used in the definition of a phrase to decide whether a condition holds. It ends the decision process immediately and makes the condition false.

+ +*=ph_plus=* + +

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

+ +

+200 + 1 = 201 +
10:04 AM + two minutes = 10:06 AM

-*=ph_decrease=* +*=ph_minus=* -

This phrases decreases the variable, table entry, list entry, or property by the given amount, which must be of a compatible kind. Example:

- -

-decrease the score by 6; -
decrease the carrying capacity of the player by 10; +

This phrase performs signed subtraction on the given values, whose kinds must agree, and produces the result. Examples:

+ +

+200 - 1 = 199 +
10:04 AM - two minutes = 10:02 AM

-*=ph_increment=* +*=ph_times=* -

This phrases increases the variable, table entry, list entry, or property by 1. Example:

- -

-increment the score; +

This phrase performs signed multiplication on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

+ +

+201 times 3 = 603 +
two minutes times 4 = eight minutes

-*=ph_decrement=* +*=ph_divide=* -

This phrases decreases the variable, table entry, list entry, or property by 1. Example:

- -

-decrement the score; +

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and produces the result. Examples:

+ +

+201 divided by 3 = 67 +
twenty minutes divided by 4 = five minutes +
twenty minutes divided by five minutes = 4 +

+ +

Division rounds down to the nearest whole number. An attempt to divide a number by 0 will cause a run-time problem message; but an attempt to divide a real number by 0 will instead produce plus infinity or minus infinity.

+ +*=ph_remainder=* + +

This phrase performs signed division on the given values, whose kinds must be dimensionally compatible, and then produces the remainder. Examples:

+ +

+remainder after dividing 201 by 5 = 1 +
remainder after dividing twenty minutes by 7 = six minutes +

+ +

It is mathematically impossible to divide by 0, so any attempt to find the remainder after dividing a number by 0 will cause a run-time problem message. For a real number this won't arise and the remainder will usually be 0.0.

+ +*=ph_nearest=* + +

This phrase rounds the given value off, rounding upward in boundary cases. Examples:

+ +

+201 to the nearest 5 = 200 +
205 to the nearest 10 = 210 +
10:27 AM to the nearest five minutes = 10:25 AM

-*=ph_remove=* +*=ph_squareroot=* -

Removes the given object from play, so that it is not present in any room. We are not permitted to remove rooms, or doors, or the player, from play; but we are permitted to remove backdrops, making them disappear from all rooms in which they are present. Example:

- -

-remove the gold coin from play; +

This phrase produces an approximate square root, to the nearest integer, of the given value, which must be of a kind which has square roots. Example:

+ +

+square root of 16 = 4

+

Trying to take the square root of a negative number will cause a run-time problem, because then we can't even nearly solve it.

+ +*=ph_realsquareroot=* + +

This phrase produces a square root, as accurately as a real number can hold it, of the given value, which must be of a kind which has square roots. Example:

+ +

+real square root of 2 = 1.41421 +

+ +

The real square root of a negative number is nonexistent.

+ +*=ph_cuberoot=* + +

This phrase produces an approximate cube root, to the nearest integer, of the given value, which must be of a kind which has cube roots. Example:

+ +

+cube root of 27 = 3 +
cube root of -27 = -3 +

+ + +*=phs_value=* + +

This text substitution takes the value and produces a textual representation of it. Most kinds of value, and really all of the useful ones, are "sayable" - numbers, times, objects, rules, scenes, and so on. Example:

+ +

+The description of the wrist watch is "The dial reads [time of day]." +

+ +

Here "time of day" is a value - it's a time that varies, and time is a sayable kind of value, so we might get "The dial reads 11:03 AM."

+ +*=phs_a=* + +

This text substitution produces the name of the object along with its indefinite article. Example:

+ +

+Instead of examining something (called the whatever): +
    "You can only just make out [a whatever]." +

+ +

which might produce "You can only just make out a lamp-post.", or "You can only just make out Trevor.", or "You can only just make out some soldiers." The "a" or "an" in the wording is replaced by whatever indefinite article applies, if any.

+ +*=phs_A=* + +

This text substitution produces the name of the object along with its indefinite article, capitalised. Example:

+ +

+Instead of examining something (called the whatever): +
    "[A whatever] can be made out in the mist." +

+ +

which might produce "A lamp-post can be made out in the mist.", or "Trevor can be made out in the mist.", or "Some soldiers can be made out in the mist." The "A" or "An" in the wording is replaced by whatever indefinite article applies, if any.

+ +*=phs_the=* + +

This text substitution produces the name of the object along with its definite article. Example:

+ +

+Instead of examining something (called the whatever): +
    "You can only just make out [the whatever]." +

+ +

which might produce "You can only just make out the lamp-post.", or "You can only just make out Trevor.", or "You can only just make out the soldiers." The "the" in the wording is replaced by whatever definite article applies, if any.

+ +*=phs_The=* + +

This text substitution produces the name of the object along with its definite article, capitalised. Example:

+ +

+Instead of examining something (called the whatever): +
    "[The whatever] may be a trick of the mist." +

+ +

which might produce "The lamp-post may be a trick of the mist.", or "Trevor may be a trick of the mist.", or "The soldiers may be a trick of the mist." The "The" in the wording is replaced by whatever definite article applies, if any.

+ +*=ph_replacechar=* + +

This phrase acts on the named text by placing the given text in place of the Nth character, counting from 1. Example:

+ +

+let V be "mope"; +
replace character number 3 in V with "lecul"; +
say V; +

+ +

says "molecule".

+ +*=ph_replaceword=* + +

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing or punctuation. Example:

+ +

+let V be "Does the well run dry?"; +
replace word number 3 in V with "jogger"; +
say V; +

+ +

says "Does the jogger run dry?".

+ +*=ph_replacepword=* + +

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation runs as words in their own right. Example:

+ +

+let V be "Frankly, yes, I agree."; +
replace punctuated word number 2 in V with ":"; +
say V; +

+ +

says "Frankly: yes, I agree.".

+ +*=ph_replaceupword=* + +

This phrase acts on the named text by placing the given text in place of the Nth word, counting from 1, and dividing words at spacing, counting punctuation as part of a word just as if it were lettering. Example:

+ +

+let V be "Frankly, yes, I agree."; +
replace unpunctuated word number 2 in V with "of course"; +
say V; +

+ +

says "Frankly, of course I agree.".

+ +*=ph_replaceline=* + +

This phrase acts on the named text by placing the given text in place of the Nth line, counting from 1. Lines are divided by paragraph or line breaks.

+ +*=ph_replacepara=* + +

This phrase acts on the named text by placing the given text in place of the Nth paragraph, counting from 1.

+ +*=ph_replace=* + +

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible. Example:

+ +

+replace the text "a" in V with "z" +

+ +

changes every lower-case "a" to "z": the same thing done with the "case insensitively" option would change each "a" or "A" to "z".

+ +*=ph_replacewordin=* + +

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word. Example:

+ +

+replace the word "Bob" in V with "Robert" +

+ +

changes "Bob got on the Bobsleigh" to "Robert got on the Bobsleigh".

+ +*=ph_replacepwordin=* + +

This phrase acts on the named text by searching and replacing, as many non-overlapping times as possible, where the search text must occur as a whole word or run of punctuation.

+ +*=ph_replacere=* + +

This phrase acts on the named text by matching the regular expression and replacing anything which fits it, as many non-overlapping times as possible. Example:

+ +

+replace the regular expression "\d+" in V with "..." +

+ +

changes "The Battle of Waterloo, 1815, rivalled Trafalgar, 1805" to "The Battle of Waterloo, ..., rivalled Trafalgar, ...". The "case insensitively" causes lower and upper case letters to be treated as if the same letter.

+

When replacing a regular expression, the replacement text also has a few special meanings (though, thankfully, many fewer than for the expression itself). Once again "\n" and "\t" can be used for line break and tab characters, and "\\" must be used for an actual backslash. But, very usefully, "\1" to "\9" expand as the contents of groups numbered 1 to 9, and "\0" to the exact text matched. So:

+ +

+replace the regular expression "\d+" in V with "roughly \0" +

+ +

adds the word "roughly" in front of any run of digits in V, because \0 becomes in turn whichever run of digits matched. And

+ +

+replace the regular expression "(\w+) (.*)" in V with "\2, \1" +

+ +

performs the transformation "Frank Booth" to "Booth, Frank".

+

Finally, prefixing the number by "l" or "u" forces the text it represents into lower or upper case, respectively. For instance:

+ +

+replace the regular expression "\b(\w)(\w*)" in X with "\u1\l2"; +

+ +

changes the casing of X to "title casing", where each individual word is capitalised. (This is a little slow on large texts, since so many matches and replacements are made: it's more efficient to use the official phrases for changing case.)

+ +*=phs_extcredits=* + +

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Extensions whose authors have chosen the "use authorial modesty" option are missed out. Example:

+ +

+Standard Rules version 2/090402 by Graham Nelson +

+ + +*=phs_compextcredits=* + +

This text substitution expands to one or more lines of text crediting each of the extensions used by the current source text, along with their version numbers and authors. Every extension is included, even those whose authors have opted for "use authorial modesty". Example:

+ +

+Standard Rules version 2/090402 by Graham Nelson +
Locksmith version 9 by Emily Short +

+ + +*=ph_holder=* + +

This phrase produces the container, supporter, carrier, wearer or room in which the object resides.

+ +*=ph_firstheld=* + +

This phrase produces the first of the list of things held by the object. Example:

+ +

+first thing held by Baroness Orczy +

+ + +*=ph_nextheld=* + +

This phrase produces the next item of the list of things held by something. Example: suppose Baroness Orczy is carrying a lapdog and a string of pearls.

+ +

+next thing held after the lapdog +

+ +

is then the string of pearls.

*=ph_ifleft=* @@ -2879,328 +1321,861 @@ list of texts which the partnership relation relates to

-*=ph_displayfigure=* +*=ph_subform=* -

This phrase causes the figure to be displayed in the centre of the screen visible to the player. If the option "one time only" is used, it will have no effect if the figure has been displayed before. Example:

+

This takes a text and makes substitution occur immediately. For example,

+ +

+substituted form of "time of death, [time of day]" +

+ +

produces something like "time of death, 9:15 AM" rather than "time of death, [time of day]". It's entirely legal to apply this to text which never had any substitutions in, so

+ +

+substituted form of "balloon" +

+ +

produces "balloon".

+ +*=ph_nearestwholenumber=* + +

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

+ +

+1.4 to the nearest whole number = 1 +
1.6 to the nearest whole number = 2 +
-1.6 to the nearest whole number = 2 +

+ +

We probably ought to bear in mind that the limited range of "number" means that the nearest whole number might not be all that near. For example:

+ +

+6 x 10^23 to the nearest whole number = 2147483647 +

+ +

because 2147483647 is the highest value a "number" can have.

+ +*=ph_reverselist=* + +

This phrase puts the list in reverse order. The old entry 1 becomes the new last entry, and so on: reversing an empty list or a list containing only one entry leaves it unchanged. Example:

+ +

+let L be {11, 12, 14, 15, 16, 17}; +
reverse L; +

+ +

results in L being {17, 16, 15, 14, 12, 11}.

+ +*=ph_sortlist=* + +

This phrase puts the list into ascending order. Example:

+ +

+let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM}; +
sort L; +

+ +

results in L being {9:01 AM, 11:13 AM, 4:21 PM, 6 PM}.

+ +*=ph_sortlistreverse=* + +

This phrase puts the list into descending order. Example:

+ +

+let L be {6 PM, 11:13 AM, 4:21 PM, 9:01 AM}; +
sort L in reverse order; +

+ +

results in L being {6 PM, 4:21 PM, 11:13 AM, 9:01 AM}.

+ +*=ph_sortlistrandom=* + +

This phrase puts the list into a uniformly random order, shuffling it as if it were a pack of cards. Example:

+ +

+let L be {1, 2, 3, 4, 5, 6}; +
sort L in random order; +

+ +

might result in L being {3, 1, 5, 6, 4, 2}. Or any of 719 other arrangements, including being left as it was.

+ +*=ph_sortlistproperty=* + +

This phrase puts the list into ascending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

+ +

+let L be the list of people; +
sort L in carrying capacity order; +

+ +

would arrange people with weaklings first, titans last.

+ +*=ph_sortlistpropertyreverse=* + +

This phrase puts the list into descending order of the values of the given property for the items in the list; this is only allowed if all of those values do have the property in question. Example:

+ +

+let L be the list of people; +
sort L in reverse carrying capacity order; +

+ +

would arrange people with titans first, weaklings last.

+ +*=ph_rotatelist=* + +

This phrase shuffles the entries of the list forwards (to the right) by one place, so that the 1st becomes 2nd, the 2nd becomes 3rd, and so on until the last, which becomes the new first entry. Example:

+ +

+let L be { "cow", "heifer", "bullock" }; +
rotate L; +

+ +

results in L being { "bullock", "cow", "heifer" }.

+ +*=ph_rotatelistback=* + +

This phrase shuffles the entries of the list backwards (to the left) by one place, so that the 3rd becomes 2nd, the 2nd becomes 1st, and so on; the previous 1st entry becomes the new last entry. Example:

+ +

+let L be { "cow", "heifer", "bullock" }; +
rotate L backwards; +

+ +

results in L being { "heifer", "bullock", "cow"}. (This achieves the same effect as "reverse L; rotate L; reverse L;" but is a little faster, and a lot less effort to read.)

+ +*=ph_charnum=* + +

This phrase produces the Nth character from the text, counting from 1. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Example:

+ +

+character number 8 in "numberless projects of social reform" +

+ +

produces "e". If the index is less than 1 or more than the length of the text, the result is an empty text, "".

+ +*=ph_numchars=* + +

This phrase produces the number of characters from the text. Characters include letters, digits, punctuation symbols, spaces or other letter-forms. Examples:

+ +

+number of characters in "War and Peace" +
number of characters in "" +

+ +

produce 13 and 0 respectively.

+ +*=ph_wordnum=* + +

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

+ +

+word number 3 in "ice-hot, don't you think?" +

+ +

produces "don't". If the index is less than 1 or more than the number of words in the text, the result is an empty text, "".

+ +*=ph_numwords=* + +

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing that punctuation or spacing. Example:

+ +

+number of words in "ice-hot, don't you think?" +

+ +

produces 5.

+ +*=ph_pwordnum=* + +

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

+ +

+punctuated word number 2 in "ice-hot, don't you think?" +

+ +

produces "-". The punctuated words here are "ice", "-", "hot", ",", "don't", "you", "think", "?". If two or more punctuation marks are adjacent, they are counted as different words, except for runs of dashes or periods: thus ",," has two punctuated words, but "--" and "..." have only one each. If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

+ +*=ph_numpwords=* + +

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at punctuation or spacing (spaces, line breaks, paragraph breaks) and then removing the spacing, but leaving the punctuation as independent words. Example:

+ +

+number of punctuated words in "ice-hot, don't you think?" +

+ +

produces 8; see if you can find them all.

+ +*=ph_upwordnum=* + +

This phrase produces the Nth word from the text, counting from 1. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

+ +

+unpunctuated word number 1 in "ice-hot, don't you think?" +

+ +

produces "ice-hot,". The unpunctuated words in "ice-hot, don't you think?" are "ice-hot,", "don't", "you", "think?". If the index is less than 1 or more than the number of punctuated words in the text, the result is an empty text, "".

+ +*=ph_numupwords=* + +

This phrase produces the number of words from the text. Words for this purpose are what's left after breaking the text up at spacing (spaces, line breaks, paragraph breaks) but including all punctuation as if it were part of the spelling of the words it joins to. Example:

+ +

+number of unpunctuated words in "ice-hot, don't you think?" +

+ +

produces just 4.

+ +*=ph_linenum=* + +

This phrase produces the Nth line from the text, counting from 1. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have.

+ +*=ph_numlines=* + +

This phrase produces the number of lines in the text. Unless explicit use is made of line-breaking, lines and paragraphs will be the same - it doesn't refer to lines as visible on screen, because we have no way of knowing what size screen the player might have. Example: the number of lines in

+ +

+"Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)" +

+ +

is 3.

+ +*=ph_paranum=* + +

This phrase produces the Nth paragraph from the text, counting from 1.

+ +*=ph_numparas=* + +

This phrase produces the number of paragraphs in the text. Example: the number of paragraphs in

+ +

+"Sensational news just in![paragraph break]The Martians have invaded Miranda.[line break](One of the moons of Uranus, that is.)" +

+ +

is 2.

+ +*=ph_runthrough=* + +

This phrase causes the block of phrases following it to be repeated once for each value matching the description, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

+ +

+repeat with item running through open containers: +
    ... +

+ +

If there are no containers, or they are all closed, the phrases will not be followed at all. Inform will issue a Problem message if the range of the loop may be infinite: for example, it won't allow:

+ +

+repeat with X running through odd numbers: +
    ... +

+ +

On the other hand it will allow:

+ +

+repeat with T running through times: +
    ... +

+ +

which repeats 1440 times, starting with T at midnight and finishing at 11:59 PM. See the Kinds index for which kinds of value can be repeated through.

+ +*=ph_matches=* + +

This condition is true if the second text occurs anywhere inside the first. Examples:

+ +

+if "[score]" matches the text "3", ... +

+ +

tests whether the digit 3 occurs anywhere in the score, as printed out; and

+ +

+if the printed name of the location matches the text "the", ... +

+ +

tests to see whether "the" can be found anywhere in the current room's name. Note that the location "Smotheringly Hot Jungle" would pass this test - it's there if you look. On the other hand, "The Orangery" would not, because "The" does not match against "the". We can get around this in a variety of ways, one of which is to tell Inform to be insensitive to the case (upper or lower) of letters:

+ +

+if the printed name of the location matches the text "the", case insensitively: ... +

+ + +*=ph_exactlymatches=* + +

This condition is true if the second text matches the first, starting at the beginning and finishing at the end. This appears to be the same as testing if one is equal to the other, but that's not quite true: for example,

+ +

+if "[score]" exactly matches the text "[best score]", ... +

+ +

is true if the score and best score currently print out as the same text, which will be true if they are currently equal as numbers; but

+ +

+if "[score]" is "[best score]", ... +

+ +

is never true - these are different texts, even if they sometimes look the same.

+ +*=ph_nummatches=* + +

This produces the number of times the second text occurs within the first. The matches are not allowed to overlap. Example:

+ +

+number of times "pell-mell sally" matches the text "ll" = 3 +
number of times "xyzzy" matches the text "Z" = 0 +
number of times "xyzzy" matches the text "Z", case insensitively = 2 +
number of times "aaaaaaaa" matches the text "aaaa" = 2 +

+ + +*=ph_islistedin=* + +

This condition is true if the given value, which must be of a compatible kind, is one of those in the list. For instance, if L is our list of the numbers 2, 3, 5, 7 and 11 then 5 is listed in it but 6 is not.

+ +*=ph_isnotlistedin=* + +

This condition is true if the given value, which must be of a compatible kind, is not one of those in the list.

+ +*=ph_repeatlist=* + +

This phrase causes the block of phrases following it to be repeated once for each item in the given list, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

+ +

+let L be {2, 3, 5, 7, 11, 13, 17, 19}; +
repeat with prime running through L: +
    ... +

+ +

If the list is empty, nothing happens: the "..." phrase(s) are never tried.

+ +*=ph_hashappened=* + +

This condition is true if the given scene has both begun and ended.

+ +*=ph_hasnothappened=* + +

This condition is true if the given scene has not ended (or never started).

+ +*=ph_hasended=* + +

This condition is true if the given scene ended at least once.

+ +*=ph_hasnotended=* + +

This condition is true if the given scene has never ended.

+ +*=ph_actionof=* + +

This phrase produces a literally typed action as a value. Example:

+ +

+now the best idea yet is the action of pushing the button; +

+ +

The action must be specific in every respect, so "action of taking something" or "action of doing something" will not work - "taking something" is really a general description of many possible actions, not an action in its own right.

+ +*=ph_currentaction=* + +

This phrase produces the action currently being processed as a value - it literally stores the action, and remembers, if necessary, the exact wording of the player's command at the time it was stored - so that even actions arising from commands like LOOK UP X100 IN THE CODE BOOK can be stored faithfully. Examples:

+ +

+let the present whim be the current action; +
say "How you would like to be [current action]."; +

+ +

This only makes sense if an action is currently going on, so it shouldn't be used in "every turn" rules, for instance.

+ +*=ph_trystored=* + +

This phrase makes the stored action take effect now. Example:

+ +

+try the present whim; +

+ +

If the present whim contains, say, the action of taking the beach ball, then the effect is exactly the same as "try taking the beach ball". The stored action isn't destroyed or otherwise used up in the process, so it can be tried again another time, as often as we like.

+ +*=ph_trystoredsilently=* + +

This phrase makes the stored action take effect now, under the "silent" convention which means that routine messages aren't printed. Example:

+ +

+silently try the present whim; +

+ +

If the present whim contains, say, the action of taking the beach ball, and the action succeeds, nothing is printed, but if something goes awry then a message is printed to say why. Either way, the effect is exactly the same as "try silently taking the beach ball".

+ +*=ph_actionpart=* + +

This phrase produces the action name part of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

+ +

+action name part of the current action = throwing it at action +

+ + +*=ph_nounpart=* + +

This phrase produces the (first) noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

+ +

+noun part of the current action = the brick +

+ +

If the noun is something other than an object, this produces just "nothing", the non-object.

+ +*=ph_secondpart=* + +

This phrase produces the second noun of an action. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

+ +

+second noun part of the current action = Biggles +

+ +

If the second noun is something other than an object (for instance for the command SET DIAL TO 3417 it would be the number 3417), this produces just "nothing", the non-object.

+ +*=ph_actorpart=* + +

This phrase produces the person who would be carrying out the action if it were being tried. Example: suppose the current actor is Algy, who is throwing the brick at Biggles. Then

+ +

+actor part of the current action = Algy +

+ + +*=ph_involves=* + +

This condition is true if the object appears as any of the actor, the noun or the second noun in the action. Example:

+ +

+if the current action involves Algy +

+ +

would be true for "give revolver to Algy", "Algy trying flying the Sopwith Camel", "examine Algy" and so on, but false for "ask Raymond about secret airfield".

+ +*=ph_indarkness=* + +

This condition is true if the player currently has no light to see by. Note that the test is more complicated than simply testing

+ +

+if the player is in a dark room, ... +

+ +

since the player might have a torch, or be inside a cage which is itself in a dark room, and so on.

+ +*=ph_consents=* + +

This condition is unusual in doing something and not simply making a silent check: it waits for the player to type YES (or Y) or NO (or N) at the keyboard, and then is true if the answer was yes. Example:

+ +

+say "Are you quite sure you want to kiss the Queen? "; +
if the player consents: +
    ... +

+ + +*=ph_whether=* + +

This phrase converts a condition into its result as a value, which is always either "true" or "false". Example:

+ +

+whether or not 20 is an odd number +

+ +

produces the truth state "false". This is mostly useful for storing up results to look at later:

+ +

+let victory be whether or not all the treasures are in the cabinet; +

+ +

and then subsequently:

+ +

+if victory is true, ... +

+ + +*=ph_playsf=* + +

This phrase causes the sound effect to be played. If the option "one time only" is used, it will have no effect if the sound effect has been played before. Example:

-display the Figure of Woodlands; +play the sound of rustling leaves;

-*=ph_group=* +*=ph_listofdesc=* -

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

- -

-Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together. +

This phrase produces the list of all values matching the given description. Inform will issue a problem message if the result would be an infinite list, or one which is impractical to test: for instance "list of even numbers" is not feasible.

+ +*=ph_multipleobjectlist=* + +

This phrase produces the current multiple object list as a value. The list will be the collection of objects found to match a plural noun like ALL in the most recent command typed by the player. If there is no multiple object, say if the command was TAKE PEAR, the list will be empty: it won't be a list of size 1.

+ +*=ph_altermultipleobjectlist=* + +

This phrase sets the multiple object list to the given value. The list is ordinarily the collection of objects found to match a plural noun like ALL in the most recent command typed by the player, but using this phrase at the right moment (before the "generate action rule" in the turn sequence rules takes effect).

+ +*=ph_durationmins=* + +

This phrase converts numbers into lengths of time. Example:

+ +

+15 minutes

-

This might produce the list item "fork and spoon".

- -*=ph_groupart=* - -

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, but giving each individual item its indefinite article. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

- -

-Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together giving articles. +

Because it's a phrase, not just a notation for writing constants down, the number doesn't have to be given literally:

+ +

+let X be 5; +
if the player is in the Slow Room, now X is 10; +
let deadline be the time of day plus X minutes;

-

This might produce the list item "a fork and a spoon".

+

Note that lengths of time can't exceed 1440 minutes.

-*=ph_grouptext=* +*=ph_durationhours=* -

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, summarised with the given text. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

- -

-Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together as "utensils". +

This phrase converts numbers into lengths of time. Example:

+ +

+10 hours

-

This might produce the list item "two utensils (fork and spoon)".

+

Note that lengths of time can't exceed 24 hours.

-*=ph_numberentries=* +*=ph_movebackdrop=* -

This phrase produces the number of positions in the list. Example:

- -

-the number of entries in {1, 1, 1, 3, 1} +

This phrase moves the backdrop so that it is now present in every room matching the given description. Example: If we define

+ +

+A room can be wet or dry. A room is usually dry. The Rock Pool is wet.

-

is 5, even though there are only two genuinely different items in the list.

- -*=phs_value=* - -

This text substitution takes the value and produces a textual representation of it. Most kinds of value, and really all of the useful ones, are "sayable" - numbers, times, objects, rules, scenes, and so on. Example:

- -

-The description of the wrist watch is "The dial reads [time of day]." +

then we can write

+ +

+move the stream backdrop to all wet rooms;

-

Here "time of day" is a value - it's a time that varies, and time is a sayable kind of value, so we might get "The dial reads 11:03 AM."

+

This phrasing, "move the ... backdrop to all ..." is deliberately meant to look unlike the simpler "move ... to ...", to emphasise that this kind of movement is possible only for backdrops.

-*=phs_a=* +*=ph_updatebackdrop=* -

This text substitution produces the name of the object along with its indefinite article. Example:

- -

-Instead of examining something (called the whatever): -
    "You can only just make out [a whatever]." +

This phrase runs through all backdrops in the model world and makes sure they are correctly in, or not in, the current location, so that everything appears right from the player's point of view. Example:

+ +

+The Upper Cave is above the Rock Pool. The Ledge is east of the Pool. The stream is a backdrop.

-

which might produce "You can only just make out a lamp-post.", or "You can only just make out Trevor.", or "You can only just make out some soldiers." The "a" or "an" in the wording is replaced by whatever indefinite article applies, if any.

- -*=phs_A=* - -

This text substitution produces the name of the object along with its indefinite article, capitalised. Example:

- -

-Instead of examining something (called the whatever): -
    "[A whatever] can be made out in the mist." + +

+When play begins: +
    move the stream backdrop to all wet rooms.

-

which might produce "A lamp-post can be made out in the mist.", or "Trevor can be made out in the mist.", or "Some soldiers can be made out in the mist." The "A" or "An" in the wording is replaced by whatever indefinite article applies, if any.

- -*=phs_the=* - -

This text substitution produces the name of the object along with its definite article. Example:

- -

-Instead of examining something (called the whatever): -
    "You can only just make out [the whatever]." + +

+A lever is in the Cave. The lever is fixed in place.

-

which might produce "You can only just make out the lamp-post.", or "You can only just make out Trevor.", or "You can only just make out the soldiers." The "the" in the wording is replaced by whatever definite article applies, if any.

- -*=phs_The=* - -

This text substitution produces the name of the object along with its definite article, capitalised. Example:

- -

-Instead of examining something (called the whatever): -
    "[The whatever] may be a trick of the mist." -

- -

which might produce "The lamp-post may be a trick of the mist.", or "Trevor may be a trick of the mist.", or "The soldiers may be a trick of the mist." The "The" in the wording is replaced by whatever definite article applies, if any.

- -*=ph_randombetween=* - -

This phrase produces a uniformly random value in the range given. Examples:

- -

-a random number from 10 to 99 -
a random time from 2:31 PM to 2:57 PM -

- -

If we make a new kind of value:

- -

-A cloud pattern is a kind of value. The cloud patterns are cumulus, altocumulus, cumulonimbus, stratus, cirrus, nimbus, nimbostratus. -

- -

then we can also take random values from it:

- -

-a random cloud pattern between stratus and nimbus -

- -

which has three possible outcomes, all equally likely.

- -*=ph_randomchance=* - -

This condition is true X/Yths of the time, where X and Y are the numbers. Example:

- -

-if a random chance of 2 in 3 succeeds, ... -

- -

Here is a rule which applies only 15% of the time:

- -

-Instead of waiting when a random chance of 15 in 100 succeeds: ... + +

+Instead of pulling the lever when the Cave is dry: +
    now the Cave is wet; +
    now the lever is in the Rock Pool; +
    now the lever is portable; +
    update backdrop positions; +
    say "The old rusty lever pulls away, and the thin cave wall goes with it, so that a stream bursts into the cave, falling to the pool below."

-*=ph_seed=* +*=ph_followfor=* -

This phrase changes the seed number as specified. Any random numbers generated after that depend only on the seed. Example: the following sentence will "fix" the process of generating these random numbers so that they are not random at all - the same sequence of random numbers will be produced on each run.

- -

-When play begins, seed the random-number generator with 1234. -

- -

The seed value "1234" can be anything positive; a different sequence of random numbers will be produced for each different seed value. A seed value of 0 restores the RNG to properly random behaviour again.

- -*=ph_stopaction=* - -

This phrase stops the current rule, stops the rulebook being worked through, and finally stops the action being processed. Example:

- -

-Before taking the key: -
    say "It seems to be soldered to the keyhole."; -
    stop the action. +

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such), and applies it to the value given, which must be of a matching kind. Example:

+ +

+follow the reaching inside rulebook for the electrified cage;

-*=ph_continueaction=* +*=phs_listbraced=* -

This phrase ends the current rule, but in a way which keeps its rulebook going, so that the action being processed will carry on rather than being stopped. Example:

- -

-Instead of taking the napkin: -
    say "(first unfolding its delicate origami swan)[command clarification break]"; -
    continue the action. +

This text substitution produces the list in the form of "{", then a comma-separated list, and then "}", which looks less like an English sentence but more mathematical. Example:

+ +

+"[list of people in brace notation]"

-

An "instead" rule ordinarily stops the action when it finishes, so the "continue the action" is needed to make things carry on. (This rule would have been better written as a "before" rule, in fact, but it shows the idea.)

+

might produce "{ yourself, Mr Darcy, Flashman }".

-*=ph_showrelation=* +*=phs_listdef=* -

This phrase is for testing purposes only. It shows the current state of the named relation, that is, it shows which values relate to which other ones, where it's possible to do this in any sensible way.

- -*=ph_applied0=* - -

This phrase produces the result of applying the given phrase, which must be one which takes no values itself.

- -*=ph_applied1=* - -

This phrase produces the result of applying the given phrase, which must be one which takes one value itself.

- -*=ph_applied2=* - -

This phrase produces the result of applying the given phrase, which must be one which takes two values itself.

- -*=ph_applied3=* - -

This phrase produces the result of applying the given phrase, which must be one which takes three values itself.

- -*=ph_apply0=* - -

This phrase causes the given phrase to be applied. It must be one which takes no values itself.

- -*=ph_apply1=* - -

This phrase causes the given phrase to be applied. It must be one which takes one value itself.

- -*=ph_apply2=* - -

This phrase causes the given phrase to be applied. It must be one which takes two values itself.

- -*=ph_apply3=* - -

This phrase causes the given phrase to be applied. It must be one which takes three values itself.

- -*=ph_minspart=* - -

This phrase converts a time to a number, then takes the result mod 60, which in effect produces the number of minutes after the hours are thrown away. Example:

- -

-minutes part of 12:41 PM +

This text substitution writes out the list in sentence form, adding the appropriate definite articles. Example:

+ +

+let L be {the piano, the music stand}; +
say "[L with definite articles]";

-

produces 41.

+

says "the piano and the music stand".

-*=ph_hourspart=* +*=phs_listindef=* -

This phrase converts a time to a number, then divides the result by 60, which in effect produces the number of hours after minutes are thrown away. Example:

- -

-hours part of 8:21 AM +

This text substitution writes out the list in sentence form, adding the appropriate indefinite articles. Example:

+ +

+let L be {the piano, the music stand}; +
say "[L with definite articles]";

-

produces 8.

+

says "a piano and a music stand".

-*=ph_letrelation=* +*=phs_here=* -

This phrase creates a new temporary variable, and sets its value to the identity of a newly created and equally temporary relation. These last only for the present block of phrases, which certainly means that they exist only in the current rule. Example:

- -

-let the password dictionary be a relation of texts; +

Produces "here" if the story tense is the present tense, and "there" otherwise.

+ +*=phs_now=* + +

Produces "now" if the story tense is the present tense, and "then" otherwise.

+ +*=ph_matchesre=* + +

This condition is true if any contiguous part of the text can be matched against the given regular expression. Examples:

+ +

+if "taramasalata" matches the regular expression "a.*l", ...

-

This makes a purely temporary various-to-various relation between texts, which lasts as long as the temporary value "password dictionary" lasts. By default, relations are various-to-various, but we could instead write, say:

- -

-let the nicknames catalogue be a various-to-one relation of texts; +

is true, since this looks for a part of "taramasalata" which begins with "a", continues with any number of characters, and finishes with "l"; so it matches "aramasal". (Not "asal", because it gets the makes the leftmost match it can.) The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

+ +*=ph_exactlymatchesre=* + +

This condition is true if the whole text (starting from the beginning and finishing at the end) can be matched against the given regular expression. The option "case insensitively" causes lower and upper case letters to be treated as equivalent.

+ +*=ph_nummatchesre=* + +

This produces the number of times that contiguous pieces of the text can be matched against the regular expression, without allowing them to overlap.

+ +*=ph_matchtext=* + +

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. Example:

+ +

+if "taramasalata" matches the regular expression "m.*l": +
    say "[text matching regular expression]."; +

+ +

says "masal."

+ +*=ph_subexpressiontext=* + +

This phrase is only meaningful immediately after a successful match of a regular expression against text, and it produces the text which matched. The number must be from 1 to 9, and must correspond to one of the bracketed groups in the expression just matched. Example: after

+ +

+if "taramasalata" matches the regular expression "a(r.*l)a(.)": +

+ +

the "text matching regular expression" is "aramasalat", the "text matching subexpression 1" is "ramasal", and "text matching subexpression 2" is "t".

+ +*=phs_surroundings=* + +

This text substitution produces a succinct description of where the player is, be this in darkness, in a lighted room or inside an opaque container such as a large packing case. Example:

+ +

+now the left hand status line is "You: [the player's surroundings]";

-*=phs_banner=* +*=ph_shiftbefore=* -

This text substitution expands to the banner text giving bibliographic details of the current story file, rather like the opening credits of a movie, or the title page of a book.

- -*=ph_letequation=* - -

This phrase creates a new temporary variable, starting it with the value found by solving the given equation. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

- -

-let F be given by Newton's Second Law where a is the acceleration due to gravity; +

This phrase produces a time earlier by the amount given, keeping within the 24 hour clock. Example:

+ +

+7 hours before 5:30 AM

-

There is also a more compact syntax, giving the equation explicitly:

- -

-let KE be given by KE = mv^2/2 where KE is an energy; +

produces 10:30 PM.

+ +*=ph_shiftafter=* + +

This phrase produces a time later by the amount given, keeping within the 24 hour clock. Example:

+ +

+9 hours after 11 AM +

+ +

produces 8 PM.

+ +*=ph_timebefore=* + +

This condition is true if the first time occurs earlier in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it.

+ +*=ph_timeafter=* + +

This condition is true if the first time occurs later in the day than the second. In recognition of the fact that very few stories begin before 4 AM, whereas many run on past midnight, the start of the day is taken to be 4 AM: thus 3:59 AM is after 11:10 PM, but 4:04 AM is before it.

+ +*=ph_writetable=* + +

This phrase causes the entire contents of the given table to be written out to the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

+ +

+write File of Glaciation Data from the Table of Antarctic Reserves +

+ +

Any blank rows in the table are automatically moved to the bottom, and only the non-blank rows are written.

+ +*=ph_readtable=* + +

This phrase causes the entire contents of the given table to be read in from the given file. Note that files must have been declared, and must be referred to by their Inform names, not by textual filenames. Example:

+ +

+read File of Glaciation Data into the Table of Antarctic Reserves +

+ +

Any rows left spare at the foot of the table are automatically blanked. On the other hand if the file is too large to fit into the table - with too many columns or too many rows - a run-time problem is produced.

+ +*=ph_fileexists=* + +

This condition is true if the file-system used by the player appears to contain a file with the right name. For example, if we declared:

+ +

+The binary File of Glaciation Data is called "icedata". +

+ +

and then tested

+ +

+if the File of Glaciation Data exists, ... +

+ +

then Inform would search for a file called "icedata". (The arrangements for where this might be stored, and its filename extension, vary from platform to platform.)

+ +*=ph_showmetable=* + +

This phrase prints a crude but sometimes useful display on screen of the current contents of the named table. It's intended for authors to see when testing, not for players to see.

+ +*=phs_currenttablerow=* + +

This text substitution produces a crude but sometimes useful listing of the entries in the currently chosen table row.

+ +*=phs_tablerow=* + +

This text substitution produces a crude but sometimes useful listing of the entries in the specified row.

+ +*=phs_tablecolumn=* + +

This text substitution produces a crude but sometimes useful listing of the entries in the specified column.

+ +*=ph_setpronouns=* + +

This phrase adjusts the meaning of pronouns like IT, HIM, HER and THEM in the command parser as if the object mentioned has become the subject of conversation. Example: the combination of

+ +

+set pronouns from the key; +
set pronouns from Bunny; +

+ +

might change IT to mean the silver key and HIM to mean Harry "Bunny" Manders, while leaving HER and THEM unaltered.

+ +*=ph_numrows=* + +

This phrase produces the number of rows (including any blank rows) in the given table. Example:

+ +

+number of rows in the Table of Selected Elements

-*=ph_otherwise=* +*=phs_listof=* -

This phrase can only be used as part of an "if ...:" or "unless: ...", and provides an alternative block of phrases to follow if the first block isn't followed. Example:

- -

-if N is 2: -
    ... -
otherwise: -
    ... +

This text substitution produces a list, in sentence form, of everything matching the description. Example:

+ +

+"Mr Darcy glares proudly at you. He is wearing [list of things worn by Darcy] and carrying [list of things carried by Darcy]."

-

When there is only a single phrase we can use the shortened form:

- -

-if N is 2, say "Hooray, N is 2!"; -
otherwise say "Boo, N is not 2..."; +

And, if this were from a dramatisation of the novel by Miss Fielding rather than Miss Austen, we might find:

+ +

+Mr Darcy glares proudly at you. He is wearing a pair of Newcastle United boxer shorts and carrying a self-help book.

-

We can also supply an alternative condition:

- -

-if N is 1: -
    ... -
otherwise if N is 2: -
    ... -
otherwise if N is greater than 4: -
    ... -

- -

At most one of the "..." clauses is ever reached - the first which works out.

+

If the description matches nothing - for instance, if Darcy has empty hands - then "nothing" is printed.

-*=ph_switch=* +*=phs_alistof=* -

This phrase switches between a variety of possible blocks of phrases to follow, depending on the value given. Example:

- -

-if the dangerous item is: -
    -- the electric hairbrush: -
        say "Mind your head."; -
    -- the silver spoon: -
        say "Steer clear of the cutlery drawer." +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article. Example:

+ +

+a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary

-

One alternative is allowed to be "otherwise", which is used only if none of the other cases apply, and which therefore guarantees that in any situation exactly one of the blocks will be followed.

- -

-if N is: -
    -- 1: say "1."; -
    -- 2: say "2."; -
    -- otherwise: say "Neither 1 nor 2."; + +*=phs_Alistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article, and the first is capitalised, so that it can be used at the beginning of a sentence. Example:

+ +

+A maritime bill of lading, some hemp rope and Falconer's Naval Dictionary

+*=phs_thelistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article. Example:

+ +

+the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

+ + +*=phs_Thelistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article, and the first is capitalised, so that it can be used at the beginning of a sentence. Example:

+ +

+The maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

+ + +*=phs_islistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. The whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

+ +

+is marlin-spike +
are maritime bill of lading, hemp rope and Falconer's Naval Dictionary +

+ + +*=phs_isalistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its indefinite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

+ +

+is a marlin-spike +
are a maritime bill of lading, some hemp rope and Falconer's Naval Dictionary +

+ + +*=phs_isthelistof=* + +

This text substitution produces a list, in sentence form, of everything matching the description. Each item is prefaced by its definite article, and the whole list starts with "is" (if there's one item or none) or "are" (more than one). Examples:

+ +

+is the marlin-spike +
are the maritime bill of lading, the hemp rope and Falconer's Naval Dictionary +

+ + +*=phs_alistofconts=* + +

This text substitution produces a list, in sentence form, of everything matching the description, noting any contents in brackets. This is really intended only to be used by the Standard Rules.

+ *=ph_degrees=*

Inform measures angles in radians, a convention in which the angle for a half circle is pi, and a right angle is pi divided by 2. This is better from a mathematical point of view, but in practice most people think about angles using degrees, where 180 degrees is a half-circle and a right angle is 90 degrees. This phrase helps with that by converting from degrees to radians: in other words, it multiplies by 0.0174532925, since that's roughly 1/180th of pi. Examples:

- -

+ +

sine of 90 degrees = 0.0
cosine of 60 degrees = 0.5

@@ -3209,8 +2184,8 @@ sine of 90 degrees = 0.0 *=ph_sine=*

The length of the upright of a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

- -

+ +

sine of 0 = 0
sine of 45 degrees = 0.70711
sine of (pi divided by 4) = 0.70711 @@ -3222,8 +2197,8 @@ sine of 0 = 0 *=ph_cosine=*

The length of the base of a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

- -

+ +

cosine of 0 = 1.0
cosine of 45 degrees = 0.70711
cosine of (pi divided by 4) = 0.70711 @@ -3235,8 +2210,8 @@ cosine of 0 = 1.0 *=ph_tangent=*

The ratio of the upright length to the base length in a right-angled triangle with this angle and a hypotenuse of length 1, where angle is measured in radians. Examples:

- -

+ +

tangent of 0 = 0.0
tangent of 45 degrees = 1.0
tangent of (pi divided by 4) = 1.0 @@ -3280,170 +2255,20 @@ tangent of 0 = 0.0

The inverse of the hyperbolic tangent function.

-*=phs_here=* +*=ph_displayfigure=* -

Produces "here" if the story tense is the present tense, and "there" otherwise.

- -*=phs_now=* - -

Produces "now" if the story tense is the present tense, and "then" otherwise.

- -*=ph_indarkness=* - -

This condition is true if the player currently has no light to see by. Note that the test is more complicated than simply testing

- -

-if the player is in a dark room, ... +

This phrase causes the figure to be displayed in the centre of the screen visible to the player. If the option "one time only" is used, it will have no effect if the figure has been displayed before. Example:

+ +

+display the Figure of Woodlands;

-

since the player might have a torch, or be inside a cage which is itself in a dark room, and so on.

- -*=ph_consents=* - -

This condition is unusual in doing something and not simply making a silent check: it waits for the player to type YES (or Y) or NO (or N) at the keyboard, and then is true if the answer was yes. Example:

- -

-say "Are you quite sure you want to kiss the Queen? "; -
if the player consents: -
    ... -

- - -*=ph_whether=* - -

This phrase converts a condition into its result as a value, which is always either "true" or "false". Example:

- -

-whether or not 20 is an odd number -

- -

produces the truth state "false". This is mostly useful for storing up results to look at later:

- -

-let victory be whether or not all the treasures are in the cabinet; -

- -

and then subsequently:

- -

-if victory is true, ... -

- - -*=phs_linebreak=* - -

This text substitution produces a line break. Example:

- -

-"There is an endless sense of[line break]falling and[line break]falling." -

- -

Line breaks are not paragraph breaks, so the result is:

- -

-There is an endless sense of -
falling and -
falling. -

- -

with no extra vertical spacing between these lines.

- -*=phs_nolinebreak=* - -

This text substitution produces no text. It's used only for a side-effect: it prevents a line break where Inform might otherwise assume one. Example:

- -

-"The chorus sing [one of]Jerusalem[or]Rule, Britannia![no line break][at random]." -

- -

Here the "[no line break]" stops Inform from thinking that the exclamation mark means a sentence ending - it's part of the name of the song "Rule, Britannia!". So we get

- -

-The chorus sing Rule, Britannia!. -

- -

with no line break between the "!" and ".".

- -*=phs_runparaon=* - -

This text substitution produces no text. It's used only for a side-effect: it prevents a paragraph break occurring after the present text is printed, in case Inform might be tempted to place one there. Example:

- -

-Before taking something, say "Very well. [run paragraph on]". -

- -

This allows the reply to, say, TAKE ENVELOPE to be

- -

-Very well. Taken. -

- -

rather than

- -

-Very well. -

- - -

-Taken. -

- -

which is how texts produced by different rules would normally be shown. (It's a traditional printer's term. See Oldfield's Manual of Typography, 1892, under "When two paragraphs are required to be made into one, or, in technical language, 'to run on'.")

- -*=phs_parabreak=* - -

This text substitution produces a paragraph break. Example:

- -

-"This is not right.[paragraph break]No, something is terribly wrong." -

- -

Paragraph breaks have a little vertical spacing in them, unlike mere line breaks, so the result is:

- -

-This is not right. -

- - -

-No, something is terribly wrong. -

- - -*=phs_condparabreak=* - -

This text substitution either produces a paragraph break, or no text at all. It marks a place where Inform can put a paragraph break if necessary; in effect it simulates what Inform does every time a "before" or similar rule finishes. If there is text already printed, and text then follows on, a paragraph break is made. But if not, nothing is done. This is sometimes useful when producing a large amount of text which changes with the circumstances so that it is hard to predict in advance whether a paragraph break is needed or not.

- -*=ph_breakpending=* - -

This condition is true if text has recently been said in such a way that Inform expects to add a paragraph break at the next opportunity (for instance when the present rule ends and another one says something, or when a "[conditional paragraph break]" is made).

- -*=phs_clarifbreak=* - -

This text substitution produces a line break, and then also a paragraph break if the text immediately following is a room description brought about by having gone to to a different room and looking around, in which case a line break should be added. In traditional IF, this is used when clarifying what Inform thinks the player intended by a given command. Example:

- -

-say "(first opening [the noun])[command clarification break]"; -

- -

might result in

- -

-(first opening the valise) -
You rummage through the valise for tickets, but find nothing. -

- - -*=phs_runparaonsls=* - -

This text substitution produces no text. It's used only for a side-effect: it indicates that the current printing position does not follow a skipped line, and that further material is expected which will run on from the previous paragraph, but that if no further material turns up then a skipped line would be needed before the next command prompt. (It's very likely that only the Standard Rules will ever need this.)

*=ph_chooserow=*

This phrase selects the row with the given number. Row numbers in a table start from 1, so

- -

+ +

choose row 1 from the Table of Recent Monarchs

@@ -3452,8 +2277,8 @@ choose row 1 from the Table of Recent Monarchs *=ph_chooserowwith=*

This phrase selects the first row, working down from the top of the given table, in which the given column has the given value. Example:

- -

+ +

choose row with a name of "Victoria" in the Table of Recent Monarchs;

@@ -3463,11 +2288,1033 @@ choose row with a name of "Victoria" in the Table of Recent Monarchs;

This phrase makes a uniformly random choice of non-blank rows in the given table. Note that although a table always has at least one row, it can't be guaranteed that it always has a non-blank row, so it's possible for this to fail: if it does, a real-time problem message is thrown.

+*=ph_next=* + +

This phrase can only be used inside a "repeat" or "while" block, and causes the current repetition of the block to finish immediately. That either means the next repetition begins, or (if we are already at the last one) the loop ends too. Example:

+ +

+repeat with X running from 1 to 10: +
    if X is 4, next; +
    say "[X] ". +

+ +

produces the text "1 2 3 5 6 7 8 9 10 ", with no "4" because the "say" phrase was never reached on the fourth repetition.

+ +*=ph_break=* + +

This phrase can only be used inside "repeat", "while" block, and causes both the current repetition and the entire loop to finish immediately. Example:

+ +

+repeat with X running from 1 to 10: +
    if X is 7, break; +
    say "[X] ". +

+ +

produces the text "1 2 3 4 5 6 ", with nothing after "6" because the loop was broken at that point. The "say" wasn't reached on the 7th repetition, and the 8th, 9th and 10th never happened.

+ +*=phs_response=* + +

This text substitution writes out the current text of the given response.

+ +*=phs_bracket=* + +

This text substitution expands to a single open square bracket, avoiding the problem that a literal [ in text would look to Inform like the opening of a substitution. Example:

+ +

+"He [bracket]Lord Astor[close bracket] would, wouldn't he?" +

+ +

prints as "He [Lord Astor] would, wouldn't he?".

+ +*=phs_closebracket=* + +

This text substitution expands to a single close square bracket, avoiding the problem that a literal ] in text would look to Inform like the closing of a substitution. Example:

+ +

+"He [bracket]Lord Astor[close bracket] would, wouldn't he?" +

+ +

prints as "He [Lord Astor] would, wouldn't he?".

+ +*=phs_apostrophe=* + +

This text substitution expands to a single quotation mark, avoiding Inform's ordinary rule of converting literal single quotation marks to double at the edges of words. Example:

+ +

+Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin[apostrophe] mister?'" +

+ +

produces:

+ +

+Lucy snaps, "What's the matter? You don't trust my cookin' mister?" +

+ +

A more abbreviated form would be:

+ +

+Instead of going outside, say "Lucy snaps, 'What's the matter? You don't trust my cookin['] mister?'" +

+ +

which has exactly the same meaning.

+ +*=phs_quotemark=* + +

This text substitution expands to a double quotation mark. Most of the time this is unnecessary because of Inform's rule of converting literal single quotation marks to double at the edges of words, so it's needed only if we want a double-quote in the middle of a word for some reason. Example:

+ +

+"The compass reads 41o21'23[quotation mark]E." +

+ +

which produces: The compass reads 41o21'23"E. (Note that ["] is not allowed; a double-quotation mark is never allowed inside double-quoted text, not even in a text substitution.)

+ +*=ph_enumfirst=* + +

This phrase produces the first-created value of the given kind, which should be an enumeration. Example: if we have

+ +

+Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. +

+ +

then "first value of colour" is red.

+ +*=ph_enumlast=* + +

This phrase produces the last-created value of the given kind, which should be an enumeration. Example: if we have

+ +

+Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. +

+ +

then "last value of colour" is violet.

+ +*=ph_enumafter=* + +

This phrase produces the next-created value of the given kind, which should be an enumeration. Example: if we have

+ +

+Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. +

+ +

then "colour after orange" is yellow.

+ +*=ph_enumbefore=* + +

This phrase produces the previous-created value of the given kind, which should be an enumeration. Example: if we have

+ +

+Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. +

+ +

then "colour before blue" is green.

+ +*=ph_letequation=* + +

This phrase creates a new temporary variable, starting it with the value found by solving the given equation. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

+ +

+let F be given by Newton's Second Law where a is the acceleration due to gravity; +

+ +

There is also a more compact syntax, giving the equation explicitly:

+ +

+let KE be given by KE = mv^2/2 where KE is an energy; +

+ + +*=phs_if=* + +

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is true. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is false. Example:

+ +

+The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask". +

+ +

we find that the cask is described as "a broached, empty cask" when open, and "a sealed wine cask" when closed. A longer example which begins and ends with fixed text, but has two alternatives in the middle:

+ +

+The Customs Wharf is a room. "Amid the bustle of the quayside, [if the cask is open]many eyes stray to your broached cask. [otherwise]nobody takes much notice of a man heaving a cask about. [end if]Sleek gondolas jostle at the plank pier." +

+ + +*=phs_unless=* + +

This text substitution produces no text. It's used only for a side-effect: it says that the text following should be said only if the condition is false. That continues until the end of the text, or until an "[end if]" substitution, whichever comes first. If the "[otherwise]" and "[otherwise if]" substitutions are also present, they allow alternatives to be added in case the condition is true. Example:

+ +

+The Customs Hall is a room. "With infinite slowness, with ledgers and quill pens, the clerks ruin their eyesight.[unless the player is a woman] They barely even glance in your direction." +

+ + +*=phs_otherwise=* + +

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It switches from text which appears if the condition is true, to text which appears if it is false. Example:

+ +

+The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise]sealed wine cask". +

+ + +*=phs_endif=* + +

This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[if ...]".

+ +*=phs_endunless=* + +

This text substitution produces no text, and can be used only to close off a stretch of varying text which begins with "[unless ...]".

+ +*=phs_elseif=* + +

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, but this one does. Example:

+ +

+The wine cask is a container. The printed name of the cask is "[if open]broached, empty cask[otherwise if transparent]sealed cask half-full of sloshing wine[otherwise]sealed wine cask". +

+ + +*=phs_elseunless=* + +

This text substitution produces no text, and can be used only following an "[if ...]" or "[unless ...]" text substitution. It gives an alternative text to use if the first condition didn't apply, and this one is false too.

+ +*=ph_applied0=* + +

This phrase produces the result of applying the given phrase, which must be one which takes no values itself.

+ +*=ph_applied1=* + +

This phrase produces the result of applying the given phrase, which must be one which takes one value itself.

+ +*=ph_applied2=* + +

This phrase produces the result of applying the given phrase, which must be one which takes two values itself.

+ +*=ph_applied3=* + +

This phrase produces the result of applying the given phrase, which must be one which takes three values itself.

+ +*=ph_apply0=* + +

This phrase causes the given phrase to be applied. It must be one which takes no values itself.

+ +*=ph_apply1=* + +

This phrase causes the given phrase to be applied. It must be one which takes one value itself.

+ +*=ph_apply2=* + +

This phrase causes the given phrase to be applied. It must be one which takes two values itself.

+ +*=ph_apply3=* + +

This phrase causes the given phrase to be applied. It must be one which takes three values itself.

+ +*=ph_omit=* + +

This phrase changes the form of an inventory listing, room description, etc., so that it will simply list "a bottle of sand" or "an empty bottle", rather than "a bottle (in which is sand)" or "a bottle (which is empty)". It should be used only when the listing is imminent, and does not have permanent effect.

+ +*=ph_listcontents=* + +

This phrase produces a list of all things whose holder is the given object, according to Inform's traditional conventions for room descriptions and inventory listings. Example:

+ +

+list the contents of Marley Wood, as a sentence, with newlines +
and including all contents; +

+ +

Where this is possible, it's generally better to use "[list of things in ...]" instead, which produces the same result in an acceptable way for the middle of a sentence.

+ +*=ph_addtolist=* + +

This phrase adds the given value to the end of the list. Example:

+ +

+let L be {60, 168}; +
add 360 to L; +

+ +

results in L being {60, 168, 360}. Note that the value is added even if it already occurs somewhere in L; this can be avoided with "if absent". So:

+ +

+add 168 to L, if absent; +

+ +

would do nothing - it is already there.

+ +*=ph_addlisttolist=* + +

This phrase adds the first list to the end of the second. Example:

+ +

+let L be {2, 3, 5, 7}; +
add {11, 13, 17, 19} to L; +

+ +

results in L being {2, 3, 5, 7, 11, 13, 17, 19}.

+ +*=ph_addatentry=* + +

This phrase adds the given value so that it becomes the entry with that index number in the list. Example:

+ +

+let L be {1, 2, 3, 4, 8, 24}; +
add 12 at entry 6 in L; +

+ +

sets L to {1, 2, 3, 4, 8, 12, 24}. If there are N entries in L, then we can add at any of entries 1 up to N+1: adding at entry N+1 means adding at the end. The phrase option "if absent" makes the phrase do nothing if the value already exists anywhere in L.

+ +*=ph_addlistatentry=* + +

This phrase adds the first list to the second so that it begins at the given position. Example:

+ +

+let L be {1, 2, 3, 4}; +
add {4, 8, 12} at entry 3 in L; +

+ +

results in L being {1, 2, 4, 8, 12, 3, 4}.

+ +*=ph_remfromlist=* + +

This phrase removes every instance of the given value from the list. Example:

+ +

+let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; +
remove 1 from L; +

+ +

results in L being {3, 4, 5, 9, 2, 6, 5, 3}. Ordinarily "remove 7 from L" would produce a run-time problem, since L does not contain the value 7, but using the "if present" option lets us off this: the phrase then does nothing if L does not contain the value to be removed.

+ +*=ph_remlistfromlist=* + +

This phrase removes every instance of any value in the first list from the second. Example:

+ +

+let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; +
remove {0, 2, 4, 6, 8} from L; +

+ +

results in L being {3, 1, 5, 9, 5, 3}. If both lists are large, this can be a slow process, and we might do better by sorting them and trying a more sophisticated method. But this is convenient for anything reasonable-sized.

+ +*=ph_rementry=* + +

This phrase removes the entry at the given position, counting from 1 as the first entry. (Once it is removed, the other entries shuffle down.) Example:

+ +

+let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; +
remove entry 3 from L; +

+ +

results in L being {3, 1, 1, 5, 9, 2, 6, 5, 3}.

+ +*=ph_rementries=* + +

This phrase removes the entries at the given range of positions, counting from 1 as the first entry. (Once they are removed, the other entries shuffle down.) Example:

+ +

+let L be {3, 1, 4, 1, 5, 9, 2, 6, 5, 3}; +
remove entries 3 to 6 from L; +

+ +

results in L being {3, 1, 2, 6, 5, 3}.

+ +*=ph_figureid=* + +

This phrase produces the ID number used in the eventual Glulx file for the given figure.

+ +*=ph_soundid=* + +

This phrase produces the ID number used in the eventual Glulx file for the given sound effect.

+ +*=ph_letrelation=* + +

This phrase creates a new temporary variable, and sets its value to the identity of a newly created and equally temporary relation. These last only for the present block of phrases, which certainly means that they exist only in the current rule. Example:

+ +

+let the password dictionary be a relation of texts; +

+ +

This makes a purely temporary various-to-various relation between texts, which lasts as long as the temporary value "password dictionary" lasts. By default, relations are various-to-various, but we could instead write, say:

+ +

+let the nicknames catalogue be a various-to-one relation of texts; +

+ + +*=ph_placeinscope=* + +

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the given object in scope, making it accessible to the player's commands, regardless of where it is in the model world. Examples:

+ +

+place the distant volcano in scope; +
place the lacquered box in scope, but not its contents; +

+ +

Ordinarily if something is placed in scope, then so are its parts and (in the case of a supporter or a transparent or open container) its contents; using the "but not its contents" option we can place just the box itself in scope.

+ +*=ph_placecontentsinscope=* + +

This phrase should only be used in rules for the "deciding the scope of..." activity. It places the things inside or on top of the given object in scope, making them accessible to the player's commands, but it does nothing to place the object itself in scope. (It might of course be in scope anyway, and if it is then this phrase won't remove it.) Example:

+ +

+place the contents of the lacquered box in scope; +
place the contents of the Marbled Steps in scope; +

+ +

Note that the object in question can be a room, as in this second example.

+ +*=ph_stopaction=* + +

This phrase stops the current rule, stops the rulebook being worked through, and finally stops the action being processed. Example:

+ +

+Before taking the key: +
    say "It seems to be soldered to the keyhole."; +
    stop the action. +

+ + +*=ph_continueaction=* + +

This phrase ends the current rule, but in a way which keeps its rulebook going, so that the action being processed will carry on rather than being stopped. Example:

+ +

+Instead of taking the napkin: +
    say "(first unfolding its delicate origami swan)[command clarification break]"; +
    continue the action. +

+ +

An "instead" rule ordinarily stops the action when it finishes, so the "continue the action" is needed to make things carry on. (This rule would have been better written as a "before" rule, in fact, but it shows the idea.)

+ +*=ph_scenetimesincebegan=* + +

This phrase produces the time since the named scene began, which only makes sense, of course, if it has indeed begun. Example:

+ +

+time since Entire Game began +

+ + +*=ph_scenetimesinceended=* + +

This phrase produces the time since the named scene ended, which only makes sense, of course, if it has indeed ended. Example:

+ +

+time since Formal Dinner ended +

+ + +*=ph_scenetimewhenbegan=* + +

This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene began.

+ +*=ph_scenetimewhenended=* + +

This phrase produces the time (i.e., the value of the "time of day" variable) at the moment when the given scene ended.

+ +*=ph_stop=* + +

This phrase causes the current rule to end immediately. It is most often used in the definition of other phrases:

+ +

+To judge the score: +
    if the score is 0, stop; +
    say "The score is [score in words] more than it was a half-hour ago." +

+ +

In the case when the score is 0, the "stop" ends the phrase immediately, so that the subsequent text is printed only if the score is not 0.

+

"Stop" can also be used in action rules, though this is not very good style - it's clearer to use "stop the action", which is exactly equivalent.

+ +*=ph_total=* + +

This phrase produces the total of some property held by all of the values matching the description. A problem message is produced if the values in question can't have that property ("the total carrying capacity of scenes"), or if it holds a kind of value which can't meaningfully be added up ("the total description of open doors"). Example:

+ +

+total carrying capacity of people in the Deep Pool +

+ + +*=ph_succeeds=* + +

This causes the current rule to end immediately, with its outcome considered to be a success. That means the rulebook being worked through will also end, and also be a success.

+ +*=ph_fails=* + +

This causes the current rule to end immediately, with its outcome considered to be a failure. That means the rulebook being worked through will also end, and also be a failure.

+ +*=ph_nodecision=* + +

This causes the current rule to end immediately, but with no outcome. That means the rulebook being worked through will continue to run on, beginning with the next rule.

+ +*=ph_succeeded=* + +

This condition is true if the most recently followed rule ended in success. Example:

+ +

+follow the hypothetical clever rule; +
if rule succeeded: +
    ... +

+ + +*=ph_failed=* + +

This condition is true if the most recently followed rule ended in failure. Example:

+ +

+follow the hypothetical clever rule; +
if rule failed: +
    ... +

+ +

Note that this is not the opposite of "rule succeeded", because there's a third possibility: that it ended with no outcome.

+ +*=phs_oneof=* + +

This text substitution produces no text. It's used only for a side-effect: it switches between a number of alternative texts, which follow it and are divided by "[or]" substitutions, according to a strategy given in a closing substitution. Example:

+ +

+"You flip the coin. [one of]Heads[or]Tails[purely at random]!" +

+ +

Here there are just two alternatives, and the strategy is "purely at random". Exactly half of the time the text will be printed as "You flip the coin. Heads!"; and the other half, "You flip the coin. Tails!".

+ +*=phs_or=* + +

This text substitution produces no text, and can be used only in a "[one of]..." construction. It divides alternative wordings. Example:

+ +

+"You flip the coin. [one of]Heads[or]Tails[purely at random]!" +

+ + +*=phs_purelyrandom=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen uniformly randomly.

+ +*=phs_thenpurelyrandom=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, but that after that they are chosen uniformly randomly.

+ +*=phs_random=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random except that the same choice cannot come up twice running. This is useful to avoid the deadening effect of repeating the exact same message. Example:

+ +

+"The light changes randomly again; now it's [one of]green[or]amber[or]red[at random]." +

+ +

Here we can safely say the light "changes", because the new colour cannot be the same as the one printed the last time.

+ +*=phs_thenrandom=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen in sequence until all have been seen, and then after that, at random except that the same choice cannot come up twice running. Example:

+ +

+"Maybe the murderer is [one of]Colonel Mustard[or]Professor Plum[or]Cardinal Cerise[then at random]." +

+ + +*=phs_sticky=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that a random choice is made the first time the text is printed, but that it sticks from there on. Example:

+ +

+"The newspaper headline is: [one of]War Casualties[or]Terrorists[or]Banks[sticky random] [one of]Continue To Expand[or]Lose Out[sticky random]." +

+ +

Although the newspaper headline will change with each playing, it will not alter during play.

+ +*=phs_decreasing=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are chosen at random, except that the first is most likely to be chosen, the second is next most likely, and so on down to the rarest at the end. Example:

+ +

+"Zorro strides by, [one of]looking purposeful[or]grim-faced[or]deep in thought[or]suppressing a yawn[or]scratching his ribs[or]trying to conceal that he has cut himself shaving[as decreasingly likely outcomes]." +

+ +

There are six outcomes here: the first is six times as likely as the last, and those in between are similarly scaled, so Zorro cuts himself shaving only once in 21 tries, while he looks purposeful almost a third of the time.

+ +*=phs_order=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. A random order is chosen for the alternative passages of text, and they are used in that order as the text is printed again and again. When one random cycle finishes, a new one begins. The effect is somewhat like the "shuffle album" feature on an iPod. Example:

+ +

+"You dip into the chapter on [one of]freshwater fish[or]hairless mammals[or]extinct birds[or]amphibians such as the black salamander[in random order]." +

+ +

One small restriction: if there are more than 32 variations, purely random choices will be printed, and there will be no guarantee that repeats are prevented.

+ +*=phs_cycling=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: after the last one is reached, we start again from the first. Example:

+ +

+"The pundits discuss [one of]the weather[or]world events[or]celebrity gossip[cycling]." +

+ + +*=phs_stopping=* + +

This text substitution produces no text, and can be used only to end a "[one of]..." construction. It indicates that the alternatives are used one at a time, in turn: once the last one is reached, it's used forever after. Example:

+ +

+"[one of]The phone rings[or]The phone rings a second time[or]The phone rings again[stopping]." +

+ + +*=phs_firsttime=* + +

This pair of text substitutions causes whatever is between them to be printed only the first time the text is printed. Example:

+ +

+"The screen door squeaks loudly as when you open it. [first time]Well, you'll get used to it eventually. [only]" +

+ +

This is exactly equivalent to

+ +

+"The screen door squeaks loudly as when you open it. [one of]Well, you'll get used to it eventually. [or][stopping]"; +

+ +

but easier to read.

+ +*=ph_now=* + +

This phrase makes the condition become true. Examples:

+ +

+now the score is 100; +
now the player is Kevin; +
now the front door is open; +
now Mr Darcy is wearing the top hat; +
now all the doors are open; +
now all of the things in the sack are in the box; +

+ +

Inform issues a problem message if the condition asks to do the impossible ("now 3 is an even number") or is vague ("now the duck is not in the Lily Pond") or not in the present tense ("now the front door had been open").

+ +*=phs_timewords=* + +

This text substitution produces the given time written out in English sentence form. For example:

+ +

+"Through the glass you can see the reversed hands reading [the time of day in words]." +

+ +

might produce

+ +

+Through the glass you can see the reversed hands reading twenty to nine. +

+ + +*=ph_changelength=* + +

This phrase alters the given list so that it now has exactly the number of entries given. Example:

+ +

+change L to have 21 entries; +

+ +

If L previously had more than 21 entries, they are thrown away (and lost forever); if L previously had fewer, then new entries are created, using the default value for whatever kind of value L holds. So extending a list of numbers will pad it out with 0s, but extending a list of texts will pad it out with the empty text "", and so on.

+ +*=ph_truncate=* + +

This phrase alters the given list so that it now has no more than the number of entries given. Example:

+ +

+truncate L to 8 entries; +

+ +

shortens L to length 8 if it is currently longer than that, trimming entries from the end, but would (for instance) leave a list of length 3 unchanged. Note that

+ +

+truncate L to 0 entries; +

+ +

empties it to { }, the list with nothing in.

+ +*=ph_truncatefirst=* + +

This phrase alters the given list so that it now consists only of the initial part of the list with the given length. Example:

+ +

+truncate L to the first 4 entries; +

+ +

turns {1, 3, 5, 7, 9, 11} to {1, 3, 5, 7}.

+ +*=ph_truncatelast=* + +

This phrase alters the given list so that it now consists only of the final part of the list with the given length. Example:

+ +

+truncate L to the last 4 entries; +

+ +

turns {1, 3, 5, 7, 9, 11} to {5, 7, 9, 11}.

+ +*=ph_extend=* + +

This phrase pads out the list with default values as needed so that it now has at least the given length. (If the list is already at least that length, nothing is done.) Example:

+ +

+extend L to 80 entries; +

+ +

lengthens L to length 80 if it is currently shorter than that.

+ +*=phs_numwords=* + +

This text substitution writes out the number in English text. Example:

+ +

+"You've been wandering around for [turn count in words] turns now." +

+ +

might produce "You've been wandering around for two hundred and thirteen turns now." The "and" here is natural on one side of the Atlantic but not the other - so with the "Use American dialect." option in place, it disappears.

+ +*=phs_s=* + +

This text substitution prints a letter "s" unless the last number printed was 1. Example:

+ +

+"You've been wandering around for [turn count in words] turn[s] now." +

+ +

produces "... for one turn now." or "... for two turns now." as appropriate. Note that it reacts only to numbers, not to other arithmetic values like times (or, for instance, weights from the "Metric Units" extension).

+ +*=ph_randomdesc=* + +

This phrase makes a uniformly random choice from values satisfying the description given. Example:

+ +

+a random visited room +
a random scene +

+ +

A problem message is issued if the range is too large (for instance, "a random text"). Unexpected results may follow if no value fits the description, unless we are describing objects, in which case the result is the special value "nothing".

+ +*=ph_follow=* + +

This phrase causes the rule to be obeyed immediately (rather than simply at predetermined times such as when a particular action is being tried, or at the end of every turn, and such). Example:

+ +

+follow the advance time rule; +
follow the appraisal rulebook; +

+ + +*=ph_try=* + +

This phrase makes the action, which has to be named literally, take effect now. Example:

+ +

+Instead of entering the trapdoor, try going up. +

+ +

It's as if the player had typed GO UP as a command. Note that the action has to be specific:

+ +

+try eating something; +

+ +

is not allowed, since it doesn't say exactly what is to be eaten.

+ +*=ph_trysilently=* + +

This phrase makes the action, which has to be named literally, take effect now, under the "silent" convention which means that routine messages aren't printed. Example:

+ +

+try silently taking the napkin; +

+ +

Silence is maintained only if this new action, the taking of the napkin, is successful (so if the napkin is successfully taken, the text "Taken." will not appear): if the action should fail, a suitable objection will be voiced as usual.

+ +*=ph_end=* + +

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is not considered final.

+ +*=ph_endfinally=* + +

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message "The End." The end is considered final, and any hidden menu options will be revealed.

+ +*=ph_endsaying=* + +

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is not considered final. Example:

+ +

+end the story saying "You have been stymied" +

+ + +*=ph_endfinallysaying=* + +

This phrase ends the story at the next opportunity (typically as soon as the current rule ends), with the closing message given in the text. The end is considered final, and any hidden menu options will be revealed. Example:

+ +

+end the story finally saying "You have defeated Sauron" +

+ + +*=ph_ended=* + +

This condition is true if an end has been declared using one of the "end the story..." phrases.

+ +*=ph_notended=* + +

This condition is true if no end has been declared using one of the "end the story..." phrases.

+ +*=ph_finallyended=* + +

This condition is true if an end has been declared using one of the "end the story finally..." phrases, so that an ending has been reached which the author feels is a completion of the player's experience.

+ +*=ph_notfinallyended=* + +

This condition is true if an end has been declared using one of the "end the story..." phrases, but not "finally", so the author feels that the player can get further experience by playing again and trying different approaches.

+ +*=ph_resume=* + +

This phrase causes an ended story to resume exactly as if no "end the story..." phrase had been used. Example:

+ +

+When play ends: +
    if the story has not ended finally: +
        say "Oh dear. Still, here's another chance."; +
        resume the story. +

+ +

The phrase is likely to be sensible only as part of a "when play ends" rule. Other traditional uses include giving the player three lives, as in an old-school arcade machine.

+ +*=ph_timefromnow=* + +

This phrase causes the given rule to be run at a given time offset from the current time of day. Example:

+ +

+the egg-timer clucks in 18 minutes from now; +

+ + +*=ph_turnsfromnow=* + +

This phrase causes the given rule to be run at a given number of turns after the current one. Example:

+ +

+the egg-timer clucks in four turns from now; +

+ + +*=ph_attime=* + +

This phrase causes the given rule to be run at a given time of day. Example:

+ +

+the egg-timer clucks at 11:35 AM; +

+ + +*=ph_carryout=* + +

This phrase carries out the given activity, which must be one not applying to any value. Example:

+ +

+carry out the assaying activity; +

+ + +*=ph_carryoutwith=* + +

This phrase carries out the given activity, which must apply to a kind of value matching the one supplied. Example:

+ +

+carry out the analysing activity with the pitchblende; +
carry out the announcing activity with the score; +

+ + +*=ph_continueactivity=* + +

This phrase should be used only in rules in activity rulebooks. It causes the current rule to end, but without result, so that the activity continues rather than stopping as a result of the rule. This is useful for rulebooks (like the "for" rulebook of an activity) where the default is that a rule does stop the activity.

+ +*=ph_showrelation=* + +

This phrase is for testing purposes only. It shows the current state of the named relation, that is, it shows which values relate to which other ones, where it's possible to do this in any sensible way.

+ +*=ph_roomdirof=* + +

This phrase produces the room which the given map direction leads to, or the special value "nothing" if it leads nowhere. If it leads to a door, the result is the room through that door. Examples:

+ +

+say "You look north into [the room north from the Garden]." +
if the room north from the Garden is nothing, say "The grass leads nowhere." +

+ + +*=ph_doordirof=* + +

This phrase produces the door which the given map direction leads to, or the special value "nothing" if it leads nowhere or to a room. Examples:

+ +

+let the barrier be the door north from the Garden; +
if the barrier is a door, say "Well, [the barrier] is in the way."; +

+ + +*=ph_roomordoor=* + +

This phrase produces the object which the given map direction leads to, which will always be either a room, a door or the special value "nothing". The phrase is used mainly by the Standard Rules, for technical reasons, and usually it's better to use "room ... from ..." or "door ... from ..." instead.

+ +*=ph_bestroute=* + +

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms, or produces "nothing" if there is no way through at all. Example:

+ +

+The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room]." +

+ +

Best routes are ordinarily forbidden to go through doors, but if the suffix "using doors" is added as an option then any open or openable and unlocked door may be used on the way; and if "using even locked doors" is given, then any door at all will do. Since magnetism is no respecter of property, that seems right here:

+ +

+The description of the brass compass is "The dial points quiveringly to [best route from the location to the Lodestone Room, using even locked doors]." +

+ + +*=ph_bestroutethrough=* + +

This phrase produces a direction to take in order to get from A to B by the shortest number of movements between rooms which match the given description, or produces "nothing" if there is no way through at all. Example:

+ +

+best route from the Drawbridge to the Keep through visited rooms +

+ +

The condition - in this case, that "visited rooms" must be used - also applies to both ends of the journey, so if either Drawbridge or Keep are unvisited then this is "nothing". (Similarly, saying something like "...through containers" would mean there is never a route.)

+ +*=ph_bestroutelength=* + +

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms. If A and B are the same, the answer is 0; if there is no route at all, the answer is -1. Example:

+ +

+The description of the proximity gadget is "You are now [number of moves from the location to the Sundial] moves from the Sundial."; +

+ + +*=ph_bestroutethroughlength=* + +

This phrase produces the number of map connections which must be followed in order to get from A to B by the shortest number of movements between rooms matching the given description. If A and B are the same, the answer is 0; if there is no route at all, or if either A or B fail to match the description themselves, the answer is -1.

+ +*=ph_requirestouch=* + +

This condition is true if the action being processed is one whose (first) noun is an object which needs to be touchable by the actor. For example, it's true for "taking", but false for "examining".

+ +*=ph_requirestouch2=* + +

This condition is true if the action being processed is one whose second noun is an object which needs to be touchable by the actor. For example, it's true for "putting the brick in the sack", but false for "throwing the brick at the window".

+ +*=ph_requirescarried=* + +

This condition is true if the action being processed is one whose (first) noun is an object which needs to be carried by the actor. For example, it's true for "dropping", but false for "taking".

+ +*=ph_requirescarried2=* + +

This condition is true if the action being processed is one whose second noun is an object which needs to be carried by the actor.

+ +*=ph_requireslight=* + +

This condition is true if the action being processed is one which can only be performed if the actor has light to see by. For example, it's true for "examining", but false for "dropping".

+ +*=ph_while=* + +

This phrase causes the block of phrases following it to be repeated over and over for as long the condition is true. If it isn't even true the first time, the block is skipped over and nothing happens. Example:

+ +

+while someone (called the victim) is in the Crypt: +
    say "A bolt of lightning strikes [the victim]!"; +
    now the victim is in the Afterlife; +

+ + +*=ph_changeexit=* + +

This phrase alters the map so that the given map connection is made. Note that connections can be made to rooms, but not doors: the positions of doors are fixed. Example:

+ +

+change the east exit of the Closet to the Tsar's Imperial Dining Salon +

+ +

Since "nothing" is not a room, this doesn't allow us to change the exit to nothing, so there is a separate definition of:

+ +

+change the west exit of the Closet to nothing +

+ + +*=ph_changenoexit=* + +

This phrase alters the map so that the given map connection is unmade. Example:

+ +

+change the west exit of the Closet to nowhere +

+ + +*=ph_defaultvalue=* + +

Produces the default value of the kind named. Examples:

+ +

+The silver repeater is here. "You catch sight of a silver repeater watch, hands immobile at [default value of time]." +

+ +

produces the output:

+ +

+You catch sight of a silver repeater watch, hands immobile at 9:00 am. +

+ +

because nine in the morning is the default time in Inform. If we have:

+ +

+Brightness is a kind of value. The brightnesses are guttering, weak, radiant and blazing. +

+ +

then "default value of brightness" is guttering, the first brightness created. When it comes to kinds of object, we sometimes have to be a little careful. For example,

+ +

+default value of room +

+ +

is always going to be fine (it's always the first room created in the source text). But

+ +

+default value of vehicle +

+ +

would produce a Problem message if there were no vehicles in the world.

+ +*=ph_if=* + +

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is true. (If the condition must contain a comma for some reason, the block form should be used.) Example:

+ +

+if the red door is open, say "You could try going east?" +

+ + +*=ph_unless=* + +

This phrase causes the single phrase, or block of phrases, following it to be obeyed only if the condition is false. (If the condition must contain a comma for some reason, the block form should be used.) Example:

+ +

+unless the red door is closed, say "You could try going east?" +

+ + *=ph_frontside=*

This phrase produces the first of the one or two rooms containing a door - first in the order given in the source text. Example: if

- -

+ +

The red rock stair is east of the Orchard and above the Undertomb.

@@ -3476,8 +3323,8 @@ The red rock stair is east of the Orchard and above the Undertomb. *=ph_backside=*

This phrase produces the last of the one or two rooms containing a door - last in the order given in the source text. Example: if

- -

+ +

The red rock stair is east of the Orchard and above the Undertomb.

@@ -3486,8 +3333,8 @@ The red rock stair is east of the Orchard and above the Undertomb. *=ph_othersideof=*

This phrase produces the room on the other side of the door, as seen from the given vantage point, which needs to be one of its sides. Example: if

- -

+ +

The red rock stair is east of the Orchard and above the Undertomb.

@@ -3496,160 +3343,222 @@ The red rock stair is east of the Orchard and above the Undertomb. *=ph_directionofdoor=*

This phrase produces the direction in which the door leads, as seen from the given vantage point, which needs to be one of its sides. Example: if

- -

+ +

The red rock stair is east of the Orchard and above the Undertomb.

then "direction of the red rock stair from the Undertomb" produces up.

-*=ph_chooseblankrow=* +*=ph_showme=* -

This phrase chooses a row in the given table which is currently blank under every column. A run-time problem message is issued if no rows are blank. Example:

- -

-choose a blank row in Table 3; -
now element entry is "Fluorine"; -
now symbol entry is "F"; -
now atomic number entry is 9; -
now atomic weight entry is 19; +

This phrase is intended for testing purposes only. If used in a story file running inside the Inform application, it prints a line of text showing the given value and its kind; in a Released story file, it does nothing at all. Example:

+ +

+When play begins: showme 11.

- -*=ph_numblank=* - -

This phrase produces the number of rows in the given table which are entirely blank (that is, blank under every column).

- -*=ph_numfilled=* - -

This phrase produces the number of rows in the given table which are not entirely blank (that is, at least one column has a value in this row).

- -*=ph_blankout=* - -

This phrase replaces the entry referred to with a blank, erasing any value previously stored there. Example:

- -

-choose row 1 in the Table of Fish Habitats; -
blank out the salinity entry; +

produces

+ +

+number: 11

- -*=ph_blankoutrow=* - -

This phrase replaces the currently chosen row with blanks, erasing any value previously stored under any of the columns. Example:

- -

-choose row 1 in the Table of Fish Habitats; -
blank out the whole row; +

More usefully:

+ +

+Every turn: showme the score.

- -*=ph_blankoutcol=* - -

This phrase replaces the currently chosen column with blanks, erasing any value previously stored in any of the rows. Example:

- -

-blank out the whole salinity column in the Table of Fish Habitats; +

Now, every turn, we get a line in the story's transcript like so:

+ +

+"score" = number: 0

+

Inform uses the quotation marks and equals sign to show that it had to do some work to find the answer. "score" wasn't a constant value - it was a variable, and Inform had to look up the current value.

-*=ph_blankouttable=* +*=ph_group=* -

This phrase replaces every row of the currently chosen table with blanks, erasing any value previously stored anywhere in it. Example:

- -

-blank out the whole of the Table of Fish Habitats; +

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

+ +

+Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together.

-

This is only really useful when a Table is being used to hold working space for some calculation or other.

+

This might produce the list item "fork and spoon".

-*=ph_omit=* +*=ph_groupart=* -

This phrase changes the form of an inventory listing, room description, etc., so that it will simply list "a bottle of sand" or "an empty bottle", rather than "a bottle (in which is sand)" or "a bottle (which is empty)". It should be used only when the listing is imminent, and does not have permanent effect.

+

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, but giving each individual item its indefinite article. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

+ +

+Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together giving articles. +

+ +

This might produce the list item "a fork and a spoon".

+ +*=ph_grouptext=* + +

This phrase causes the objects described to be listed together in a single item as part of an inventory or room description, summarised with the given text. The effect is temporary, and the phrase should only be used when this list is imminent. Example:

+ +

+Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together as "utensils". +

+ +

This might produce the list item "two utensils (fork and spoon)".

*=ph_locationof=*

This phrase produces the room which, perhaps indirectly, contains the object given. Example: if the player stands in Biblioll College and wears a waistcoat, inside which is a fob watch, then

- -

+ +

location of the fob watch

is Biblioll College. In general, a thing cannot be in two rooms at once, but there are two exceptions: two-sided doors, present on both sides, and backdrops. The "location of" a door is its front side, but a backdrop has no location. (Objects which are not things at all, such as rooms and directions, also have no location.)

-*=ph_hashappened=* +*=ph_say=* -

This condition is true if the given scene has both begun and ended.

+

This phrase writes out the given text for the player to read. Normally it is simply shown on screen, not spoken aloud, unless software adapted for partially sighted people is being used.

-*=ph_hasnothappened=* +*=phs_bold=* -

This condition is true if the given scene has not ended (or never started).

- -*=ph_hasended=* - -

This condition is true if the given scene ended at least once.

- -*=ph_hasnotended=* - -

This condition is true if the given scene has never ended.

- -*=ph_while=* - -

This phrase causes the block of phrases following it to be repeated over and over for as long the condition is true. If it isn't even true the first time, the block is skipped over and nothing happens. Example:

- -

-while someone (called the victim) is in the Crypt: -
    say "A bolt of lightning strikes [the victim]!"; -
    now the victim is in the Afterlife; +

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in bold face. "[roman type]" should be used to switch back to normal. Example:

+ +

+"Jane looked down. [bold type]Danger[roman type], the sign read."

-*=ph_succeedswith=* +*=phs_italic=* -

This phrase can only be used in a rule which produces a value, and the value given must be of the right kind. It causes the current rule to finish immediately, to succeed, and to produce the value given.

- -*=ph_producedby=* - -

This phrase is used to follow the named rule, and to collect the resulting value.

- -*=ph_producedbyfor=* - -

This phrase is used to follow the named rule based on the value given, and to collect the resulting value.

- -*=ph_listcontents=* - -

This phrase produces a list of all things whose holder is the given object, according to Inform's traditional conventions for room descriptions and inventory listings. Example:

- -

-list the contents of Marley Wood, as a sentence, with newlines -
and including all contents; +

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear in italics. "[roman type]" should be used to switch back to normal. Example:

+ +

+"This is [italic type]very suspicious[roman type], said Peter."

-

Where this is possible, it's generally better to use "[list of things in ...]" instead, which produces the same result in an acceptable way for the middle of a sentence.

-*=ph_nearestwholenumber=* +*=phs_roman=* -

This phrase performs signed addition on the given values, whose kinds must agree, and produces the result. Examples:

- -

-1.4 to the nearest whole number = 1 -
1.6 to the nearest whole number = 2 -
-1.6 to the nearest whole number = 2 +

This text substitution produces no text. It's used only for a side-effect: to return to ordinary Roman type after a previous use of "[bold type]" or "[italic type]".

+ +*=phs_fixedspacing=* + +

This text substitution produces no text. It's used only for a side-effect: to make the text following it appear with fixed letter spacing. In variable letter spacing, a lower case "m" is much wider than an "l", which is natural to the eye since it has been printing practice since the Renaissance. Fixed letter spacing is more like typewriting, and it is best used to reproduce typewritten text or printed notices; it can also be convenient for making simple diagrams. Example:

+ +

+"On the door is written: [fixed letter spacing]J45--O-O-O[variable letter spacing]."

-

We probably ought to bear in mind that the limited range of "number" means that the nearest whole number might not be all that near. For example:

- -

-6 x 10^23 to the nearest whole number = 2147483647 + +*=phs_varspacing=* + +

This text substitution produces no text. It's used only for a side-effect: to return to ordinary letter spacing after a previous use of "[fixed letter spacing]".

+ +*=ph_repeattable=* + +

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from top to bottom. Blank rows are skipped. Example:

+ +

+To list the succession: +
    say "The Succession List runs as follows..."; +
    repeat through the Table of Recent Monarchs: +
        say "[accession entry]: [name entry] ([family entry])." +

+ + +*=ph_repeattablereverse=* + +

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, from bottom to top. Blank rows are skipped.

+ +*=ph_repeattablecol=* + +

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

+ +

+repeat through the Table of Recent Monarchs in name order: ... +
repeat through the Table of Recent Monarchs in accession order: ... +

+ +

work through the same table in rather different orders. The sequence is lower to higher (small numbers to high numbers, A to Z, and so on); insert "reverse" after "in" to reverse this.

+ +*=ph_repeattablecolreverse=* + +

This phrase causes the block of phrases following it to be repeated once for each row in the given table, choosing each row in turn, in order of the values in the given column. Blank rows are skipped. Example:

+ +

+repeat through the Table of Recent Monarchs in reverse name order: ... +
repeat through the Table of Recent Monarchs in reverse accession order: ... +

+ +

work through the same table in rather different orders. The sequence is higher to lower (high numbers to small numbers, Z to A, and so on); delete the "reverse" after "in" to reverse this.

+ +*=ph_sortrandom=* + +

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, in a uniformly random order, and any blank rows at the bottom. Example:

+ +

+sort the Table of Recent Monarchs in random order; +

+ + +*=ph_sortcolumn=* + +

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has ascending order, and any blank rows at the bottom. Example:

+ +

+sort the Table of Recent Monarchs in accession order; +

+ +

Ascending order means 1 up to 10, say, or A up to Z, with blank values coming last.

+ +*=ph_sortcolumnreverse=* + +

This phrase rearranges the rows of the given table so that the non-blank rows occur at the top, so that the given column has descending order, and any blank rows at the bottom. Example:

+ +

+sort the Table of Recent Monarchs in reverse name order; +

+ +

Descending order means 10 down to 1, say, or Z down to A, with blank values coming last.

+ +*=ph_repeat=* + +

This phrase causes the block of phrases following it to be repeated once for each value in the given range, storing that value in the named variable. (The variable exists only temporarily, within the repetition.) Example:

+ +

+repeat with counter running from 1 to 10: +
    ... +

+ +

This, and runs through the given phrases ten times. Within those phrases, a special value called "counter" has the value 1 the first time through, then the value 2, then 3 and so on up to 10. (It can of course be called whatever we like: this is only an example.) The range can be from any kind where ranges make sense - anything on which arithmetic can be done, so for instance

+ +

+repeat with moment running from 4 PM to 4:07 PM: +
    ... +

+ +

and also any enumeration:

+ +

+Colour is a kind of value. The colours are red, orange, yellow, green, blue, indigo and violet. +

+ + +

+... +
    repeat with hue running from orange to indigo: +
        ...

-

because 2147483647 is the highest value a "number" can have.

*=ph_abide=*

This phrase applies the given rule, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. Example:

- -

+ +

The omnibus rule:
    abide by the first rule;
    abide by the second rule; @@ -3667,3 +3576,94 @@ The omnibus rule:

This phrase applies the given rule, and makes its result the result of the present rule. If the rule being abided by succeeds or fails then the original rule also stops, at once and without going on to any further instructions. However, the rule deemed to have decided the outcome is the one abided by, not the one doing the abiding.

+*=ph_let=* + +

This phrase creates a new temporary variable, starting it with the value supplied. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Examples:

+ +

+let outer bull be 25; +
let the current appearance be "reddish brown"; +
let the special room be Marley Wood; +

+ +

The kinds of these are deduced from the values given, so that, for instance,

+ +

+say "The outer bull scores [the outer bull in words] when you practice archery in [special room]." +

+ +

produces

+ +

+The outer bull scores twenty-five when you practice archery in Marley Wood. +

+ +

The variable name should be a new one; if it's the name of an existing one, then the kinds must agree. So:

+ +

+let outer bull be 25; +
let outer bull be 50; +

+ +

is a legal combination, because the second "let" simply changes the value of the existing "outer bull" variable to a different number.

+ +*=ph_letdefault=* + +

This phrase creates a new temporary variable of the given kind. The variable lasts only for the present block of phrases, which certainly means that it lasts only for the current rule. Example:

+ +

+let inner bull be a number; +

+ +

The variable created holding the default value for that kind - in this case, the number 0. A handful of very obscure kinds have no default values, and then a problem message is produced. Inform also disallows:

+ +

+let the conveyance be a vehicle; +

+ +

because temporary variables aren't allowed to have kinds more specific than "object". (This is a good thing: suppose there are no vehicles in the world?) It's quite safe in such cases to use

+ +

+let the conveyance be an object; +

+ +

instead, which creates it as the special object value "nothing".

+ +*=phs_realplaces=* + +

This text substitution writes out the number to the given number of decimal places. Examples:

+ +

+"The semicircle is roughly [pi to 3 decimal places] paces around." +

+ +

produces "The semicircle is roughly 3.142 paces around." The number of places can only usefully be from 1 to 8. Note that, for example, "[1.235 x 10^-7 to 3 decimal places]" produces 0.0; "[1.235 x 10^8 to 3 decimal places]"...

+ +*=phs_decimal=* + +

This text substitution writes out the number in decimal form, that is, avoiding "x 10^n" even for very large or very small quantities. For example,

+ +

+"[1.23457 x 10^8 in decimal notation]" +

+ +

produces 123457000.0 rather than 1.23457 x 10^8. This can look pretty extreme: for example, "[1.8986 x 10^27 in decimal notation]", the mass of the planet Jupiter in kilograms, produces 1898597440000000000000000000.0.

+ +*=phs_decimalplaces=* + +

This text substitution writes out the number in decimal form, but rounding to the accuracy given.

+ +*=phs_scientific=* + +

This text substitution writes out the number in scientific form, that is, using "x 10^n" even for easy-to-judge quantities. For example,

+ +

+"[the reciprocal of 137 in scientific notation]" +

+ +

produces 7.29927 x 10^-3 rather than 0.0073. This can look odd: for example, "[pi in scientific notation]" comes out as 3.14159 × 10^0 rather than 3.14159.

+ +*=phs_scientificplaces=* + +

This text substitution writes out the number in scientific form, but rounding to the accuracy given.

+ diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Classic/index.html b/retrospective/6L38/Internal/Templates/Classic/index.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Classic/index.html rename to retrospective/6L38/Internal/Templates/Classic/index.html diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Classic/source.html b/retrospective/6L38/Internal/Templates/Classic/source.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Classic/source.html rename to retrospective/6L38/Internal/Templates/Classic/source.html diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Parchment/(manifest).txt b/retrospective/6L38/Internal/Templates/Parchment/(manifest).txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Parchment/(manifest).txt rename to retrospective/6L38/Internal/Templates/Parchment/(manifest).txt diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Parchment/jquery.min.js b/retrospective/6L38/Internal/Templates/Parchment/jquery.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Parchment/jquery.min.js rename to retrospective/6L38/Internal/Templates/Parchment/jquery.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Parchment/parchment.min.css b/retrospective/6L38/Internal/Templates/Parchment/parchment.min.css similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Parchment/parchment.min.css rename to retrospective/6L38/Internal/Templates/Parchment/parchment.min.css diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Parchment/parchment.min.js b/retrospective/6L38/Internal/Templates/Parchment/parchment.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Parchment/parchment.min.js rename to retrospective/6L38/Internal/Templates/Parchment/parchment.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Parchment/zvm.min.js b/retrospective/6L38/Internal/Templates/Parchment/zvm.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Parchment/zvm.min.js rename to retrospective/6L38/Internal/Templates/Parchment/zvm.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/(manifest).txt b/retrospective/6L38/Internal/Templates/Quixe/(manifest).txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/(manifest).txt rename to retrospective/6L38/Internal/Templates/Quixe/(manifest).txt diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/dialog.css b/retrospective/6L38/Internal/Templates/Quixe/dialog.css similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/dialog.css rename to retrospective/6L38/Internal/Templates/Quixe/dialog.css diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/glkote.css b/retrospective/6L38/Internal/Templates/Quixe/glkote.css similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/glkote.css rename to retrospective/6L38/Internal/Templates/Quixe/glkote.css diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/glkote.min.js b/retrospective/6L38/Internal/Templates/Quixe/glkote.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/glkote.min.js rename to retrospective/6L38/Internal/Templates/Quixe/glkote.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/quixe.min.js b/retrospective/6L38/Internal/Templates/Quixe/quixe.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/quixe.min.js rename to retrospective/6L38/Internal/Templates/Quixe/quixe.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Quixe/waiting.gif b/retrospective/6L38/Internal/Templates/Quixe/waiting.gif similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Quixe/waiting.gif rename to retrospective/6L38/Internal/Templates/Quixe/waiting.gif diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Standard/index.html b/retrospective/6L38/Internal/Templates/Standard/index.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Standard/index.html rename to retrospective/6L38/Internal/Templates/Standard/index.html diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Standard/play.html b/retrospective/6L38/Internal/Templates/Standard/play.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Standard/play.html rename to retrospective/6L38/Internal/Templates/Standard/play.html diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Standard/source.html b/retrospective/6L38/Internal/Templates/Standard/source.html similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Standard/source.html rename to retrospective/6L38/Internal/Templates/Standard/source.html diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Standard/style.css b/retrospective/6L38/Internal/Templates/Standard/style.css similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Standard/style.css rename to retrospective/6L38/Internal/Templates/Standard/style.css diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Vorple/(manifest).txt b/retrospective/6L38/Internal/Templates/Vorple/(manifest).txt similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Vorple/(manifest).txt rename to retrospective/6L38/Internal/Templates/Vorple/(manifest).txt diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Vorple/soundmanager2.swf b/retrospective/6L38/Internal/Templates/Vorple/soundmanager2.swf similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Vorple/soundmanager2.swf rename to retrospective/6L38/Internal/Templates/Vorple/soundmanager2.swf diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Vorple/vorple.css b/retrospective/6L38/Internal/Templates/Vorple/vorple.css similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Vorple/vorple.css rename to retrospective/6L38/Internal/Templates/Vorple/vorple.css diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Vorple/vorple.parchment.min.js b/retrospective/6L38/Internal/Templates/Vorple/vorple.parchment.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Vorple/vorple.parchment.min.js rename to retrospective/6L38/Internal/Templates/Vorple/vorple.parchment.min.js diff --git a/retrospective/6L30/Extensions/Reserved/Templates/Vorple/zvm.min.js b/retrospective/6L38/Internal/Templates/Vorple/zvm.min.js similarity index 100% rename from retrospective/6L30/Extensions/Reserved/Templates/Vorple/zvm.min.js rename to retrospective/6L38/Internal/Templates/Vorple/zvm.min.js diff --git a/retrospective/6L30/Outcome Pages/failed.html b/retrospective/6L38/Outcome Pages/failed.html similarity index 100% rename from retrospective/6L30/Outcome Pages/failed.html rename to retrospective/6L38/Outcome Pages/failed.html diff --git a/retrospective/6L30/Outcome Pages/pl404.html b/retrospective/6L38/Outcome Pages/pl404.html similarity index 100% rename from retrospective/6L30/Outcome Pages/pl404.html rename to retrospective/6L38/Outcome Pages/pl404.html diff --git a/retrospective/6L30/Outcome Pages/released.html b/retrospective/6L38/Outcome Pages/released.html similarity index 100% rename from retrospective/6L30/Outcome Pages/released.html rename to retrospective/6L38/Outcome Pages/released.html diff --git a/retrospective/6L30/Outcome Pages/rtp.html b/retrospective/6L38/Outcome Pages/rtp.html similarity index 100% rename from retrospective/6L30/Outcome Pages/rtp.html rename to retrospective/6L38/Outcome Pages/rtp.html diff --git a/retrospective/6L30/Outcome Pages/texts.txt b/retrospective/6L38/Outcome Pages/texts.txt similarity index 100% rename from retrospective/6L30/Outcome Pages/texts.txt rename to retrospective/6L38/Outcome Pages/texts.txt diff --git a/retrospective/6L30/cBlorb.c b/retrospective/6L38/cBlorb.c similarity index 100% rename from retrospective/6L30/cBlorb.c rename to retrospective/6L38/cBlorb.c diff --git a/retrospective/6L30/ni.c b/retrospective/6L38/ni.c similarity index 95% rename from retrospective/6L30/ni.c rename to retrospective/6L38/ni.c index df1c2f6ae..0bc9ef587 100644 --- a/retrospective/6L30/ni.c +++ b/retrospective/6L38/ni.c @@ -7,16 +7,18 @@ #include #include #include +#include #include #include #define NI_VERSION "Inform 7" -#define NI_BUILD "6L30" +#define NI_BUILD "6L38" #define PREFORM_PUNCTUATION_MARKS "{}[]_^?&\\" #define TRUE 1 #define FALSE 0 #define NOT_APPLICABLE 2 #define UTF8_ENC 1 /* Write as UTF-8 without BOM */ #define ISO_ENC 2 /* Write as ISO Latin-1 (i.e., no conversion needed) */ +#define MAX_FILENAME_LENGTH 1025 #define MEMORY_MANAGEMENT \ int allocation_id; /* Numbered from 0 upwards in creation order */\ void *next_structure; /* Next object in double-linked list */\ @@ -180,7 +182,9 @@ #define local_variable_array_MT 160 #define slash_gpr_MT 161 #define relation_guard_MT 162 -#define NO_MEMORY_TYPES 163 /* must be 1 more than the highest |_MT| constant above */ +#define filename_MT 163 +#define pathname_MT 164 +#define NO_MEMORY_TYPES 165 /* must be 1 more than the highest |_MT| constant above */ #define SAFETY_MARGIN 32 #define BLANK_END_SIZE 128 #define MAX_BLOCKS_ALLOWED 10000 @@ -259,7 +263,8 @@ #define COMPILATION_SIZE_MREASON 10 #define OBJECT_COMPILATION_MREASON 11 #define DOC_FRAGMENT_MREASON 12 -#define NUMBER_OF_MREASONS 13 +#define FILENAME_STORAGE_MREASON 13 +#define NUMBER_OF_MREASONS 14 #define NULL_GENERAL_POINTER (Memory__store_gp_null()) #define GENERAL_POINTER_IS_NULL(gp) (Memory__test_gp_null(gp)) #define COMPARE_GENERAL_POINTERS(gp1, gp2)\ @@ -463,16 +468,10 @@ rt(data1, data2);\ break;\ } -#define I6_OUTPUT_LEAFNAME "auto.inf" -#define DEBUG_LOG_LEAFNAME "Debug log.txt" -#define PROBLEM_LOG_LEAFNAME "Problems.html" -#define XML_HEADINGS_LEAFNAME "Headings.xml" -#define METADATA_LEAFNAME "Metadata.iFiction" -#define UUID_LEAFNAME "uuid.txt" -#define BLURB_LEAFNAME "Release.blurb" -#define MANIFEST_LEAFNAME "manifest.plist" -#define EPSMAP_LEAFNAME "Map.eps" -#define MAX_FILENAME_LENGTH 522 /* Assuming no leafname exceeds 255 characters */ +#define NO_FS_AREAS 3 +#define MATERIALS_FS_AREA 0 /* must match |ORIGIN_WAS_*| constants minus 1 */ +#define EXTERNAL_FS_AREA 1 +#define INTERNAL_FS_AREA 2 #define CENTRED_OUTCOME_IMAGE_STYLE 1 #define SIDE_OUTCOME_IMAGE_STYLE 2 #define SOURCE_REF_CHAR '\xf0' @@ -817,7 +816,7 @@ #define I6_INCLUSION_KW 3 #define MANDATORY_INSERTED_TEXT "Include the Standard Rules by Graham Nelson.\n\n" #define ORIGIN_WAS_PRIMARY_SOURCE 0 -#define ORIGIN_WAS_MATERIALS_EXTENSIONS_AREA 1 +#define ORIGIN_WAS_MATERIALS_EXTENSIONS_AREA 1 /* must match |*_FS_AREA| numbers plus 1 */ #define ORIGIN_WAS_USER_EXTENSIONS_AREA 2 #define ORIGIN_WAS_BUILT_IN_EXTENSIONS_AREA 3 #define compare_word(w, voc) (Lexer__word(w) == (voc)) @@ -998,6 +997,7 @@ #define DICTIONARY_REFERRED_EIDBC 2 #define HYPOTHETICAL_EIDBC 3 #define USEWITH_EIDBC 4 +#define RESERVED_AUTHOR_NAME "Reserved" #define MAX_TITLING_LINE_LENGTH 501 /* lots, allowing for an improbably large number of virtual machine restrictions */ #define LONGEST_POSSIBLE_CENSUS_ERROR MAX_TITLING_LINE_LENGTH*2 #define CE_BY_TITLE 1 @@ -2249,7 +2249,7 @@ PC->next = new;\ }\ } -#line 74 "inform7/Chapter 2/Memory.w" +#line 72 "inform7/Chapter 2/Memory.w" typedef struct simple_memory_claim { void *memory_claimed; /* position in memory of the array allocated */ int extent_of_claim; /* total number of bytes making it up */ @@ -2281,7 +2281,7 @@ typedef struct memory_frame { int mem_type; /* type of object stored in this frame */ int allocation_id; /* allocation ID number of object stored in this frame */ } memory_frame; -#line 1155 "inform7/Chapter 2/Memory.w" +#line 1159 "inform7/Chapter 2/Memory.w" typedef struct general_pointer { void *pointer_to_data; int run_time_type_code; @@ -2313,7 +2313,20 @@ typedef struct debugging_aspect { int on_or_off; /* whether or not active when writing to debugging log */ int alternate; /* whether or not active when writing in trace mode */ } debugging_aspect; -#line 1036 "inform7/Chapter 4/HTML Files.w" +#line 44 "inform7/Chapter 3/Pathnames.w" +typedef struct pathname { + char *intermediate; + struct pathname *pathname_of_parent; + int known_to_exist; /* corresponds to a directory in the filing system */ + MEMORY_MANAGEMENT +} pathname; +#line 18 "inform7/Chapter 3/Filenames.w" +typedef struct filename { + struct pathname *pathname_of_location; + char *leafname; + MEMORY_MANAGEMENT +} filename; +#line 1045 "inform7/Chapter 4/HTML Files.w" typedef struct colour_translation { char *chip_name; char *html_colour; @@ -2376,7 +2389,7 @@ typedef struct problem_quotation { void *structure_quoted; /* except for S and W, when this is null */ int range_quoted_w1, range_quoted_w2; /* for S and W only */ } problem_quotation; -#line 38 "inform7/Chapter 7/Vocabulary.w" +#line 35 "inform7/Chapter 7/Vocabulary.w" typedef struct vocabulary_entry { unsigned int flags; /* bitmap of "meaning codes" indicating possible usages */ int literal_number_value; /* evaluation as a literal number, if any */ @@ -2430,7 +2443,7 @@ typedef struct plural_dictionary_entry { } plural_dictionary_entry; #line 38 "inform7/Chapter 7/Natural Languages.w" typedef struct natural_language { - char nl_bundle_path[MAX_FILENAME_LENGTH]; /* pathname of the bundle folder */ + struct pathname *nl_bundle_path; /* pathname of the bundle folder */ int word_ref1, word_ref2; /* instance name, e.g., "German language" */ struct instance *nl_instance; /* instance, e.g., "German language" */ int language_field_w1[MAX_LANGUAGE_FIELDS]; /* contents of the |about.txt| fields */ @@ -2439,7 +2452,7 @@ typedef struct natural_language { int adaptive_person; /* which person (one of constants below) text subs are written from */ MEMORY_MANAGEMENT } natural_language; -#line 358 "inform7/Chapter 7/Preform.w" +#line 354 "inform7/Chapter 7/Preform.w" typedef struct range_requirement { int no_requirements; int ditto_flag; @@ -2450,7 +2463,7 @@ typedef struct range_requirement { int FW_req; int FS_req; } range_requirement; -#line 158 "inform7/Chapter 7/Preform.w" +#line 154 "inform7/Chapter 7/Preform.w" typedef struct nonterminal { struct vocabulary_entry *nonterminal_id; /* e.g. |""| */ int voracious; /* if true, scans whole rest of word range */ @@ -2478,7 +2491,7 @@ typedef struct nonterminal { int nonterminal_matches; /* ditto */ MEMORY_MANAGEMENT } nonterminal; -#line 191 "inform7/Chapter 7/Preform.w" +#line 187 "inform7/Chapter 7/Preform.w" typedef struct production_list { struct natural_language *definition_language; struct production *first_production; @@ -2486,7 +2499,7 @@ typedef struct production_list { struct match_avinue *as_avinue; /* when compiled to a trie rather than for Preform */ MEMORY_MANAGEMENT } production_list; -#line 239 "inform7/Chapter 7/Preform.w" +#line 235 "inform7/Chapter 7/Preform.w" typedef struct production { struct ptoken *first_ptoken; /* the linked list of ptokens */ int match_number; /* 0 for |/a/|, 1 for |/b/| and so on */ @@ -2508,7 +2521,7 @@ typedef struct production { struct production *next_production; /* within its production list */ MEMORY_MANAGEMENT } production; -#line 293 "inform7/Chapter 7/Preform.w" +#line 289 "inform7/Chapter 7/Preform.w" typedef struct ptoken { int ptoken_category; /* one of the |*_PTC| values */ @@ -2536,13 +2549,13 @@ typedef struct ptoken { struct ptoken *next_ptoken; /* within its production list */ MEMORY_MANAGEMENT } ptoken; -#line 61 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 59 "inform7/Chapter 7/Non-Parsing Preform.w" typedef struct verb_tabulation { struct word_assemblage to_be_auxiliary; /* use this if non-empty */ struct word_assemblage vc_text[NO_KNOWN_TENSES][2][6]; int modal_auxiliary_usage[NO_KNOWN_TENSES][2][6]; } verb_tabulation; -#line 48 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 46 "inform7/Chapter 7/Non-Parsing Preform.w" typedef struct verb_conjugation { struct word_assemblage infinitive; /* not counting the "to", in English */ struct word_assemblage past_participle; @@ -2698,7 +2711,7 @@ typedef struct literal_pattern_name { int lpn_compiled_already; MEMORY_MANAGEMENT } literal_pattern_name; -#line 67 "inform7/Chapter 10/Excerpt Meanings.w" +#line 65 "inform7/Chapter 10/Excerpt Meanings.w" typedef struct excerpt_meaning { unsigned int meaning_code; /* what kind of meaning: a single MC, not a bitmap */ unsigned int secondary_code; /* relevant only if the MC is |MISCELLANEOUS_MC| */ @@ -2772,7 +2785,7 @@ typedef struct nonlocal_variable { MEMORY_MANAGEMENT } nonlocal_variable; -#line 138 "inform7/Chapter 11/Binary Predicates.w" +#line 132 "inform7/Chapter 11/Binary Predicates.w" typedef struct bp_term_details { int word_ref1, word_ref2; /* "(called...)" name, if any exists */ struct inference_subject *implies_infs; /* the domain of values allowed */ @@ -2780,7 +2793,7 @@ typedef struct bp_term_details { struct i6_schema *function_of_other; /* the function $f_0$ or $f_1$ as above */ char *index_term_as; /* usually null, but if not, used in Phrasebook index */ } bp_term_details; -#line 205 "inform7/Chapter 11/Binary Predicates.w" +#line 199 "inform7/Chapter 11/Binary Predicates.w" typedef struct binary_predicate { int relation_family; /* one of the |*_KBP| constants defined below */ int form_of_relation; /* one of the |Relation_*| constants defined below */ @@ -2861,12 +2874,12 @@ typedef struct preposition_usage { int allow_unexpected_upper_case; /* for preps like "in Cahoots With" */ MEMORY_MANAGEMENT } preposition_usage; -#line 47 "inform7/Chapter 12/Lexer.w" +#line 41 "inform7/Chapter 12/Lexer.w" typedef struct source_location { struct source_file *file_of_origin; /* or |NULL| if internally written and not from a file */ int line_number; /* counting upwards from 1 within file (if any) */ } source_location; -#line 205 "inform7/Chapter 12/Lexer.w" +#line 199 "inform7/Chapter 12/Lexer.w" typedef struct lexer_details { char *lw_text; /* text of word after treatment to normalise */ char *lw_rawtext; /* original untouched text of word */ @@ -2876,8 +2889,7 @@ typedef struct lexer_details { } lexer_details; #line 39 "inform7/Chapter 12/Read Source Text.w" typedef struct source_file { - char filename[MAX_FILENAME_LENGTH]; - char leafname[MAX_FILENAME_LENGTH]; + struct filename *name; int words_of_source; /* word count, omitting comments and verbatim matter */ int last_lexed_word; /* number of final word lexed */ int words_of_quoted_text; /* word count for text in double-quotes */ @@ -2901,7 +2913,7 @@ typedef struct parse_node_annotation { general_pointer annotation_pointer; struct parse_node_annotation *next_annotation; } parse_node_annotation; -#line 79 "inform7/Chapter 13/Verify Parse Tree.w" +#line 77 "inform7/Chapter 13/Verify Parse Tree.w" typedef struct parse_tree_node_type { char *node_type_name; /* text of name of type, such as |"COMMAND_NT"| */ int min_children; /* minimum legal number of child nodes */ @@ -2910,7 +2922,7 @@ typedef struct parse_tree_node_type { int required_parent_node_type; /* required node type of parent, or |-1| */ int allow_in_assertions; /* allow this on either side of an assertion? */ } parse_tree_node_type; -#line 27 "inform7/Chapter 14/Extension Identifiers.w" +#line 23 "inform7/Chapter 14/Extension Identifiers.w" typedef struct extension_identifier { char author_name[MAX_EXTENSION_AUTHOR_LENGTH]; char raw_author_name[MAX_EXTENSION_AUTHOR_LENGTH]; @@ -2953,7 +2965,7 @@ typedef struct control_structure_phrase { int allow_run_on; MEMORY_MANAGEMENT } control_structure_phrase; -#line 163 "inform7/Chapter 14/Extension Files.w" +#line 160 "inform7/Chapter 14/Extension Files.w" typedef struct extension_file { struct extension_identifier ef_id; /* Texts of title and author with hash code */ int author_w1, author_w2; /* Author's name */ @@ -2972,7 +2984,7 @@ typedef struct extension_file { char extra_credit_as_lexed[MAX_RUBRIC_LENGTH+1]; MEMORY_MANAGEMENT } extension_file; -#line 50 "inform7/Chapter 14/Extension Identifiers.w" +#line 46 "inform7/Chapter 14/Extension Identifiers.w" typedef struct extension_identifier_database_entry { struct extension_identifier *eide_id; struct extension_identifier_database_entry *hash_next; /* next one in hashed EID database */ @@ -2981,7 +2993,7 @@ typedef struct extension_identifier_database_entry { char sort_usage_date[64]; char word_count_text[64]; } extension_identifier_database_entry; -#line 23 "inform7/Chapter 14/Extension Census.w" +#line 22 "inform7/Chapter 14/Extension Census.w" typedef struct extension_census_datum { struct extension_identifier ecd_id; /* title, author, hash code */ char version_text[MAX_VERSION_NUMBER_LENGTH+1]; /* such as |23| or |14/060527| */ @@ -2989,7 +3001,7 @@ typedef struct extension_census_datum { int built_in; /* found in the Inform 7 application's private stock */ int project_specific; /* found in the Materials folder for the current project */ int overriding_a_built_in_extension; /* not built in, but overriding one which is */ - char *domain; /* pathname of the stock in which this was found */ + pathname *domain; /* pathname of the stock in which this was found */ char rubric[MAX_RUBRIC_LENGTH+1]; /* brief description found in opening lines */ struct extension_census_datum *next; /* next one in lexicographic order */ MEMORY_MANAGEMENT @@ -3047,7 +3059,7 @@ typedef struct assemblies_data { struct inference_subject *named_after; /* name derived from another: e.g. "Jane's nose" */ int named_after_w1, named_after_w2; /* text of the derived part, e.g. "nose" */ } assemblies_data; -#line 23 "inform7/Chapter 15/Implications.w" +#line 22 "inform7/Chapter 15/Implications.w" typedef struct implication { struct pcalc_prop *if_spec; /* which objects are affected */ struct parse_node *then_pn; /* what assertion is implied about them */ @@ -3055,12 +3067,12 @@ typedef struct implication { struct implication *next_implication; /* in list of implications */ MEMORY_MANAGEMENT } implication; -#line 34 "inform7/Chapter 15/Implications.w" +#line 33 "inform7/Chapter 15/Implications.w" typedef struct possession_marker { int possessed; /* temporary use when checking implications about objects */ int possession_certainty; /* ditto */ } possession_marker; -#line 123 "inform7/Chapter 16/Meaning Lists.w" +#line 119 "inform7/Chapter 16/Meaning Lists.w" typedef struct meaning_list { int expiry_time; /* an integer measured in creation "cycles": see below */ unsigned int production; /* a production code */ @@ -3074,7 +3086,7 @@ typedef struct meaning_list { struct meaning_list *child; MEMORY_MANAGEMENT } meaning_list; -#line 57 "inform7/Chapter 17/Terms.w" +#line 38 "inform7/Chapter 17/Terms.w" typedef struct pcalc_term { int variable; /* 0 to 25, or |-1| for "not a variable" */ struct specification *constant; /* or |NULL| for "not a constant" */ @@ -3082,13 +3094,13 @@ typedef struct pcalc_term { int cinder; /* complicated, this: used to worry about scope of I6 local variables */ struct kind *term_checked_as_kind; /* or |NULL| if unchecked */ } pcalc_term; -#line 81 "inform7/Chapter 17/Terms.w" +#line 62 "inform7/Chapter 17/Terms.w" typedef struct pcalc_func { struct binary_predicate *bp; /* the predicate $B$ such that this is $f_B(t)$ */ struct pcalc_term fn_of; /* the term $t$ such that this is $f_B(t)$ */ int from_term; /* whether $t$ is term 0 or 1 of $B$ */ } pcalc_func; -#line 35 "inform7/Chapter 17/Atomic Propositions.w" +#line 25 "inform7/Chapter 17/Atomic Propositions.w" typedef struct pcalc_prop { int element; /* one of the constants below: always 1 or greater */ int arity; /* 1 for quantifiers and unary predicates; 2 for BPs; 0 otherwise */ @@ -3100,11 +3112,11 @@ typedef struct pcalc_prop { int calling_data; /* |CALLED_ATOM|: compacted form of a word range */ struct pcalc_prop *next; /* next atom in the list for this proposition */ } pcalc_prop; -#line 31 "inform7/Chapter 17/Type Check Propositions.w" +#line 27 "inform7/Chapter 17/Type Check Propositions.w" typedef struct variable_type_assignment { struct kind *assigned_kinds[26]; /* one for each of the 26 variables */ } variable_type_assignment; -#line 38 "inform7/Chapter 17/Type Check Propositions.w" +#line 34 "inform7/Chapter 17/Type Check Propositions.w" typedef struct tc_problem_kit { int issue_error; int ew1, ew2; @@ -3112,7 +3124,7 @@ typedef struct tc_problem_kit { int log_to_I6_text; int flag_problem; } tc_problem_kit; -#line 27 "inform7/Chapter 18/Compile Atoms.w" +#line 22 "inform7/Chapter 18/Compile Atoms.w" typedef struct annotated_i6_schema { struct i6_schema *schema; int negate_schema; /* true if atom is to be tested with the opposite parity */ @@ -3120,7 +3132,7 @@ typedef struct annotated_i6_schema { struct pcalc_term pt1; int involves_action_variables; } annotated_i6_schema; -#line 35 "inform7/Chapter 18/Deciding to Defer.w" +#line 33 "inform7/Chapter 18/Deciding to Defer.w" typedef struct pcalc_prop_deferral { int reason; /* what we intend to do with it: one of the reasons above */ struct pcalc_prop *proposition_to_defer; /* the proposition */ @@ -3130,14 +3142,14 @@ typedef struct pcalc_prop_deferral { int rtp_constant_needed; /* compile a string of the origin text for run-time problems? */ MEMORY_MANAGEMENT } pcalc_prop_deferral; -#line 259 "inform7/Chapter 19/Kinds.w" +#line 257 "inform7/Chapter 19/Kinds.w" typedef struct kind { struct kind_constructor *construct; /* which can never be |NULL| */ int kind_variable_number; /* only used if construct is |CON_KIND_VARIABLE| */ struct unit_sequence *intermediate_result; /* only used if construct is |CON_INTERMEDIATE| */ struct kind *kc_args[MAX_KIND_CONSTRUCTION_ARITY]; /* used if arity positive, or for |CON_KIND_VARIABLE| */ } kind; -#line 104 "inform7/Chapter 19/Kind Checking.w" +#line 100 "inform7/Chapter 19/Kind Checking.w" typedef struct kind_variable_declaration { int kv_number; /* must be from 1 to 26 */ struct kind *kv_value; /* must be a definite non-|NULL| kind */ @@ -3159,7 +3171,7 @@ typedef struct unit_sequence { struct unit_pair unit_pairs[MAX_BASE_UNITS_IN_SEQUENCE]; int scaling_factor; /* see discussion of scaling below */ } unit_sequence; -#line 36 "inform7/Chapter 19/Kind Constructors.w" +#line 34 "inform7/Chapter 19/Kind Constructors.w" typedef struct kind_constructor { struct nametag *dt_tag; /* text of name */ int group; /* one of the four values above */ @@ -3236,7 +3248,7 @@ typedef struct kind_constructor { MEMORY_MANAGEMENT } kind_constructor; -#line 69 "inform7/Chapter 19/Kind Interpreter.w" +#line 66 "inform7/Chapter 19/Kind Interpreter.w" typedef struct single_kind_command { struct kind_command_definition *which_kind_command; int boolean_argument; /* where appropriate */ @@ -3248,45 +3260,45 @@ typedef struct single_kind_command { struct kind_template_definition *template_argument; /* where appropriate */ struct kind_macro_definition *macro_argument; /* where appropriate */ } single_kind_command; -#line 92 "inform7/Chapter 19/Kind Interpreter.w" +#line 89 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_constructor_casting_rule { char cast_from_kind_unparsed[32]; /* to the one which has the rule */ struct kind_constructor *cast_from_kind; /* to the one which has the rule */ struct kind_constructor_casting_rule *next_casting_rule; } kind_constructor_casting_rule; -#line 102 "inform7/Chapter 19/Kind Interpreter.w" +#line 99 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_constructor_comparison_schema { char comparator_unparsed[32]; struct kind_constructor *comparator; char *comparison_schema; struct kind_constructor_comparison_schema *next_comparison_schema; } kind_constructor_comparison_schema; -#line 113 "inform7/Chapter 19/Kind Interpreter.w" +#line 110 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_constructor_instance { char instance_of_this_unparsed[32]; struct kind_constructor *instance_of_this; struct kind_constructor_instance *next_instance_rule; } kind_constructor_instance; -#line 176 "inform7/Chapter 19/Kind Interpreter.w" +#line 173 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_command_definition { char *text_of_command; int opcode_number; int operand_type; } kind_command_definition; -#line 185 "inform7/Chapter 19/Kind Interpreter.w" +#line 182 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_template_definition { char *template_name; /* including the asterisk, e.g., |"*PRINTING-ROUTINE"| */ char *template_text; MEMORY_MANAGEMENT } kind_template_definition; -#line 191 "inform7/Chapter 19/Kind Interpreter.w" +#line 188 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_macro_definition { char *kind_macro_name; /* including the sharp, e.g., |"#UNIT"| */ int kind_macro_line_count; struct single_kind_command kind_macro_line[MAX_KIND_MACRO_LENGTH]; MEMORY_MANAGEMENT } kind_macro_definition; -#line 203 "inform7/Chapter 19/Kind Interpreter.w" +#line 200 "inform7/Chapter 19/Kind Interpreter.w" typedef struct kind_template_obligation { struct kind_template_definition *remembered_template; /* I7 source to insert... */ struct kind_constructor *remembered_constructor; /* ...concerning this kind */ @@ -3361,7 +3373,7 @@ typedef struct inv_token_problem_token { int already_described; MEMORY_MANAGEMENT } inv_token_problem_token; -#line 34 "inform7/Chapter 21/Properties.w" +#line 31 "inform7/Chapter 21/Properties.w" typedef struct property { int word_ref1, word_ref2; /* name of property */ int ambiguous_name; /* does this look like a property test, e.g., "point of view"? */ @@ -3682,7 +3694,7 @@ typedef struct outcomes { struct rulebook_outcome *named_outcomes; struct kind *value_outcome_kind; } outcomes; -#line 51 "inform7/Chapter 27/Rulebooks.w" +#line 50 "inform7/Chapter 27/Rulebooks.w" typedef struct rulebook { int word_ref1, word_ref2; /* name in source text */ int alt_word_ref1, alt_word_ref2; /* alternative form of name */ @@ -3705,7 +3717,7 @@ typedef struct rulebook { char rb_I6_identifier[32]; /* I6 identifier name for array holding contents */ MEMORY_MANAGEMENT } rulebook; -#line 78 "inform7/Chapter 27/Rulebooks.w" +#line 77 "inform7/Chapter 27/Rulebooks.w" typedef struct rulebook_match { struct rulebook *matched_rulebook; int match_from; @@ -3715,7 +3727,7 @@ typedef struct rulebook_match { int article_used; int placement_requested; } rulebook_match; -#line 94 "inform7/Chapter 27/Rulebooks.w" +#line 93 "inform7/Chapter 27/Rulebooks.w" typedef struct placement_affecting { struct parse_node *placement_sentence; struct placement_affecting *next; @@ -3789,14 +3801,14 @@ typedef struct activity_crossref { struct phrase *rule_dependent; struct activity_crossref *next; } activity_crossref; -#line 69 "inform7/Chapter 28/Phrase Type Data.w" +#line 65 "inform7/Chapter 28/Phrase Type Data.w" typedef struct phrase_token { int word_ref1, word_ref2; /* name */ struct specification *to_match; /* what we expect to find here */ struct kind *token_kind; int name_of_a_kind; /* |TRUE| if a name of a kind of value is the value */ } phrase_token; -#line 102 "inform7/Chapter 28/Phrase Type Data.w" +#line 98 "inform7/Chapter 28/Phrase Type Data.w" typedef struct say_details { int say_phrase; /* one of the three |*_SAY_PHRASE| values */ int say_phrase_running_on; /* ignore implied newlines in previous invocation */ @@ -3805,7 +3817,7 @@ typedef struct say_details { int say_phrase_stream_closing_token_at; /* ditto for choice of ending */ int say_control_structure; /* one of the four |*_SAY_CS| values below */ } say_details; -#line 137 "inform7/Chapter 28/Phrase Type Data.w" +#line 133 "inform7/Chapter 28/Phrase Type Data.w" typedef struct inline_details { int invoked_inline_not_as_call; /* if |FALSE|, none of the rest applies */ @@ -3816,7 +3828,7 @@ typedef struct inline_details { int block_follows; /* for inline phrases only: followed by a begin... end block? */ char *only_in_loop; /* if not null, the phrase can only be used in this block */ } inline_details; -#line 48 "inform7/Chapter 28/Phrase Type Data.w" +#line 44 "inform7/Chapter 28/Phrase Type Data.w" typedef struct ph_type_data { int register_w1, register_w2; /* words used to register the excerpt meaning */ int word_sequence[MAX_WORDS_PER_PHRASE]; /* the "word sequence": see above */ @@ -3833,7 +3845,7 @@ typedef struct ph_type_data { int now_deprecated; /* is this a phrase likely to be withdrawn in future? */ } ph_type_data; -#line 22 "inform7/Chapter 28/Phrase Usage.w" +#line 21 "inform7/Chapter 28/Phrase Usage.w" typedef struct ph_usage_data { int full_preamble_w1, full_preamble_w2; /* e.g. to identify nameless rules in the log */ struct constant_phrase *constant_phrase_holder; /* for named To... phrases */ @@ -3886,7 +3898,7 @@ typedef struct action_pattern { struct action_pattern *next; /* for forming APs into linked lists */ } action_pattern; -#line 28 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 27 "inform7/Chapter 28/Phrase Runtime Context Data.w" typedef struct ph_runtime_context_data { int activity_context_w1, activity_context_w2; /* happens only while any activities go on? */ struct parse_node *activity_where; /* and who says? */ @@ -3925,7 +3937,7 @@ typedef struct ph_options_data { int options_w1, options_w2; /* the text declaring the whole set of options */ int multiple_options_permitted; /* can be combined, or mutually exclusive? */ } ph_options_data; -#line 69 "inform7/Chapter 28/Phrases.w" +#line 51 "inform7/Chapter 28/Phrases.w" typedef struct phrase { struct parse_node *declaration_node; /* |ROUTINE_NT| node where declared */ int inline_wn; /* word number of inline I6 definition, or |-1| if not inline */ @@ -4000,7 +4012,7 @@ typedef struct local_variable { struct local_variable *next; /* on the same slate */ MEMORY_MANAGEMENT } local_variable; -#line 36 "inform7/Chapter 30/Phrase Blocks.w" +#line 35 "inform7/Chapter 30/Phrase Blocks.w" typedef struct phrase_block { struct phrase *from_phrase; /* e.g., "if" or "while" */ struct parse_node *block_location; /* where block begins */ @@ -4009,7 +4021,7 @@ typedef struct phrase_block { int division_count[MAX_DIVISION_FORMS]; /* number of block divisions of different sorts */ int label_following; /* or -1 if none is used */ } phrase_block; -#line 31 "inform7/Chapter 30/Phrase Blocks.w" +#line 30 "inform7/Chapter 30/Phrase Blocks.w" typedef struct block_stack { int pb_sp; /* stack pointer for the block stack which follows: */ struct phrase_block pb_stack[MAX_BLOCK_NESTING+1]; @@ -4042,17 +4054,17 @@ typedef struct past_tense_action_record { struct parse_node *where_pta_tested; /* sentence in which AP is found */ MEMORY_MANAGEMENT } past_tense_action_record; -#line 71 "inform7/Chapter 31/Invocations.w" +#line 65 "inform7/Chapter 31/Invocations.w" typedef struct invocation_list { struct invocation_list_entry *list_head; struct invocation_list_entry *list_tail; /* storing this makes Inform 5\% faster on large sources */ } invocation_list; -#line 76 "inform7/Chapter 31/Invocations.w" +#line 70 "inform7/Chapter 31/Invocations.w" typedef struct invocation_list_entry { struct invocation *listed_inv; struct invocation_list_entry *next; } invocation_list_entry; -#line 84 "inform7/Chapter 31/Invocations.w" +#line 78 "inform7/Chapter 31/Invocations.w" typedef struct invocation { int inv_packed_record; /* see below: a packed bitmap */ int invocation_w1, invocation_w2; /* text which this invocation interprets */ @@ -4070,12 +4082,12 @@ typedef struct invocation { struct kind *kind_resulting; /* what if anything is returned */ } invocation; -#line 130 "inform7/Chapter 31/Invocations.w" +#line 124 "inform7/Chapter 31/Invocations.w" typedef struct invocation_options { int options; /* bitmap of any phrase options appended */ int options_invoked_w1, options_invoked_w2; /* text of any phrase options appended */ } invocation_options; -#line 146 "inform7/Chapter 31/Invocations.w" +#line 140 "inform7/Chapter 31/Invocations.w" typedef struct invocation_token_list { struct specification *token_to_be_parsed_against; /* how we will find it */ struct specification *token_as_parsed; /* what we find */ @@ -4159,9 +4171,9 @@ typedef struct label_namespace { } label_namespace; #line 48 "inform7/Chapter 33/Release Instructions.w" typedef struct auxiliary_file { - char *leafname_in_materials_folder; /* e.g., "Collegio.pdf" */ + struct filename *name_of_original_file; /* e.g., "Collegio.pdf" */ + struct pathname *folder_to_release_to; /* e.g., "Sounds" */ char *brief_description; /* e.g., "Collegio Magazine" */ - char *foldername_in_release_folder; /* e.g., "hidden_files" */ int from_payload; MEMORY_MANAGEMENT } auxiliary_file; @@ -4197,7 +4209,7 @@ typedef struct regions_data { struct parse_node *in_region_set_at; /* where this is decided */ MEMORY_MANAGEMENT } regions_data; -#line 22 "inform7/Chapter 34/Spatial Geometry.w" +#line 16 "inform7/Chapter 34/Spatial Geometry.w" typedef struct vector { int x, y, z; } vector; @@ -4214,7 +4226,7 @@ typedef struct map_parameter_scope { struct map_parameter_scope *wider_scope; /* that is, the scope above this */ struct plotting_parameter values[NO_MAP_PARAMETERS]; } map_parameter_scope; -#line 29 "inform7/Chapter 34/The Map.w" +#line 25 "inform7/Chapter 34/The Map.w" typedef struct map_data { /* these are meaningful for doors only */ struct instance *map_connection_a; @@ -4244,7 +4256,7 @@ typedef struct map_data { MEMORY_MANAGEMENT } map_data; -#line 50 "inform7/Chapter 34/Spatial Geometry.w" +#line 44 "inform7/Chapter 34/Spatial Geometry.w" typedef struct cuboid { int population; struct vector corner0; @@ -4288,14 +4300,14 @@ typedef struct EPS_map_level { struct map_parameter_scope map_parameters; MEMORY_MANAGEMENT } EPS_map_level; -#line 30 "inform7/Chapter 34/Scenes.w" +#line 28 "inform7/Chapter 34/Scenes.w" typedef struct scene_connector { struct scene *connect_to; /* scene connected to */ int end; /* end number: see above */ struct scene_connector *next; /* next in list of connectors for a scene end */ struct parse_node *where_said; /* where this linkage was specified in source */ } scene_connector; -#line 37 "inform7/Chapter 34/Scenes.w" +#line 35 "inform7/Chapter 34/Scenes.w" typedef struct scene { struct instance *as_instance; /* the constant for the name of the scene */ int once_only; /* cannot repeat during play */ @@ -4312,7 +4324,7 @@ typedef struct scene { struct parse_node *anchor_condition_set[MAX_SCENE_ENDS]; /* where set */ MEMORY_MANAGEMENT } scene; -#line 39 "inform7/Chapter 35/Actions.w" +#line 38 "inform7/Chapter 35/Actions.w" typedef struct action_name { int word_ref1, word_ref2; /* such as "drop" or "take" */ int past_word_ref1, past_word_ref2; /* such as "dropped" or "taken" */ @@ -4344,7 +4356,7 @@ typedef struct action_name { MEMORY_MANAGEMENT } action_name; -#line 16 "inform7/Chapter 35/Action Name Lists.w" +#line 15 "inform7/Chapter 35/Action Name Lists.w" typedef struct action_name_list { struct action_name *action_listed; /* the action in this ANL list entry */ struct named_action_pattern *nap_listed; /* or a named pattern instead */ @@ -4411,12 +4423,12 @@ typedef struct understanding_reference { specification *spec_reference; struct understanding_reference *next; } understanding_reference; -#line 34 "inform7/Chapter 36/Grammar Properties.w" +#line 32 "inform7/Chapter 36/Grammar Properties.w" typedef struct parsing_data { struct grammar_verb *understand_as_this_object; /* grammar for parsing the name at run-time */ MEMORY_MANAGEMENT } parsing_data; -#line 42 "inform7/Chapter 36/Grammar Properties.w" +#line 40 "inform7/Chapter 36/Grammar Properties.w" typedef struct parsing_pp_data { int visibility_level_in_parser; /* if so, does the run-time I6 parser recognise it? */ int visibility_condition_w1, visibility_condition_w2; /* (at least if...?) */ @@ -4533,7 +4545,7 @@ typedef struct internal_test_case { #line 19 "inform7/Chapter 37/Figures.w" typedef struct blorb_figure { int word_ref1, word_ref2; /* text of figure name */ - char path_to_figure[MAX_FILENAME_LENGTH]; /* relative to the Resources folder */ + struct filename *filename_of_image_file; int figure_number; /* resource number of this picture inside Blorb */ int alt_description; /* word number of double-quoted description */ MEMORY_MANAGEMENT @@ -4541,7 +4553,7 @@ typedef struct blorb_figure { #line 20 "inform7/Chapter 37/Sound Effects.w" typedef struct blorb_sound { int word_ref1, word_ref2; /* text of sound name */ - char path_to_sound[MAX_FILENAME_LENGTH]; /* relative to the Resources folder */ + struct filename *filename_of_sound_file; /* relative to the Resources folder */ int sound_number; /* resource number of this picture inside Blorb */ int alt_description; /* word number of double-quoted description */ MEMORY_MANAGEMENT @@ -4587,51 +4599,51 @@ typedef struct plugin_call { void *routine; struct plugin_call *next; } plugin_call; -#line 118 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 120 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__Windows_isdigit(int c) ; -#line 175 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 189 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__mkdir(char *path_to_folder) ; -#line 187 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 201 "inform7/Chapter 1/Platform-Specific Definitions.w" void * Platform__opendir(char *path_to_folder) ; -#line 192 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 206 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__readdir(void *folder, char *path_to_folder, char *leafname) ; -#line 211 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 225 "inform7/Chapter 1/Platform-Specific Definitions.w" void Platform__closedir(void *folder) ; -#line 229 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 243 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__mkdir(char *path_to_folder) ; -#line 241 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 255 "inform7/Chapter 1/Platform-Specific Definitions.w" void * Platform__opendir(char *path_to_folder) ; -#line 246 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 260 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__readdir(void *folder, char *path_to_folder, char *leafname) ; -#line 266 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 280 "inform7/Chapter 1/Platform-Specific Definitions.w" void Platform__closedir(void *folder) ; -#line 298 "inform7/Chapter 1/Platform-Specific Definitions.w" -FILE * Platform__iso_fopen(char *pathname, char *usage) ; -#line 304 "inform7/Chapter 1/Platform-Specific Definitions.w" -FILE * Platform__iso_fopen_caseless(char *pathname, char *usage) ; -#line 314 "inform7/Chapter 1/Platform-Specific Definitions.w" -void Platform__transcode_ISO_string_to_locale(char *from, char *to) ; +#line 312 "inform7/Chapter 1/Platform-Specific Definitions.w" +FILE * Platform__iso_fopen(filename *F, char *usage) ; #line 320 "inform7/Chapter 1/Platform-Specific Definitions.w" +FILE * Platform__iso_fopen_caseless(filename *F, char *usage) ; +#line 332 "inform7/Chapter 1/Platform-Specific Definitions.w" void Platform__transcode_ISO_string_to_locale(char *from, char *to) ; -#line 341 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 338 "inform7/Chapter 1/Platform-Specific Definitions.w" +void Platform__transcode_ISO_string_to_locale(char *from, char *to) ; +#line 359 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__truncated_locale_fgets(FILE *F, char *buffer, int limit) ; -#line 347 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 365 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__truncated_locale_fgets(FILE *F, char *buffer, int limit) ; -#line 368 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 386 "inform7/Chapter 1/Platform-Specific Definitions.w" void Platform__truncated_locale_arg(char *arg, char *buffer, int limit) ; -#line 374 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 392 "inform7/Chapter 1/Platform-Specific Definitions.w" void Platform__truncated_locale_arg(char *arg, char *buffer, int limit) ; -#line 391 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 409 "inform7/Chapter 1/Platform-Specific Definitions.w" char Platform__tolower(char c) ; -#line 394 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 412 "inform7/Chapter 1/Platform-Specific Definitions.w" char Platform__toupper(char c) ; -#line 397 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 415 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__isalpha(char c) ; -#line 400 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 418 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__isdigit(char c) ; -#line 403 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 421 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__strlen(const char *p) ; -#line 414 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 432 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__truncated_iso_fgets(FILE *F, char *buffer, int limit) ; #line 286 "inform7/Chapter 2/Memory.w" void Memory__start(void) ; @@ -4645,27 +4657,27 @@ void Memory__check_integrity(void) ; void Memory__debug_frames(int from, int to) ; #line 505 "inform7/Chapter 2/Memory.w" void * Memory__allocate(int mem_type, int extent) ; -#line 915 "inform7/Chapter 2/Memory.w" +#line 919 "inform7/Chapter 2/Memory.w" void * Memory__I7_calloc(int how_many, int size_in_bytes, int reason) ; -#line 918 "inform7/Chapter 2/Memory.w" +#line 922 "inform7/Chapter 2/Memory.w" void * Memory__I7_malloc(int size_in_bytes, int reason) ; -#line 925 "inform7/Chapter 2/Memory.w" +#line 929 "inform7/Chapter 2/Memory.w" void * Memory__I7_alloc(int N, int S, int R) ; -#line 982 "inform7/Chapter 2/Memory.w" +#line 986 "inform7/Chapter 2/Memory.w" void Memory__I7_free(void *pointer, int R) ; -#line 1004 "inform7/Chapter 2/Memory.w" +#line 1008 "inform7/Chapter 2/Memory.w" void Memory__I7_free_remaining(void) ; -#line 1018 "inform7/Chapter 2/Memory.w" +#line 1022 "inform7/Chapter 2/Memory.w" int Memory__log_usage(int total) ; -#line 1037 "inform7/Chapter 2/Memory.w" +#line 1041 "inform7/Chapter 2/Memory.w" void Memory__log_statistics(void) ; -#line 1117 "inform7/Chapter 2/Memory.w" +#line 1121 "inform7/Chapter 2/Memory.w" int Memory__compare_usage(const void *ent1, const void *ent2) ; -#line 1127 "inform7/Chapter 2/Memory.w" +#line 1131 "inform7/Chapter 2/Memory.w" int Memory__proportion(int bytes, int total) ; -#line 1160 "inform7/Chapter 2/Memory.w" +#line 1164 "inform7/Chapter 2/Memory.w" general_pointer Memory__store_gp_null(void) ; -#line 1166 "inform7/Chapter 2/Memory.w" +#line 1170 "inform7/Chapter 2/Memory.w" int Memory__test_gp_null(general_pointer gp) ; #line 24 "inform7/Chapter 2/Single Integers.w" int SingleIntegers__get(single_integer *sint) ; @@ -4678,9 +4690,9 @@ STREAM * Streams__get_stdout(void) ; #line 301 "inform7/Chapter 2/Streams.w" STREAM * Streams__get_stderr(void) ; #line 314 "inform7/Chapter 2/Streams.w" -int Streams__open_to_file(STREAM *stream, char *filename, int encoding) ; +int Streams__open_to_file(STREAM *stream, filename *name, int encoding) ; #line 328 "inform7/Chapter 2/Streams.w" -int Streams__open_to_file_append(STREAM *stream, char *filename, int encoding) ; +int Streams__open_to_file_append(STREAM *stream, filename *name, int encoding) ; #line 345 "inform7/Chapter 2/Streams.w" int Streams__open_to_memory(STREAM *stream, int capacity) ; #line 363 "inform7/Chapter 2/Streams.w" @@ -4691,63 +4703,63 @@ void Streams__flush(STREAM *stream) ; void Streams__close(STREAM *stream) ; #line 436 "inform7/Chapter 2/Streams.w" void Streams__printf(STREAM *stream, char *fmt, ...) ; -#line 509 "inform7/Chapter 2/Streams.w" +#line 525 "inform7/Chapter 2/Streams.w" void Streams__putc(int c_int, STREAM *stream) ; -#line 625 "inform7/Chapter 2/Streams.w" +#line 641 "inform7/Chapter 2/Streams.w" void Streams__literal(STREAM *stream, char *p) ; -#line 640 "inform7/Chapter 2/Streams.w" +#line 656 "inform7/Chapter 2/Streams.w" void Streams__indent(STREAM *stream) ; -#line 645 "inform7/Chapter 2/Streams.w" +#line 661 "inform7/Chapter 2/Streams.w" void Streams__outdent(STREAM *stream) ; -#line 652 "inform7/Chapter 2/Streams.w" +#line 668 "inform7/Chapter 2/Streams.w" void Streams__set_indentation(STREAM *stream, int N) ; -#line 664 "inform7/Chapter 2/Streams.w" +#line 680 "inform7/Chapter 2/Streams.w" int Streams__get_position(STREAM *stream) ; -#line 678 "inform7/Chapter 2/Streams.w" +#line 694 "inform7/Chapter 2/Streams.w" int Streams__latest(STREAM *stream) ; -#line 697 "inform7/Chapter 2/Streams.w" +#line 713 "inform7/Chapter 2/Streams.w" void Streams__set_position(STREAM *stream, int position) ; -#line 724 "inform7/Chapter 2/Streams.w" +#line 740 "inform7/Chapter 2/Streams.w" char * Streams__get_text(STREAM *stream) ; -#line 734 "inform7/Chapter 2/Streams.w" +#line 750 "inform7/Chapter 2/Streams.w" void Streams__copy(STREAM *to, STREAM *from) ; #line 272 "inform7/Chapter 2/Debugging Log.w" void Log__open(void) ; -#line 283 "inform7/Chapter 2/Debugging Log.w" +#line 282 "inform7/Chapter 2/Debugging Log.w" void Log__close(void) ; -#line 300 "inform7/Chapter 2/Debugging Log.w" +#line 299 "inform7/Chapter 2/Debugging Log.w" void Log__ensure_telemetry_file(void) ; -#line 316 "inform7/Chapter 2/Debugging Log.w" +#line 315 "inform7/Chapter 2/Debugging Log.w" void Log__write_to_telemetry_file(char *m) ; -#line 326 "inform7/Chapter 2/Debugging Log.w" +#line 325 "inform7/Chapter 2/Debugging Log.w" void Log__read_further_mandatory_text(void) ; -#line 353 "inform7/Chapter 2/Debugging Log.w" +#line 352 "inform7/Chapter 2/Debugging Log.w" void Log__new_phase_of_Informs_run(char *p, char *q) ; -#line 362 "inform7/Chapter 2/Debugging Log.w" +#line 361 "inform7/Chapter 2/Debugging Log.w" void Log__new_stage_of_Informs_run(char *p) ; -#line 377 "inform7/Chapter 2/Debugging Log.w" +#line 375 "inform7/Chapter 2/Debugging Log.w" int Log__get_aspect(int aspect) ; -#line 384 "inform7/Chapter 2/Debugging Log.w" +#line 382 "inform7/Chapter 2/Debugging Log.w" void Log__set_aspect(int aspect, int state) ; -#line 391 "inform7/Chapter 2/Debugging Log.w" +#line 389 "inform7/Chapter 2/Debugging Log.w" void Log__set_all_aspects(int new_state) ; -#line 434 "inform7/Chapter 2/Debugging Log.w" +#line 432 "inform7/Chapter 2/Debugging Log.w" void Log__set_aspect_from_text(int w1, int w2, int new_state) ; -#line 509 "inform7/Chapter 2/Debugging Log.w" +#line 507 "inform7/Chapter 2/Debugging Log.w" void Log__set_aspect_from_command_line(char *text) ; -#line 550 "inform7/Chapter 2/Debugging Log.w" +#line 548 "inform7/Chapter 2/Debugging Log.w" void Log__tracing_on(int starred, char *heading) ; -#line 571 "inform7/Chapter 2/Debugging Log.w" +#line 569 "inform7/Chapter 2/Debugging Log.w" void Log__tracing_phrases(char *text) ; -#line 606 "inform7/Chapter 2/Debugging Log.w" +#line 604 "inform7/Chapter 2/Debugging Log.w" void Log__show_debugging_settings_with_state(int state) ; -#line 621 "inform7/Chapter 2/Debugging Log.w" +#line 619 "inform7/Chapter 2/Debugging Log.w" void Log__show_debugging_contents(void) ; -#line 634 "inform7/Chapter 2/Debugging Log.w" +#line 632 "inform7/Chapter 2/Debugging Log.w" void Log__paste_icons(void) ; -#line 672 "inform7/Chapter 2/Debugging Log.w" +#line 670 "inform7/Chapter 2/Debugging Log.w" void Log__mlc_backtrace(void) ; -#line 690 "inform7/Chapter 2/Debugging Log.w" +#line 688 "inform7/Chapter 2/Debugging Log.w" void Log__dlprintf(char *fmt, ...) ; #line 40 "inform7/Chapter 2/Progress Percentages.w" void ProgressBar__update_progress_bar(int stage, float proportion) ; @@ -4757,26 +4769,52 @@ void ProgressBar__final_state_of_progress_bar(void) ; STREAM * ProgressBar__begin_outcome(void) ; #line 67 "inform7/Chapter 2/Progress Percentages.w" void ProgressBar__end_outcome(void) ; -#line 147 "inform7/Chapter 3/Filenames.w" -void Filenames__make_pathname_of_extensions(void) ; -#line 176 "inform7/Chapter 3/Filenames.w" -void Filenames__make_pathname_of_materials_folder(void) ; -#line 198 "inform7/Chapter 3/Filenames.w" -char * Filenames__top_level(char *leafname) ; -#line 213 "inform7/Chapter 3/Filenames.w" -char * Filenames__build(char *leafname) ; -#line 229 "inform7/Chapter 3/Filenames.w" -char * Filenames__source_filename_relative_to_bundle(char *leafname) ; -#line 244 "inform7/Chapter 3/Filenames.w" -char * Filenames__index(char *leafname, int sub) ; -#line 24 "inform7/Chapter 3/Folders.w" -int Folders__verify_library_folder(char *p1, char *p2, char *p3, char *new) ; -#line 51 "inform7/Chapter 3/Folders.w" -int Folders__verify_installed_extensions_tree(void) ; -#line 74 "inform7/Chapter 3/Folders.w" -int Folders__write_contents_to_file(char *pathname, char *writeto) ; -#line 92 "inform7/Chapter 3/Folders.w" -int Folders__write_contents_to_stream(OUTPUT_STREAM, char *pathname) ; +#line 63 "inform7/Chapter 3/Pathnames.w" +pathname * Pathnames__subfolder(pathname *P, char *folder_name) ; +#line 67 "inform7/Chapter 3/Pathnames.w" +pathname * Pathnames__primitive(char *c_string, int from, int to, pathname *par) ; +#line 89 "inform7/Chapter 3/Pathnames.w" +pathname * Pathnames__from_string(char *path) ; +#line 93 "inform7/Chapter 3/Pathnames.w" +pathname * Pathnames__from_string_relative(pathname *P, char *path) ; +#line 110 "inform7/Chapter 3/Pathnames.w" +void Pathnames__to_string(char *to, pathname *P) ; +#line 115 "inform7/Chapter 3/Pathnames.w" +int Pathnames__to_string_r(char *to, pathname *P, int room_left) ; +#line 142 "inform7/Chapter 3/Pathnames.w" +void Pathnames__to_string_relative(char *to, pathname *P, pathname *R) ; +#line 160 "inform7/Chapter 3/Pathnames.w" +void Pathnames__start(void) ; +#line 173 "inform7/Chapter 3/Pathnames.w" +int Pathnames__create_in_file_system(pathname *P) ; +#line 197 "inform7/Chapter 3/Pathnames.w" +int Pathnames__write_contents_to_file(filename *writeto, pathname *P) ; +#line 220 "inform7/Chapter 3/Pathnames.w" +int Pathnames__write_contents_to_stream(OUTPUT_STREAM, pathname *P) ; +#line 30 "inform7/Chapter 3/Filenames.w" +filename * Filenames__in_folder(pathname *P, char *file_name) ; +#line 34 "inform7/Chapter 3/Filenames.w" +filename * Filenames__primitive(char *c_string, int from, int to, pathname *par) ; +#line 51 "inform7/Chapter 3/Filenames.w" +filename * Filenames__from_string(pathname *F, char *path) ; +#line 67 "inform7/Chapter 3/Filenames.w" +void Filenames__to_string(char *to, filename *F) ; +#line 80 "inform7/Chapter 3/Filenames.w" +void Filenames__to_string_relative(char *to, filename *F, pathname *P) ; +#line 96 "inform7/Chapter 3/Filenames.w" +char * Filenames__get_leafname(filename *F) ; +#line 85 "inform7/Chapter 3/Where Everything Lives.w" +int Locations__command_line_setting(char *option, char *arg) ; +#line 120 "inform7/Chapter 3/Where Everything Lives.w" +int Locations__set_defaults(int census_mode) ; +#line 445 "inform7/Chapter 3/Where Everything Lives.w" +void Locations__EILT_at(int area, pathname *P) ; +#line 469 "inform7/Chapter 3/Where Everything Lives.w" +filename * Locations__of_extension(pathname *E, char *title, char *author, int i7x_flag) ; +#line 479 "inform7/Chapter 3/Where Everything Lives.w" +filename * Locations__of_extension_documentation(char *title, char *author) ; +#line 493 "inform7/Chapter 3/Where Everything Lives.w" +filename * Locations__in_index(char *leafname, int sub) ; #line 58 "inform7/Chapter 3/Case-Insensitive Filenames.w" FILE * CIFilingSystem__fopen(const char *path, const char *mode) ; #line 232 "inform7/Chapter 3/Case-Insensitive Filenames.w" @@ -4813,87 +4851,87 @@ int SoundFiles__get_OggVorbis_duration(FILE *pFile, unsigned int *pDuration, u int SoundFiles__get_MIDI_information(FILE *pFile, unsigned int *pType, unsigned int *pNumTracks) ; #line 104 "inform7/Chapter 4/HTML Files.w" void HTML__html_source_link(OUTPUT_STREAM, source_location sl, int nonbreaking_space) ; -#line 125 "inform7/Chapter 4/HTML Files.w" +#line 131 "inform7/Chapter 4/HTML Files.w" void HTML__html_icon_with_tooltip(OUTPUT_STREAM, char *icon_name, char *tip, char *tip2) ; -#line 182 "inform7/Chapter 4/HTML Files.w" +#line 187 "inform7/Chapter 4/HTML Files.w" void HTML__html_outcome_image(OUTPUT_STREAM, char *image, char *verdict) ; -#line 233 "inform7/Chapter 4/HTML Files.w" +#line 238 "inform7/Chapter 4/HTML Files.w" void HTML__outcome_image_tail(OUTPUT_STREAM) ; -#line 250 "inform7/Chapter 4/HTML Files.w" +#line 255 "inform7/Chapter 4/HTML Files.w" void HTML__html_header(OUTPUT_STREAM, char *title, char *thumbnail, char *caption) ; -#line 420 "inform7/Chapter 4/HTML Files.w" -void HTML__html_header_complete(OUTPUT_STREAM, char *title, char *thumbnail) ; #line 429 "inform7/Chapter 4/HTML Files.w" +void HTML__html_header_complete(OUTPUT_STREAM, char *title, char *thumbnail) ; +#line 438 "inform7/Chapter 4/HTML Files.w" void HTML__html_footer(OUTPUT_STREAM) ; -#line 437 "inform7/Chapter 4/HTML Files.w" +#line 446 "inform7/Chapter 4/HTML Files.w" void HTML__open_para(OUTPUT_STREAM, int depth, char *class) ; -#line 448 "inform7/Chapter 4/HTML Files.w" +#line 457 "inform7/Chapter 4/HTML Files.w" void HTML__test_html_paragraphs(void) ; -#line 498 "inform7/Chapter 4/HTML Files.w" +#line 507 "inform7/Chapter 4/HTML Files.w" void HTML__html_char_out(OUTPUT_STREAM, char c) ; -#line 546 "inform7/Chapter 4/HTML Files.w" +#line 555 "inform7/Chapter 4/HTML Files.w" void HTML__begin_plain_html_table(OUTPUT_STREAM) ; -#line 550 "inform7/Chapter 4/HTML Files.w" -void HTML__begin_wide_html_table(OUTPUT_STREAM) ; #line 559 "inform7/Chapter 4/HTML Files.w" +void HTML__begin_wide_html_table(OUTPUT_STREAM) ; +#line 568 "inform7/Chapter 4/HTML Files.w" void HTML__begin_html_table(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width) ; -#line 572 "inform7/Chapter 4/HTML Files.w" +#line 581 "inform7/Chapter 4/HTML Files.w" void HTML__begin_html_table_bg(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width, char *bg) ; -#line 583 "inform7/Chapter 4/HTML Files.w" +#line 592 "inform7/Chapter 4/HTML Files.w" void HTML__first_html_column(OUTPUT_STREAM, int width) ; -#line 588 "inform7/Chapter 4/HTML Files.w" +#line 597 "inform7/Chapter 4/HTML Files.w" void HTML__first_html_column_nowrap(OUTPUT_STREAM, int width, char *colour) ; -#line 594 "inform7/Chapter 4/HTML Files.w" +#line 603 "inform7/Chapter 4/HTML Files.w" void HTML__first_html_column_spaced(OUTPUT_STREAM, int width) ; -#line 599 "inform7/Chapter 4/HTML Files.w" +#line 608 "inform7/Chapter 4/HTML Files.w" void HTML__first_html_column_coloured(OUTPUT_STREAM, int width, char *col, int cs) ; -#line 607 "inform7/Chapter 4/HTML Files.w" +#line 616 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column(OUTPUT_STREAM, int width) ; -#line 613 "inform7/Chapter 4/HTML Files.w" +#line 622 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_centred(OUTPUT_STREAM, int width) ; -#line 619 "inform7/Chapter 4/HTML Files.w" +#line 628 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_spanning(OUTPUT_STREAM, int width, int sp) ; -#line 625 "inform7/Chapter 4/HTML Files.w" +#line 634 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_nowrap(OUTPUT_STREAM, int width) ; -#line 631 "inform7/Chapter 4/HTML Files.w" +#line 640 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_spaced(OUTPUT_STREAM, int width) ; -#line 637 "inform7/Chapter 4/HTML Files.w" +#line 646 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_nw(OUTPUT_STREAM, int width) ; -#line 643 "inform7/Chapter 4/HTML Files.w" +#line 652 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_w(OUTPUT_STREAM, int width) ; -#line 648 "inform7/Chapter 4/HTML Files.w" +#line 657 "inform7/Chapter 4/HTML Files.w" void HTML__next_html_column_right_justified(OUTPUT_STREAM, int width) ; -#line 653 "inform7/Chapter 4/HTML Files.w" +#line 662 "inform7/Chapter 4/HTML Files.w" void HTML__end_html_row(OUTPUT_STREAM) ; -#line 656 "inform7/Chapter 4/HTML Files.w" +#line 665 "inform7/Chapter 4/HTML Files.w" void HTML__end_html_table(OUTPUT_STREAM) ; -#line 667 "inform7/Chapter 4/HTML Files.w" +#line 676 "inform7/Chapter 4/HTML Files.w" void HTML__open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) ; -#line 680 "inform7/Chapter 4/HTML Files.w" +#line 689 "inform7/Chapter 4/HTML Files.w" void HTML__close_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) ; -#line 691 "inform7/Chapter 4/HTML Files.w" +#line 700 "inform7/Chapter 4/HTML Files.w" void HTML__box_corner(OUTPUT_STREAM, char *html_colour, char *corner) ; -#line 702 "inform7/Chapter 4/HTML Files.w" +#line 711 "inform7/Chapter 4/HTML Files.w" void HTML__write_xml_safe_text(OUTPUT_STREAM, char *txt) ; -#line 726 "inform7/Chapter 4/HTML Files.w" +#line 735 "inform7/Chapter 4/HTML Files.w" void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) ; -#line 910 "inform7/Chapter 4/HTML Files.w" +#line 919 "inform7/Chapter 4/HTML Files.w" int HTML__iso_remove_accents(int charcode) ; -#line 945 "inform7/Chapter 4/HTML Files.w" +#line 954 "inform7/Chapter 4/HTML Files.w" int HTML__combining_accent(int accent, int letter) ; -#line 998 "inform7/Chapter 4/HTML Files.w" +#line 1007 "inform7/Chapter 4/HTML Files.w" int HTML__without_accent(int letter) ; -#line 1026 "inform7/Chapter 4/HTML Files.w" +#line 1035 "inform7/Chapter 4/HTML Files.w" int HTML__is_babel_whitespace(char c) ; -#line 1192 "inform7/Chapter 4/HTML Files.w" +#line 1201 "inform7/Chapter 4/HTML Files.w" char * HTML__translate_colour_name(char *original) ; -#line 97 "inform7/Chapter 4/Javascript Pastes.w" +#line 93 "inform7/Chapter 4/Javascript Pastes.w" void HTML__Javascript__paste(OUTPUT_STREAM, int from, int to, char *alt_text) ; -#line 124 "inform7/Chapter 4/Javascript Pastes.w" -void HTML__Javascript__open_file(OUTPUT_STREAM, char *path1, char *path2, char *contents) ; -#line 157 "inform7/Chapter 4/Javascript Pastes.w" +#line 120 "inform7/Chapter 4/Javascript Pastes.w" +void HTML__Javascript__open_file(OUTPUT_STREAM, pathname *P, char *leaf, char *contents) ; +#line 142 "inform7/Chapter 4/Javascript Pastes.w" void HTML__Javascript__javascript_string_out(OUTPUT_STREAM, int from, int to, char *C_string) ; -#line 262 "inform7/Chapter 4/Javascript Pastes.w" +#line 247 "inform7/Chapter 4/Javascript Pastes.w" void HTML__Javascript__javascript_char_out(OUTPUT_STREAM, char c) ; #line 46 "inform7/Chapter 4/HTML Documentation.w" void HTML__Documentation__href_of_example(OUTPUT_STREAM, char *base_leafname, int to_example_variant, int to_example_anchor) ; @@ -4983,7 +5021,7 @@ void Index__DocReferences__link_to(OUTPUT_STREAM, char *fn, int full) ; void Index__DocReferences__doc_fragment(char *fn) ; #line 229 "inform7/Chapter 5/Documentation References.w" void Index__DocReferences__doc_fragment_to(OUTPUT_STREAM, char *fn) ; -#line 302 "inform7/Chapter 5/Documentation References.w" +#line 297 "inform7/Chapter 5/Documentation References.w" documentation_ref * Index__DocReferences__name_to_dr(char *fn) ; #line 56 "inform7/Chapter 5/Lexicon Index.w" lexicon_entry * Index__Lexicon__lexicon_new_entry(int w1, int w2) ; @@ -5004,8 +5042,10 @@ void Index__Lexicon__list_verbs_in_file(OUTPUT_STREAM, source_file *sf, extensi #line 11 "inform7/Chapter 6/Problems, Level 0.w" void Problems__Fatal__issue(char *message) ; #line 18 "inform7/Chapter 6/Problems, Level 0.w" -void Problems__Fatal__issue2(char *message, char *fn) ; -#line 36 "inform7/Chapter 6/Problems, Level 0.w" +void Problems__Fatal__issue_t(char *message, char *fn) ; +#line 25 "inform7/Chapter 6/Problems, Level 0.w" +void Problems__Fatal__filename_related(char *message, filename *F) ; +#line 42 "inform7/Chapter 6/Problems, Level 0.w" void Problems__Fatal__force_crash(void) ; #line 33 "inform7/Chapter 6/Problems, Level 1.w" void Problems__Buffer__copy_text_into_problem_buffer(int w1, int w2) ; @@ -5013,11 +5053,11 @@ void Problems__Buffer__copy_text_into_problem_buffer(int w1, int w2) ; void Problems__Buffer__redirect_problem_sentence(parse_node *from, parse_node *A, parse_node *B) ; #line 53 "inform7/Chapter 6/Problems, Level 1.w" void Problems__Buffer__copy_source_reference_into_problem_buffer(int w1, int w2) ; -#line 99 "inform7/Chapter 6/Problems, Level 1.w" +#line 105 "inform7/Chapter 6/Problems, Level 1.w" int Problems__Buffer__is_problem_buffer_whitespace(char c) ; -#line 115 "inform7/Chapter 6/Problems, Level 1.w" +#line 121 "inform7/Chapter 6/Problems, Level 1.w" void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) ; -#line 276 "inform7/Chapter 6/Problems, Level 1.w" +#line 282 "inform7/Chapter 6/Problems, Level 1.w" void Problems__Buffer__output_problem_buffer(int indentation) ; #line 27 "inform7/Chapter 6/Problems, Level 2.w" void Problems__empty_all_headings(void) ; @@ -5160,66 +5200,68 @@ void Problems__Issue__property_problem(SIGIL_ARGUMENTS, property *prn, char *me #line 732 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__extension_problem(SIGIL_ARGUMENTS, extension_file *ef, char *message) ; #line 748 "inform7/Chapter 6/Problems, Level 3.w" -void Problems__Issue__release_problem(SIGIL_ARGUMENTS, char *message, char *filename) ; -#line 758 "inform7/Chapter 6/Problems, Level 3.w" -void Problems__Issue__release_problem_at_sentence(SIGIL_ARGUMENTS, char *message, char *filename) ; -#line 774 "inform7/Chapter 6/Problems, Level 3.w" +void Problems__Issue__release_problem(SIGIL_ARGUMENTS, char *message, filename *name) ; +#line 760 "inform7/Chapter 6/Problems, Level 3.w" +void Problems__Issue__release_problem_path(SIGIL_ARGUMENTS, char *message, pathname *path) ; +#line 772 "inform7/Chapter 6/Problems, Level 3.w" +void Problems__Issue__release_problem_at_sentence(SIGIL_ARGUMENTS, char *message, filename *name) ; +#line 790 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__map_problem(SIGIL_ARGUMENTS, parse_node *q, char *message) ; -#line 783 "inform7/Chapter 6/Problems, Level 3.w" +#line 799 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__map_problem_wanted_but(SIGIL_ARGUMENTS, parse_node *q, char *i_wanted_a, int vw1) ; -#line 800 "inform7/Chapter 6/Problems, Level 3.w" +#line 816 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__start_problems_report(void) ; -#line 807 "inform7/Chapter 6/Problems, Level 3.w" +#line 822 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__issue_problems_banner(OUTPUT_STREAM, char *verdict) ; -#line 79 "inform7/Chapter 7/Vocabulary.w" +#line 76 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__identify_word(int wn) ; -#line 85 "inform7/Chapter 7/Vocabulary.w" +#line 82 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__identify_word_range(int w1, int w2) ; -#line 94 "inform7/Chapter 7/Vocabulary.w" +#line 91 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__change_text_of_word(int wn, char *new) ; -#line 104 "inform7/Chapter 7/Vocabulary.w" +#line 101 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry * Vocabulary__vocab_entry_new(char *text, int hash_code, unsigned int flags, int val) ; -#line 133 "inform7/Chapter 7/Vocabulary.w" +#line 130 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__log(vocabulary_entry *ve) ; -#line 157 "inform7/Chapter 7/Vocabulary.w" +#line 154 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_raw_exemplar_to_text(int wn) ; -#line 165 "inform7/Chapter 7/Vocabulary.w" +#line 162 "inform7/Chapter 7/Vocabulary.w" char * Vocabulary__get_exemplar(vocabulary_entry *ve, int raw) ; -#line 174 "inform7/Chapter 7/Vocabulary.w" +#line 171 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__get_literal_number_value(vocabulary_entry *ve) ; -#line 177 "inform7/Chapter 7/Vocabulary.w" +#line 174 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_literal_number_value(vocabulary_entry *ve, int val) ; -#line 184 "inform7/Chapter 7/Vocabulary.w" +#line 181 "inform7/Chapter 7/Vocabulary.w" kind * Vocabulary__get_kind(vocabulary_entry *ve) ; -#line 187 "inform7/Chapter 7/Vocabulary.w" +#line 184 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_kind(vocabulary_entry *ve, kind *K) ; -#line 201 "inform7/Chapter 7/Vocabulary.w" +#line 198 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__used_case_sensitively(vocabulary_entry *ve) ; -#line 205 "inform7/Chapter 7/Vocabulary.w" +#line 202 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry * Vocabulary__get_lower_case_form(vocabulary_entry *ve) ; -#line 208 "inform7/Chapter 7/Vocabulary.w" +#line 205 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry * Vocabulary__make_case_sensitive(vocabulary_entry *ve) ; -#line 220 "inform7/Chapter 7/Vocabulary.w" +#line 217 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_flags(vocabulary_entry *ve, unsigned int t) ; -#line 223 "inform7/Chapter 7/Vocabulary.w" +#line 220 "inform7/Chapter 7/Vocabulary.w" unsigned int Vocabulary__test_vflags(vocabulary_entry *ve, unsigned int t) ; -#line 226 "inform7/Chapter 7/Vocabulary.w" +#line 223 "inform7/Chapter 7/Vocabulary.w" unsigned int Vocabulary__test_flags(int wn, unsigned int t) ; -#line 236 "inform7/Chapter 7/Vocabulary.w" +#line 233 "inform7/Chapter 7/Vocabulary.w" unsigned int Vocabulary__disjunction_of_flags(int w1, int w2) ; -#line 246 "inform7/Chapter 7/Vocabulary.w" +#line 243 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_ntb(vocabulary_entry *ve, int R) ; -#line 249 "inform7/Chapter 7/Vocabulary.w" +#line 246 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__get_ntb(vocabulary_entry *ve) ; -#line 298 "inform7/Chapter 7/Vocabulary.w" +#line 295 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__hash_code_from_word(char *text) ; -#line 329 "inform7/Chapter 7/Vocabulary.w" +#line 326 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__start_hash_table(void) ; -#line 345 "inform7/Chapter 7/Vocabulary.w" +#line 342 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry * Vocabulary__entry_for_text(char *text) ; -#line 409 "inform7/Chapter 7/Vocabulary.w" +#line 406 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry * Vocabulary__entry_for_partial_text(char *str, int from, int to) ; -#line 429 "inform7/Chapter 7/Vocabulary.w" +#line 426 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__an_ordinal_number(char *fw) ; #line 69 "inform7/Chapter 7/Tries and Inflections.w" match_trie * Inflections__new_trie_node(int mc) ; @@ -5337,183 +5379,183 @@ void Plurals__register(int sing_w1, int sing_w2, int pl_w1, int pl_w2) ; plural_dictionary_entry * Plurals__make(int w1, int w2, int *plw1, int *plw2, plural_dictionary_entry *search_from, natural_language *nl) ; #line 98 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__scan(void) ; -#line 131 "inform7/Chapter 7/Natural Languages.w" -void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) ; -#line 250 "inform7/Chapter 7/Natural Languages.w" +#line 119 "inform7/Chapter 7/Natural Languages.w" +void NaturalLanguages__scan_bundles_from(pathname *P, char *origin) ; +#line 237 "inform7/Chapter 7/Natural Languages.w" natural_language * NaturalLanguages__get_nl(char *name) ; -#line 267 "inform7/Chapter 7/Natural Languages.w" +#line 254 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__log(natural_language *nl) ; -#line 275 "inform7/Chapter 7/Natural Languages.w" +#line 262 "inform7/Chapter 7/Natural Languages.w" char * NaturalLanguages__get_name(natural_language *nl) ; -#line 307 "inform7/Chapter 7/Natural Languages.w" +#line 294 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__stock_nl_kind(kind *K) ; -#line 328 "inform7/Chapter 7/Natural Languages.w" +#line 315 "inform7/Chapter 7/Natural Languages.w" int NaturalLanguages__adaptive_person(natural_language *nl) ; -#line 346 "inform7/Chapter 7/Natural Languages.w" +#line 333 "inform7/Chapter 7/Natural Languages.w" natural_language * NaturalLanguages__English(void) ; -#line 354 "inform7/Chapter 7/Natural Languages.w" +#line 341 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__set_language_of_play(natural_language *nl) ; -#line 365 "inform7/Chapter 7/Natural Languages.w" +#line 352 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__write_language_code(OUTPUT_STREAM, natural_language *nl) ; -#line 385 "inform7/Chapter 7/Natural Languages.w" +#line 372 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__include_required(void) ; -#line 411 "inform7/Chapter 7/Natural Languages.w" +#line 398 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__load_preform(natural_language *nl) ; -#line 377 "inform7/Chapter 7/Preform.w" +#line 373 "inform7/Chapter 7/Preform.w" void Preform__log_language(void) ; -#line 416 "inform7/Chapter 7/Preform.w" +#line 412 "inform7/Chapter 7/Preform.w" void Preform__log_production(production *pr, int detailed) ; -#line 428 "inform7/Chapter 7/Preform.w" +#line 424 "inform7/Chapter 7/Preform.w" void Preform__log_ptoken(ptoken *pt, int detailed) ; -#line 450 "inform7/Chapter 7/Preform.w" +#line 446 "inform7/Chapter 7/Preform.w" void Preform__write_ptoken(OUTPUT_STREAM, ptoken *pt) ; -#line 480 "inform7/Chapter 7/Preform.w" +#line 476 "inform7/Chapter 7/Preform.w" void Preform__watch(nonterminal *nt, int state) ; -#line 505 "inform7/Chapter 7/Preform.w" +#line 501 "inform7/Chapter 7/Preform.w" void Preform__read_definition(void) ; -#line 599 "inform7/Chapter 7/Preform.w" +#line 595 "inform7/Chapter 7/Preform.w" int Preform__parse_preform(int w1, int w2, int break_first) ; -#line 705 "inform7/Chapter 7/Preform.w" +#line 701 "inform7/Chapter 7/Preform.w" nonterminal * Preform__find_nonterminal(vocabulary_entry *ve) ; -#line 741 "inform7/Chapter 7/Preform.w" +#line 737 "inform7/Chapter 7/Preform.w" production * Preform__new_production(int w1, int w2, nonterminal *nt, int pc) ; -#line 864 "inform7/Chapter 7/Preform.w" +#line 860 "inform7/Chapter 7/Preform.w" ptoken * Preform__parse_slashed_chain(nonterminal *nt, production *pr, int wn, int unescaped) ; -#line 918 "inform7/Chapter 7/Preform.w" +#line 914 "inform7/Chapter 7/Preform.w" ptoken * Preform__new_ptoken(vocabulary_entry *ve, int unescaped, nonterminal *nt, int pc) ; -#line 971 "inform7/Chapter 7/Preform.w" +#line 967 "inform7/Chapter 7/Preform.w" void Preform__optimise_counts(void) ; -#line 1015 "inform7/Chapter 7/Preform.w" +#line 1011 "inform7/Chapter 7/Preform.w" void Preform__optimise_nt(nonterminal *nt) ; -#line 1225 "inform7/Chapter 7/Preform.w" +#line 1221 "inform7/Chapter 7/Preform.w" void Preform__optimise_nt_reqs(nonterminal *nt) ; -#line 1238 "inform7/Chapter 7/Preform.w" +#line 1234 "inform7/Chapter 7/Preform.w" void Preform__optimise_req(range_requirement *req, range_requirement *prev) ; -#line 1266 "inform7/Chapter 7/Preform.w" +#line 1262 "inform7/Chapter 7/Preform.w" void Preform__mark_as_preposition(vocabulary_entry *ve) ; -#line 1272 "inform7/Chapter 7/Preform.w" +#line 1268 "inform7/Chapter 7/Preform.w" void Preform__mark_as_verb(vocabulary_entry *ve) ; -#line 1285 "inform7/Chapter 7/Preform.w" +#line 1281 "inform7/Chapter 7/Preform.w" void Preform__mark_as_cardinal(vocabulary_entry *ve) ; -#line 1289 "inform7/Chapter 7/Preform.w" +#line 1285 "inform7/Chapter 7/Preform.w" void Preform__mark_as_ordinal(vocabulary_entry *ve) ; -#line 1293 "inform7/Chapter 7/Preform.w" +#line 1289 "inform7/Chapter 7/Preform.w" void Preform__mark_nt_as_requiring_itself(nonterminal *nt) ; -#line 1298 "inform7/Chapter 7/Preform.w" +#line 1294 "inform7/Chapter 7/Preform.w" void Preform__mark_nt_as_requiring_itself_first(nonterminal *nt) ; -#line 1305 "inform7/Chapter 7/Preform.w" +#line 1301 "inform7/Chapter 7/Preform.w" void Preform__mark_nt_as_requiring_itself_conj(nonterminal *nt) ; -#line 1314 "inform7/Chapter 7/Preform.w" +#line 1310 "inform7/Chapter 7/Preform.w" void Preform__mark_nt_as_requiring_itself_articled(nonterminal *nt) ; -#line 1321 "inform7/Chapter 7/Preform.w" +#line 1317 "inform7/Chapter 7/Preform.w" void Preform__set_nt_incidence(vocabulary_entry *ve, nonterminal *nt) ; -#line 1332 "inform7/Chapter 7/Preform.w" +#line 1328 "inform7/Chapter 7/Preform.w" int Preform__nt_bitmap_bit(nonterminal *nt) ; -#line 1361 "inform7/Chapter 7/Preform.w" +#line 1357 "inform7/Chapter 7/Preform.w" int Preform__test_word(int wn, nonterminal *nt) ; -#line 1367 "inform7/Chapter 7/Preform.w" +#line 1363 "inform7/Chapter 7/Preform.w" void Preform__mark_word(int wn, nonterminal *nt) ; -#line 1371 "inform7/Chapter 7/Preform.w" +#line 1367 "inform7/Chapter 7/Preform.w" void Preform__mark_vocabulary(vocabulary_entry *ve, nonterminal *nt) ; -#line 1375 "inform7/Chapter 7/Preform.w" +#line 1371 "inform7/Chapter 7/Preform.w" int Preform__test_vocabulary(vocabulary_entry *ve, nonterminal *nt) ; -#line 1381 "inform7/Chapter 7/Preform.w" +#line 1377 "inform7/Chapter 7/Preform.w" int Preform__get_range_disjunction(int w1, int w2) ; -#line 1388 "inform7/Chapter 7/Preform.w" +#line 1384 "inform7/Chapter 7/Preform.w" int Preform__get_range_conjunction(int w1, int w2) ; -#line 1400 "inform7/Chapter 7/Preform.w" +#line 1396 "inform7/Chapter 7/Preform.w" int Preform__nt_bitmap_violates(int w1, int w2, range_requirement *req) ; -#line 1464 "inform7/Chapter 7/Preform.w" +#line 1460 "inform7/Chapter 7/Preform.w" void Preform__concatenate_rreq(range_requirement *req, range_requirement *with) ; -#line 1479 "inform7/Chapter 7/Preform.w" +#line 1475 "inform7/Chapter 7/Preform.w" int Preform__concatenate_ds(int m1, int m2) ; -#line 1488 "inform7/Chapter 7/Preform.w" +#line 1484 "inform7/Chapter 7/Preform.w" int Preform__concatenate_cs(int m1, int m2) ; -#line 1499 "inform7/Chapter 7/Preform.w" +#line 1495 "inform7/Chapter 7/Preform.w" int Preform__concatenate_dw(int m1, int m2) ; -#line 1510 "inform7/Chapter 7/Preform.w" +#line 1506 "inform7/Chapter 7/Preform.w" int Preform__concatenate_cw(int m1, int m2) ; -#line 1519 "inform7/Chapter 7/Preform.w" +#line 1515 "inform7/Chapter 7/Preform.w" int Preform__concatenate_fs(int m1, int m2) ; -#line 1523 "inform7/Chapter 7/Preform.w" +#line 1519 "inform7/Chapter 7/Preform.w" int Preform__concatenate_fw(int m1, int m2) ; -#line 1532 "inform7/Chapter 7/Preform.w" +#line 1528 "inform7/Chapter 7/Preform.w" void Preform__disjoin_rreq(range_requirement *req, range_requirement *with) ; -#line 1547 "inform7/Chapter 7/Preform.w" +#line 1543 "inform7/Chapter 7/Preform.w" int Preform__disjoin_ds(int m1, int m2) ; -#line 1556 "inform7/Chapter 7/Preform.w" +#line 1552 "inform7/Chapter 7/Preform.w" int Preform__disjoin_cs(int m1, int m2) ; -#line 1565 "inform7/Chapter 7/Preform.w" +#line 1561 "inform7/Chapter 7/Preform.w" int Preform__disjoin_dw(int m1, int m2) ; -#line 1574 "inform7/Chapter 7/Preform.w" +#line 1570 "inform7/Chapter 7/Preform.w" int Preform__disjoin_cw(int m1, int m2) ; -#line 1580 "inform7/Chapter 7/Preform.w" +#line 1576 "inform7/Chapter 7/Preform.w" int Preform__disjoin_fw(int m1, int m2) ; -#line 1584 "inform7/Chapter 7/Preform.w" +#line 1580 "inform7/Chapter 7/Preform.w" int Preform__disjoin_fs(int m1, int m2) ; -#line 1588 "inform7/Chapter 7/Preform.w" +#line 1584 "inform7/Chapter 7/Preform.w" void Preform__clear_rreq(range_requirement *req) ; -#line 1594 "inform7/Chapter 7/Preform.w" +#line 1590 "inform7/Chapter 7/Preform.w" void Preform__atomic_rreq(range_requirement *req, nonterminal *nt) ; -#line 1601 "inform7/Chapter 7/Preform.w" +#line 1597 "inform7/Chapter 7/Preform.w" void Preform__log_range_requirement(range_requirement *req) ; -#line 1615 "inform7/Chapter 7/Preform.w" +#line 1611 "inform7/Chapter 7/Preform.w" int Preform__ptoken_width(ptoken *pt) ; -#line 1629 "inform7/Chapter 7/Preform.w" +#line 1625 "inform7/Chapter 7/Preform.w" void Preform__ptoken_extrema(ptoken *pt, int *min_t, int *max_t) ; -#line 1691 "inform7/Chapter 7/Preform.w" +#line 1687 "inform7/Chapter 7/Preform.w" int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *result, void **result_p) ; -#line 2181 "inform7/Chapter 7/Preform.w" +#line 2177 "inform7/Chapter 7/Preform.w" int Preform__next_strut_posn_after(int w1, int w2, ptoken *start, int len, int from) ; -#line 2207 "inform7/Chapter 7/Preform.w" +#line 2203 "inform7/Chapter 7/Preform.w" int Preform__parse_fixed_word_ptoken(int wn, ptoken *pt) ; -#line 84 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 82 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__merge(nonterminal *nt, int pnum, word_assemblage ingredient) ; -#line 112 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 110 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__wording(nonterminal *nt, int pnum) ; -#line 119 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 117 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry * Preform__Nonparsing__word(nonterminal *nt, int pnum) ; -#line 133 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 131 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry * Preform__Nonparsing__replace_word(vocabulary_entry *ve, nonterminal *nt_from, nonterminal *nt_to) ; -#line 167 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 165 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__enter_lexicon(nonterminal *nt_from, int pos, char *category, char *gloss) ; -#line 195 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 193 "inform7/Chapter 7/Non-Parsing Preform.w" match_avinue * Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural_language *nl) ; -#line 299 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 297 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__log_avinues(void) ; -#line 328 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 326 "inform7/Chapter 7/Non-Parsing Preform.w" verb_conjugation * Preform__Nonparsing__conjugate_verb(word_assemblage base_text, word_assemblage *overrides, int no_overrides, natural_language *nl) ; -#line 494 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 492 "inform7/Chapter 7/Non-Parsing Preform.w" nonterminal * Preform__Nonparsing__follow_conjugation_instructions(word_assemblage *verb_forms, int *highest_form_written, int *aux_len, int *avo_flag, int *niv_flag, natural_language *nl) ; -#line 669 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 667 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, int sense, int tense, int person, int num_ingredients, word_assemblage *ingredients, natural_language *nl, int *modal_following) ; -#line 803 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 801 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__expand_wa_with_endings(vocabulary_entry *ve, word_assemblage *verb_forms) ; -#line 856 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 854 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__shorten_wa_with_contractions(word_assemblage wa) ; -#line 908 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 906 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_to_verb_form_number(ptoken *pt) ; -#line 914 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 912 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ve_to_verb_form_number(vocabulary_entry *ve) ; -#line 926 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 924 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_to_tense_indicator(ptoken *pt, int *set_sense) ; -#line 953 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 951 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_as_bracket(ptoken *pt) ; -#line 966 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 964 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__compare_ve_with_tails(vocabulary_entry *ve, vocabulary_entry *pattern) ; -#line 987 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 985 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__trie_definition_error(nonterminal *nt, production *pr, char *message) ; -#line 994 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 992 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__conjugation_error(word_assemblage base_text, nonterminal *nt, production *pr, char *message) ; -#line 1003 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1001 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__general_npp_error(word_assemblage base_text, nonterminal *nt, production *pr, char *message) ; -#line 1051 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1049 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__test_conjugation(OUTPUT_STREAM, int w1, int w2) ; -#line 1059 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1057 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__write_conjugation(OUTPUT_STREAM, verb_conjugation *vc) ; -#line 1102 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1100 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__test_participle(OUTPUT_STREAM, int w1, int w2) ; -#line 1110 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1108 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__write_participle(OUTPUT_STREAM, verb_conjugation *vc) ; #line 97 "inform7/Chapter 8/Articles and Pronouns.w" void Articles__remove_the(int *w1, int *w2) ; @@ -5567,39 +5609,39 @@ int TimePeriods__duration_count(time_period *tp) ; int TimePeriods__compare_specificity(time_period *tp1, time_period *tp2) ; #line 206 "inform7/Chapter 8/Time Periods.w" time_period TimePeriods__parse(int w1, int w2) ; -#line 77 "inform7/Chapter 9/Adjectives.w" +#line 79 "inform7/Chapter 9/Adjectives.w" adjectival_phrase * Adjectives__Phrases__parse(int w1, int w2) ; -#line 86 "inform7/Chapter 9/Adjectives.w" +#line 88 "inform7/Chapter 9/Adjectives.w" adjectival_phrase * Adjectives__Phrases__from_word_range(int w1, int w2, natural_language *nl) ; -#line 115 "inform7/Chapter 9/Adjectives.w" +#line 117 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__get_text(adjectival_phrase *aph, int *w1, int *w2, int plural) ; -#line 128 "inform7/Chapter 9/Adjectives.w" +#line 130 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__declare_meaningless(parse_node *p) ; -#line 138 "inform7/Chapter 9/Adjectives.w" +#line 140 "inform7/Chapter 9/Adjectives.w" adjectival_phrase * Adjectives__Phrases__declare_textually(int w1, int w2) ; -#line 148 "inform7/Chapter 9/Adjectives.w" +#line 150 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__test_adjective(OUTPUT_STREAM, int w1, int w2) ; -#line 175 "inform7/Chapter 9/Adjectives.w" +#line 177 "inform7/Chapter 9/Adjectives.w" adjectival_phrase * Adjectives__Phrases__declare(adjective_meaning *am, int w1, int w2) ; -#line 194 "inform7/Chapter 9/Adjectives.w" +#line 196 "inform7/Chapter 9/Adjectives.w" adjectival_phrase * Adjectives__Phrases__get_aph_from_am(adjective_meaning *am) ; -#line 203 "inform7/Chapter 9/Adjectives.w" +#line 205 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__sortrandom_meanings(adjectival_phrase *aph) ; -#line 211 "inform7/Chapter 9/Adjectives.w" +#line 213 "inform7/Chapter 9/Adjectives.w" adjective_meaning * Adjectives__Phrases__get_sorted_definition_list(adjectival_phrase *aph) ; -#line 218 "inform7/Chapter 9/Adjectives.w" +#line 220 "inform7/Chapter 9/Adjectives.w" adjective_meaning * Adjectives__Phrases__first_meaning(adjectival_phrase *aph) ; -#line 226 "inform7/Chapter 9/Adjectives.w" +#line 228 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__log(adjectival_phrase *aph) ; -#line 237 "inform7/Chapter 9/Adjectives.w" +#line 239 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__log_meanings(adjectival_phrase *aph) ; -#line 276 "inform7/Chapter 9/Adjectives.w" +#line 278 "inform7/Chapter 9/Adjectives.w" int Adjectives__Phrases__applicable_to(adjectival_phrase *aph, kind *K) ; -#line 301 "inform7/Chapter 9/Adjectives.w" +#line 303 "inform7/Chapter 9/Adjectives.w" instance * Adjectives__Phrases__has_ENUMERATIVE_meaning(adjectival_phrase *aph) ; -#line 309 "inform7/Chapter 9/Adjectives.w" +#line 311 "inform7/Chapter 9/Adjectives.w" property * Adjectives__Phrases__has_EORP_meaning(adjectival_phrase *aph) ; -#line 347 "inform7/Chapter 9/Adjectives.w" +#line 349 "inform7/Chapter 9/Adjectives.w" int Adjectives__Phrases__assert(adjectival_phrase *aph, kind *kind_domain, inference_subject *infs_to_assert_on, specification *val_to_assert_on, int parity) ; #line 119 "inform7/Chapter 9/Adjective Meanings.w" adjective_meaning * Adjectives__Meanings__list_sort(adjective_meaning *unsorted_head) ; @@ -5670,97 +5712,97 @@ adjectival_phrase * Adjectives__Usages__get_aph(adjective_usage *au) ; #line 49 "inform7/Chapter 9/Adjective Usages.w" int Adjectives__Usages__get_parity(adjective_usage *au) ; #line 177 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__lp_new(kind *K, int spw1, int spw2) ; +literal_pattern * LiteralPatterns__lp_new(kind *K, int spw1, int spw2) ; #line 198 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_token Semantics__Nouns__LiteralPatterns__lpt_new(int t, int nw) ; +literal_pattern_token LiteralPatterns__lpt_new(int t, int nw) ; #line 210 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_element Semantics__Nouns__LiteralPatterns__lpe_new(int i, int r, int sgn) ; +literal_pattern_element LiteralPatterns__lpe_new(int i, int r, int sgn) ; #line 231 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__list_add(literal_pattern *list_head, literal_pattern *new_lp, int using_integer_scaling) ; +literal_pattern * LiteralPatterns__list_add(literal_pattern *list_head, literal_pattern *new_lp, int using_integer_scaling) ; #line 317 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__lp_list_add_inner(literal_pattern *list_head, literal_pattern *new_lp) ; +literal_pattern * LiteralPatterns__lp_list_add_inner(literal_pattern *list_head, literal_pattern *new_lp) ; #line 341 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__lp_precedes(literal_pattern *A, literal_pattern *B) ; +int LiteralPatterns__lp_precedes(literal_pattern *A, literal_pattern *B) ; #line 358 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__get_benchmark(kind *K) ; +literal_pattern * LiteralPatterns__get_benchmark(kind *K) ; #line 370 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__scale_factor(kind *K) ; +int LiteralPatterns__scale_factor(kind *K) ; #line 381 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__at_optional_break_point(literal_pattern *lp, int ec, int tc) ; +int LiteralPatterns__at_optional_break_point(literal_pattern *lp, int ec, int tc) ; #line 400 "inform7/Chapter 10/Literal Patterns.w" -kind * Semantics__Nouns__LiteralPatterns__match(literal_pattern *lp, int w1, int w2, int *found) ; +kind * LiteralPatterns__match(literal_pattern *lp, int w1, int w2, int *found) ; #line 686 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__gpr_locals(void) ; +void LiteralPatterns__gpr_locals(void) ; #line 704 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) ; -#line 880 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_all(kind *K) ; -#line 953 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_lp_possibilities(literal_pattern *lp, literal_pattern *benchmark_lp) ; -#line 981 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_lp_possibility(literal_pattern *lp, literal_pattern *benchmark_lp) ; -#line 1000 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_value(literal_pattern *lp_list, int v) ; -#line 1031 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_benchmark_value(kind *K) ; -#line 1045 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(literal_pattern *lp, scaling_transformation sc) ; -#line 1055 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__lp_index_value_specific(literal_pattern *lp, double alt_value) ; -#line 1061 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(literal_pattern *lp, int v, double real_v) ; -#line 1124 "inform7/Chapter 10/Literal Patterns.w" -char * Semantics__Nouns__LiteralPatterns__leading_zero_prototype(int range) ; -#line 1140 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_pattern *lp_list) ; -#line 1309 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUTPUT_STREAM, literal_pattern *lp) ; -#line 1320 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__log_lp_debugging_data(OUTPUT_STREAM, literal_pattern *lp) ; -#line 1345 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__new_literal_specification(parse_node *pn) ; -#line 1359 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__new_literal_specification_list(parse_node *p, parse_node *q, literal_pattern *lp_main) ; -#line 1388 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern * Semantics__Nouns__LiteralPatterns__new_literal_specification_inner(parse_node *p, parse_node *q, literal_pattern *owner) ; -#line 1922 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_name * Semantics__Nouns__LiteralPatterns__new_lpn(int w1, int w2, literal_pattern_name *existing) ; -#line 1942 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__define_named_phrases(void) ; -#line 2001 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__define_packing_phrases(literal_pattern *lp, kind *K) ; +void LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) ; +#line 882 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_all(kind *K) ; +#line 955 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_lp_possibilities(literal_pattern *lp, literal_pattern *benchmark_lp) ; +#line 983 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_lp_possibility(literal_pattern *lp, literal_pattern *benchmark_lp) ; +#line 1002 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_value(literal_pattern *lp_list, int v) ; +#line 1033 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_benchmark_value(kind *K) ; +#line 1047 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__lp_index_quantum_value(literal_pattern *lp, scaling_transformation sc) ; +#line 1057 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__lp_index_value_specific(literal_pattern *lp, double alt_value) ; +#line 1063 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__lp_index_value_specific_inner(literal_pattern *lp, int v, double real_v) ; +#line 1126 "inform7/Chapter 10/Literal Patterns.w" +char * LiteralPatterns__leading_zero_prototype(int range) ; +#line 1142 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_pattern *lp_list) ; +#line 1311 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__comment_use_of_lp(OUTPUT_STREAM, literal_pattern *lp) ; +#line 1322 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__log_lp_debugging_data(OUTPUT_STREAM, literal_pattern *lp) ; +#line 1347 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__new_literal_specification(parse_node *pn) ; +#line 1361 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern * LiteralPatterns__new_literal_specification_list(parse_node *p, parse_node *q, literal_pattern *lp_main) ; +#line 1390 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern * LiteralPatterns__new_literal_specification_inner(parse_node *p, parse_node *q, literal_pattern *owner) ; +#line 1924 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern_name * LiteralPatterns__new_lpn(int w1, int w2, literal_pattern_name *existing) ; +#line 1944 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__define_named_phrases(void) ; +#line 2003 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__define_packing_phrases(literal_pattern *lp, kind *K) ; #line 44 "inform7/Chapter 10/Times of Day.w" void PL__TimesOfDay__start(void) ; #line 51 "inform7/Chapter 10/Times of Day.w" int PL__TimesOfDay__times_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) ; #line 61 "inform7/Chapter 10/Times of Day.w" kind * PL__TimesOfDay__kind(void) ; -#line 165 "inform7/Chapter 10/Excerpt Meanings.w" +#line 163 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning * Semantics__Nouns__ExcerptMeanings__new(unsigned int mc, unsigned int smc, general_pointer data) ; -#line 179 "inform7/Chapter 10/Excerpt Meanings.w" +#line 177 "inform7/Chapter 10/Excerpt Meanings.w" unsigned int Semantics__Nouns__ExcerptMeanings__get_secondary_code(excerpt_meaning *em) ; -#line 184 "inform7/Chapter 10/Excerpt Meanings.w" +#line 182 "inform7/Chapter 10/Excerpt Meanings.w" general_pointer Semantics__Nouns__ExcerptMeanings__data(excerpt_meaning *em) ; -#line 192 "inform7/Chapter 10/Excerpt Meanings.w" +#line 190 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__log_meaning_code(unsigned int mc) ; -#line 235 "inform7/Chapter 10/Excerpt Meanings.w" +#line 233 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__log(excerpt_meaning *em) ; -#line 251 "inform7/Chapter 10/Excerpt Meanings.w" +#line 249 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__log_all(void) ; -#line 282 "inform7/Chapter 10/Excerpt Meanings.w" +#line 280 "inform7/Chapter 10/Excerpt Meanings.w" int Semantics__Nouns__ExcerptMeanings__hash_code(int w1, int w2) ; -#line 309 "inform7/Chapter 10/Excerpt Meanings.w" +#line 307 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__hash_code_from_token_list(excerpt_meaning *em) ; -#line 403 "inform7/Chapter 10/Excerpt Meanings.w" +#line 401 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__register_em(unsigned int meaning_code, excerpt_meaning *em) ; -#line 514 "inform7/Chapter 10/Excerpt Meanings.w" +#line 512 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning * Semantics__Nouns__ExcerptMeanings__register( unsigned int meaning_code, unsigned int secondary, int w1, int w2, general_pointer data) ; -#line 636 "inform7/Chapter 10/Excerpt Meanings.w" +#line 634 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning * Semantics__Nouns__ExcerptMeanings__register_assemblage( unsigned int meaning_code, unsigned int secondary, word_assemblage wa, general_pointer data) ; #line 15 "inform7/Chapter 10/Unicode Translations.w" -void Semantics__Nouns__UnicodeTranslations__unicode_translates(parse_node *pn) ; +void UnicodeTranslations__unicode_translates(parse_node *pn) ; #line 99 "inform7/Chapter 10/Unicode Translations.w" -int Semantics__Nouns__UnicodeTranslations__char_in_range(int cc) ; +int UnicodeTranslations__char_in_range(int cc) ; #line 61 "inform7/Chapter 10/Nametags.w" individual_name * Nametags__add_to_nametag_and_reg(nametag *t, int w1, int w2, natural_language *foreign_language, int gender, int number, int options) ; #line 91 "inform7/Chapter 10/Nametags.w" @@ -5801,7 +5843,7 @@ void Nametags__nametag_set_I6_representation(nametag *t, char *new) ; void Nametags__name_all(void) ; #line 293 "inform7/Chapter 10/Nametags.w" nametag * Nametags__disambiguate(meaning_list *ml, int priority) ; -#line 342 "inform7/Chapter 10/Nametags.w" +#line 345 "inform7/Chapter 10/Nametags.w" void Nametags__nl_translates(parse_node *pn) ; #line 85 "inform7/Chapter 10/Instances.w" instance * Instances__new(int w1, int w2, kind *K) ; @@ -5983,105 +6025,105 @@ void Data__Objects__page_World(void) ; void Data__Objects__index(instance *I, kind *K, int depth, int details) ; #line 366 "inform7/Chapter 10/Index Physical World.w" void Data__Objects__index_instances(kind *K, int depth) ; -#line 339 "inform7/Chapter 11/Binary Predicates.w" +#line 333 "inform7/Chapter 11/Binary Predicates.w" bp_term_details BinaryPredicates__new_term(inference_subject *infs) ; -#line 352 "inform7/Chapter 11/Binary Predicates.w" +#line 346 "inform7/Chapter 11/Binary Predicates.w" bp_term_details BinaryPredicates__full_new_term(inference_subject *infs, kind *K, int c1, int c2, i6_schema *f) ; -#line 365 "inform7/Chapter 11/Binary Predicates.w" +#line 359 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_term_domain(bp_term_details *bptd, kind *K) ; -#line 374 "inform7/Chapter 11/Binary Predicates.w" +#line 368 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_term_function(bp_term_details *bptd, i6_schema *f) ; -#line 379 "inform7/Chapter 11/Binary Predicates.w" +#line 373 "inform7/Chapter 11/Binary Predicates.w" i6_schema * BinaryPredicates__get_term_function(bp_term_details *bptd) ; -#line 387 "inform7/Chapter 11/Binary Predicates.w" +#line 381 "inform7/Chapter 11/Binary Predicates.w" kind * BinaryPredicates__kind(binary_predicate *bp) ; -#line 399 "inform7/Chapter 11/Binary Predicates.w" +#line 393 "inform7/Chapter 11/Binary Predicates.w" kind * BinaryPredicates__kind_of_term(bp_term_details *bptd) ; -#line 408 "inform7/Chapter 11/Binary Predicates.w" +#line 402 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__index_term_details(bp_term_details *bptd) ; -#line 421 "inform7/Chapter 11/Binary Predicates.w" +#line 415 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__add_term_as_call_parameter(OUTPUT_STREAM, ph_stack_frame *phsf, bp_term_details bptd) ; -#line 435 "inform7/Chapter 11/Binary Predicates.w" +#line 429 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_index_details(binary_predicate *bp, char *left, char *right) ; -#line 463 "inform7/Chapter 11/Binary Predicates.w" +#line 457 "inform7/Chapter 11/Binary Predicates.w" binary_predicate * BinaryPredicates__make_equality(void) ; -#line 484 "inform7/Chapter 11/Binary Predicates.w" +#line 478 "inform7/Chapter 11/Binary Predicates.w" binary_predicate * BinaryPredicates__make_pair(int family, bp_term_details left_term, bp_term_details right_term, char *name, char *namer, property *pn, i6_schema *mtf, i6_schema *tf, word_assemblage source_name) ; -#line 518 "inform7/Chapter 11/Binary Predicates.w" +#line 512 "inform7/Chapter 11/Binary Predicates.w" binary_predicate * BinaryPredicates__make_pair_sketchily(word_assemblage wa, int f) ; -#line 541 "inform7/Chapter 11/Binary Predicates.w" +#line 535 "inform7/Chapter 11/Binary Predicates.w" binary_predicate * BinaryPredicates__make_single(int family, bp_term_details left_term, bp_term_details right_term, char *name, property *pn, i6_schema *mtf, i6_schema *tf, word_assemblage rn) ; -#line 595 "inform7/Chapter 11/Binary Predicates.w" +#line 589 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_get_name_text(inference_subject *from, int *w1, int *w2) ; -#line 599 "inform7/Chapter 11/Binary Predicates.w" +#line 593 "inform7/Chapter 11/Binary Predicates.w" general_pointer BinaryPredicates__SUBJ_new_permission_granted(inference_subject *from) ; -#line 603 "inform7/Chapter 11/Binary Predicates.w" +#line 597 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_make_adj_const_domain(inference_subject *infs, instance *nc, property *prn) ; -#line 607 "inform7/Chapter 11/Binary Predicates.w" +#line 601 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_complete_model(inference_subject *infs) ; -#line 624 "inform7/Chapter 11/Binary Predicates.w" +#line 618 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_check_model(inference_subject *infs) ; -#line 632 "inform7/Chapter 11/Binary Predicates.w" +#line 626 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_write_element_of_condition(inference_subject *infs, char *cond) ; -#line 636 "inform7/Chapter 11/Binary Predicates.w" +#line 630 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__SUBJ_compile_all(OUTPUT_STREAM) ; -#line 640 "inform7/Chapter 11/Binary Predicates.w" +#line 634 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_compile(OUTPUT_STREAM, inference_subject *infs) ; -#line 670 "inform7/Chapter 11/Binary Predicates.w" +#line 664 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__log_term_details(bp_term_details *bptd, int i) ; -#line 680 "inform7/Chapter 11/Binary Predicates.w" +#line 674 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__log(binary_predicate *bp) ; -#line 712 "inform7/Chapter 11/Binary Predicates.w" +#line 706 "inform7/Chapter 11/Binary Predicates.w" char * BinaryPredicates__get_log_name(binary_predicate *bp) ; -#line 719 "inform7/Chapter 11/Binary Predicates.w" +#line 713 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__get_form_of_relation(binary_predicate *bp) ; -#line 722 "inform7/Chapter 11/Binary Predicates.w" +#line 716 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__is_explicit_with_runtime_storage(binary_predicate *bp) ; -#line 728 "inform7/Chapter 11/Binary Predicates.w" +#line 722 "inform7/Chapter 11/Binary Predicates.w" char * BinaryPredicates__form_to_text(binary_predicate *bp) ; -#line 743 "inform7/Chapter 11/Binary Predicates.w" +#line 737 "inform7/Chapter 11/Binary Predicates.w" parse_node * BinaryPredicates__get_bp_created_at(binary_predicate *bp) ; -#line 750 "inform7/Chapter 11/Binary Predicates.w" +#line 744 "inform7/Chapter 11/Binary Predicates.w" kind * BinaryPredicates__term_kind(binary_predicate *bp, int t) ; -#line 753 "inform7/Chapter 11/Binary Predicates.w" +#line 747 "inform7/Chapter 11/Binary Predicates.w" i6_schema * BinaryPredicates__get_term_as_function_of_other(binary_predicate *bp, int t) ; -#line 760 "inform7/Chapter 11/Binary Predicates.w" +#line 754 "inform7/Chapter 11/Binary Predicates.w" binary_predicate * BinaryPredicates__get_reversal(binary_predicate *bp) ; -#line 763 "inform7/Chapter 11/Binary Predicates.w" +#line 757 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__is_the_wrong_way_round(binary_predicate *bp) ; -#line 771 "inform7/Chapter 11/Binary Predicates.w" +#line 765 "inform7/Chapter 11/Binary Predicates.w" i6_schema * BinaryPredicates__get_test_function(binary_predicate *bp) ; -#line 774 "inform7/Chapter 11/Binary Predicates.w" +#line 768 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__can_be_made_true_at_runtime(binary_predicate *bp) ; -#line 788 "inform7/Chapter 11/Binary Predicates.w" +#line 782 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__allow_arbitrary_assertions(binary_predicate *bp) ; -#line 791 "inform7/Chapter 11/Binary Predicates.w" +#line 785 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__store_dynamically(binary_predicate *bp) ; -#line 794 "inform7/Chapter 11/Binary Predicates.w" +#line 788 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__relates_values_not_objects(binary_predicate *bp) ; -#line 797 "inform7/Chapter 11/Binary Predicates.w" +#line 791 "inform7/Chapter 11/Binary Predicates.w" inference_subject * BinaryPredicates__as_subject(binary_predicate *bp) ; -#line 804 "inform7/Chapter 11/Binary Predicates.w" +#line 798 "inform7/Chapter 11/Binary Predicates.w" property * BinaryPredicates__get_i6_storage_property(binary_predicate *bp) ; -#line 807 "inform7/Chapter 11/Binary Predicates.w" +#line 801 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__allows_function_simplification(binary_predicate *bp) ; -#line 810 "inform7/Chapter 11/Binary Predicates.w" +#line 804 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__mark_as_needed(binary_predicate *bp) ; -#line 817 "inform7/Chapter 11/Binary Predicates.w" +#line 811 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_comparison_details(binary_predicate *bp, int sign, property *prn) ; -#line 834 "inform7/Chapter 11/Binary Predicates.w" +#line 828 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__write_optimised_loop_schema(i6_schema *sch, binary_predicate *bp) ; -#line 877 "inform7/Chapter 11/Binary Predicates.w" +#line 871 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__make_built_in(void) ; -#line 894 "inform7/Chapter 11/Binary Predicates.w" +#line 888 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__make_built_in_further(void) ; -#line 914 "inform7/Chapter 11/Binary Predicates.w" +#line 908 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__typecheck(binary_predicate *bp, kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) ; -#line 934 "inform7/Chapter 11/Binary Predicates.w" +#line 928 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__assert(binary_predicate *bp, inference_subject *subj0, specification *spec0, inference_subject *subj1, specification *spec1) ; -#line 954 "inform7/Chapter 11/Binary Predicates.w" +#line 948 "inform7/Chapter 11/Binary Predicates.w" i6_schema * BinaryPredicates__get_i6_schema(int task, binary_predicate *bp, annotated_i6_schema *asch) ; -#line 982 "inform7/Chapter 11/Binary Predicates.w" +#line 976 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__describe_for_problems(OUTPUT_STREAM, binary_predicate *bp) ; #line 124 "inform7/Chapter 11/Relations.w" void Relations__parse_new(parse_node *PN) ; @@ -6129,21 +6171,21 @@ int Relations__get_relation_index(inference_subject *infs, int i) ; void Relations__free_index_storage(void) ; #line 1511 "inform7/Chapter 11/Relations.w" void Relations__equivalence_relation_make_singleton_partitions(binary_predicate *bp, int domain_size) ; -#line 1551 "inform7/Chapter 11/Relations.w" +#line 1550 "inform7/Chapter 11/Relations.w" void Relations__equivalence_relation_merge_classes(binary_predicate *bp, int domain_size, int ix1, int ix2) ; -#line 1575 "inform7/Chapter 11/Relations.w" +#line 1574 "inform7/Chapter 11/Relations.w" void Relations__equivalence_relation_add_properties(binary_predicate *bp) ; -#line 1602 "inform7/Chapter 11/Relations.w" +#line 1601 "inform7/Chapter 11/Relations.w" int Relations__equivalence_relation_get_class(binary_predicate *bp, int ix) ; -#line 1621 "inform7/Chapter 11/Relations.w" +#line 1620 "inform7/Chapter 11/Relations.w" void Relations__check_1to1_relation(binary_predicate *bp) ; -#line 1686 "inform7/Chapter 11/Relations.w" +#line 1685 "inform7/Chapter 11/Relations.w" void Relations__compile_defined_relations(OUTPUT_STREAM) ; -#line 1783 "inform7/Chapter 11/Relations.w" +#line 1782 "inform7/Chapter 11/Relations.w" void Relations__compile_routine_to_decide(OUTPUT_STREAM, char *rname, int w1, int w2, bp_term_details par1, bp_term_details par2) ; -#line 1812 "inform7/Chapter 11/Relations.w" +#line 1811 "inform7/Chapter 11/Relations.w" void Relations__index_table(void) ; -#line 1862 "inform7/Chapter 11/Relations.w" +#line 1861 "inform7/Chapter 11/Relations.w" void Relations__index_for_verbs(binary_predicate *bp) ; #line 14 "inform7/Chapter 11/Explicit Relations.w" void Relations__Explicit__REL_create_initial_stock(void) ; @@ -6229,77 +6271,77 @@ void Prepositions__log(preposition_usage *pu) ; void Prepositions__register_comparative(int wn, binary_predicate *root) ; #line 188 "inform7/Chapter 11/Prepositions.w" void Prepositions__register_same_property_as(binary_predicate *root) ; -#line 244 "inform7/Chapter 12/Lexer.w" +#line 238 "inform7/Chapter 12/Lexer.w" void Lexer__start(void) ; -#line 260 "inform7/Chapter 12/Lexer.w" +#line 254 "inform7/Chapter 12/Lexer.w" void Lexer__ensure_space_up_to(int n) ; -#line 296 "inform7/Chapter 12/Lexer.w" +#line 290 "inform7/Chapter 12/Lexer.w" void Lexer__ensure_lexer_hwm_can_be_raised_by(int n, int transfer_partial_word) ; -#line 311 "inform7/Chapter 12/Lexer.w" +#line 305 "inform7/Chapter 12/Lexer.w" void Lexer__allocate_lexer_workspace_chunk(void) ; -#line 325 "inform7/Chapter 12/Lexer.w" +#line 319 "inform7/Chapter 12/Lexer.w" char * Lexer__copy_to_memory(char *p) ; -#line 374 "inform7/Chapter 12/Lexer.w" +#line 368 "inform7/Chapter 12/Lexer.w" int Lexer__is_punctuation(char c) ; -#line 391 "inform7/Chapter 12/Lexer.w" +#line 385 "inform7/Chapter 12/Lexer.w" int Lexer__indentation_level(int wn) ; -#line 397 "inform7/Chapter 12/Lexer.w" +#line 391 "inform7/Chapter 12/Lexer.w" char Lexer__break_char_for_indents(int t) ; -#line 406 "inform7/Chapter 12/Lexer.w" +#line 400 "inform7/Chapter 12/Lexer.w" vocabulary_entry * Lexer__word(int wn) ; -#line 410 "inform7/Chapter 12/Lexer.w" +#line 404 "inform7/Chapter 12/Lexer.w" void Lexer__set_word(int wn, vocabulary_entry *ve) ; -#line 414 "inform7/Chapter 12/Lexer.w" +#line 408 "inform7/Chapter 12/Lexer.w" int Lexer__break_before(int wn) ; -#line 418 "inform7/Chapter 12/Lexer.w" +#line 412 "inform7/Chapter 12/Lexer.w" source_file * Lexer__file_of_origin(int wn) ; -#line 422 "inform7/Chapter 12/Lexer.w" +#line 416 "inform7/Chapter 12/Lexer.w" source_location Lexer__word_location(int wn) ; -#line 426 "inform7/Chapter 12/Lexer.w" +#line 420 "inform7/Chapter 12/Lexer.w" char * Lexer__word_raw_text(int wn) ; -#line 430 "inform7/Chapter 12/Lexer.w" +#line 424 "inform7/Chapter 12/Lexer.w" void Lexer__set_word_raw_text(int wn, char *rt) ; -#line 434 "inform7/Chapter 12/Lexer.w" +#line 428 "inform7/Chapter 12/Lexer.w" char * Lexer__word_text(int wn) ; -#line 438 "inform7/Chapter 12/Lexer.w" +#line 432 "inform7/Chapter 12/Lexer.w" void Lexer__set_word_text(int wn, char *rt) ; -#line 442 "inform7/Chapter 12/Lexer.w" +#line 436 "inform7/Chapter 12/Lexer.w" void Lexer__word_copy(int to, int from) ; -#line 511 "inform7/Chapter 12/Lexer.w" +#line 505 "inform7/Chapter 12/Lexer.w" void Lexer__reset_lexer(void) ; -#line 552 "inform7/Chapter 12/Lexer.w" +#line 546 "inform7/Chapter 12/Lexer.w" void Lexer__feed_begins(source_location sl) ; -#line 560 "inform7/Chapter 12/Lexer.w" +#line 554 "inform7/Chapter 12/Lexer.w" void Lexer__feed_ends(int *range_read_w1, int *range_read_w2, int extra_padding, char *problem_source_description) ; -#line 674 "inform7/Chapter 12/Lexer.w" +#line 668 "inform7/Chapter 12/Lexer.w" void Lexer__feed_triplet(int last_cr, int cr, int next_cr) ; -#line 731 "inform7/Chapter 12/Lexer.w" +#line 725 "inform7/Chapter 12/Lexer.w" void Lexer__feed_char_into_lexer(char c) ; -#line 1112 "inform7/Chapter 12/Lexer.w" +#line 1106 "inform7/Chapter 12/Lexer.w" int Lexer__splice_words(int w1, int w2) ; -#line 61 "inform7/Chapter 12/Read Source Text.w" -int SourceFiles__read_extension_source_text(extension_file *EF, char *filename, char *synopsis, int documentation_only) ; -#line 68 "inform7/Chapter 12/Read Source Text.w" +#line 60 "inform7/Chapter 12/Read Source Text.w" +int SourceFiles__read_extension_source_text(extension_file *EF, char *synopsis, int documentation_only) ; +#line 67 "inform7/Chapter 12/Read Source Text.w" void SourceFiles__read_primary_source_text(void) ; -#line 90 "inform7/Chapter 12/Read Source Text.w" -int SourceFiles__read_file(char *pathname, char *leafname, char *synopsis, extension_file *EF, int documentation_only) ; -#line 207 "inform7/Chapter 12/Read Source Text.w" -void SourceFiles__feed_file_into_lexer(source_file *sf, char *leafname, int documentation_only) ; -#line 261 "inform7/Chapter 12/Read Source Text.w" +#line 86 "inform7/Chapter 12/Read Source Text.w" +int SourceFiles__read_file(filename *F, char *synopsis, extension_file *EF, int documentation_only) ; +#line 190 "inform7/Chapter 12/Read Source Text.w" +void SourceFiles__feed_file_into_lexer(source_file *sf, char *leaf, int documentation_only) ; +#line 244 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__word_count(int wc) ; -#line 290 "inform7/Chapter 12/Read Source Text.w" +#line 273 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__total_word_count(source_file *sf) ; -#line 294 "inform7/Chapter 12/Read Source Text.w" +#line 277 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__last_lexed_word(source_file *sf) ; -#line 304 "inform7/Chapter 12/Read Source Text.w" -char * SourceFiles__get_filename(source_file *sf) ; -#line 309 "inform7/Chapter 12/Read Source Text.w" +#line 287 "inform7/Chapter 12/Read Source Text.w" +filename * SourceFiles__get_filename(source_file *sf) ; +#line 292 "inform7/Chapter 12/Read Source Text.w" extension_file * SourceFiles__get_extension_corresponding(source_file *sf) ; -#line 314 "inform7/Chapter 12/Read Source Text.w" +#line 297 "inform7/Chapter 12/Read Source Text.w" source_file * SourceFiles__filename_to_source_file(char *filename) ; -#line 350 "inform7/Chapter 12/Read Source Text.w" +#line 335 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) ; -#line 447 "inform7/Chapter 12/Read Source Text.w" +#line 432 "inform7/Chapter 12/Read Source Text.w" void SourceFiles__feed_into_lexer(char *text, int expand_strings, char *nonstandard) ; #line 32 "inform7/Chapter 12/Lexical Services.w" int Text__compare_word_by_strcmp(int w, char *t) ; @@ -6407,21 +6449,21 @@ void ParseTree__log_subtree(parse_node *p, int indentation) ; void ParseTree__log_subtree_recursively(parse_node *p, int indentation) ; #line 603 "inform7/Chapter 13/Parse Tree.w" void ParseTree__log_single_node(parse_node *p, int indentation) ; -#line 152 "inform7/Chapter 13/Verify Parse Tree.w" +#line 150 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__log_type(int t) ; -#line 157 "inform7/Chapter 13/Verify Parse Tree.w" +#line 155 "inform7/Chapter 13/Verify Parse Tree.w" char * ParseTree__Verification__get_type_name(int t) ; -#line 175 "inform7/Chapter 13/Verify Parse Tree.w" +#line 173 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify_integrity(parse_node *p, int worth_logging) ; -#line 198 "inform7/Chapter 13/Verify Parse Tree.w" +#line 196 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__tidy_tree_after_verification(parse_node *p) ; -#line 212 "inform7/Chapter 13/Verify Parse Tree.w" +#line 210 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify_tree_integrity_recursively(parse_node *p, parse_node *from, char *way, int depth) ; -#line 250 "inform7/Chapter 13/Verify Parse Tree.w" +#line 248 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify(void) ; -#line 269 "inform7/Chapter 13/Verify Parse Tree.w" +#line 267 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, parse_node *parent, int current_weight) ; -#line 355 "inform7/Chapter 13/Verify Parse Tree.w" +#line 353 "inform7/Chapter 13/Verify Parse Tree.w" int ParseTree__Verification__allow_in_assertions(parse_node *subtree) ; #line 33 "inform7/Chapter 13/Sentences.w" void Sentences__declare_source_loaded(void) ; @@ -6477,17 +6519,17 @@ nametag * Sentences__Headings__highest_scoring_nametag_searched(void) ; void Sentences__Headings__handle_heading(parse_node *PN) ; #line 1019 "inform7/Chapter 13/Headings.w" void Sentences__Headings__log(heading *h) ; -#line 1033 "inform7/Chapter 13/Headings.w" +#line 1035 "inform7/Chapter 13/Headings.w" void Sentences__Headings__log_all_headings(void) ; -#line 1040 "inform7/Chapter 13/Headings.w" +#line 1042 "inform7/Chapter 13/Headings.w" void Sentences__Headings__log_headings_recursively(heading *h, int depth) ; -#line 1054 "inform7/Chapter 13/Headings.w" +#line 1056 "inform7/Chapter 13/Headings.w" void Sentences__Headings__index(void) ; -#line 1121 "inform7/Chapter 13/Headings.w" +#line 1123 "inform7/Chapter 13/Headings.w" void Sentences__Headings__index_heading_recursively(heading *h) ; -#line 1182 "inform7/Chapter 13/Headings.w" +#line 1184 "inform7/Chapter 13/Headings.w" void Sentences__Headings__write_as_xml(void) ; -#line 1191 "inform7/Chapter 13/Headings.w" +#line 1192 "inform7/Chapter 13/Headings.w" void Sentences__Headings__write_headings_as_xml_inner(OUTPUT_STREAM) ; #line 150 "inform7/Chapter 13/Verb Phrases.w" void Sentences__VPs__traverse(void) ; @@ -6547,157 +6589,157 @@ void Sentences__RuleSubtrees__create_standard_csps(void) ; int Sentences__RuleSubtrees__is_otherwise_if(int w1, int w2) ; #line 600 "inform7/Chapter 13/Rule Subtrees.w" control_structure_phrase * Sentences__RuleSubtrees__detect_control_structure(int w1, int w2) ; -#line 190 "inform7/Chapter 14/Extension Files.w" +#line 187 "inform7/Chapter 14/Extension Files.w" extension_file * Extensions__Files__new(int author_w1, int author_w2, int nw1, int nw2, int vm1, int vm2, int version_word) ; -#line 252 "inform7/Chapter 14/Extension Files.w" +#line 249 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_rubric(extension_file *ef, char *text) ; -#line 257 "inform7/Chapter 14/Extension Files.w" +#line 254 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_extra_credit(extension_file *ef, char *text) ; -#line 267 "inform7/Chapter 14/Extension Files.w" +#line 264 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_corresponding_source_file(extension_file *ef, source_file *sf) ; -#line 271 "inform7/Chapter 14/Extension Files.w" +#line 268 "inform7/Chapter 14/Extension Files.w" source_file * Extensions__Files__get_corresponding_source_file(extension_file *ef) ; -#line 278 "inform7/Chapter 14/Extension Files.w" +#line 275 "inform7/Chapter 14/Extension Files.w" extension_identifier * Extensions__Files__get_eid(extension_file *ef) ; -#line 285 "inform7/Chapter 14/Extension Files.w" +#line 282 "inform7/Chapter 14/Extension Files.w" int Extensions__Files__get_version_wn(extension_file *ef) ; -#line 296 "inform7/Chapter 14/Extension Files.w" +#line 293 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_authorial_modesty(extension_file *ef) ; -#line 297 "inform7/Chapter 14/Extension Files.w" +#line 294 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_general_authorial_modesty(void) ; -#line 305 "inform7/Chapter 14/Extension Files.w" +#line 302 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_name_to_file(extension_file *ef, OUTPUT_STREAM) ; -#line 309 "inform7/Chapter 14/Extension Files.w" +#line 306 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_author_to_file(extension_file *ef, OUTPUT_STREAM) ; -#line 316 "inform7/Chapter 14/Extension Files.w" +#line 313 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__log(extension_file *ef) ; -#line 325 "inform7/Chapter 14/Extension Files.w" +#line 322 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_I6_comment_describing(extension_file *ef, OUTPUT_STREAM) ; -#line 340 "inform7/Chapter 14/Extension Files.w" +#line 337 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_full_title_to_stream(OUTPUT_STREAM, extension_file *ef) ; -#line 357 "inform7/Chapter 14/Extension Files.w" +#line 354 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__check_versions(void) ; -#line 405 "inform7/Chapter 14/Extension Files.w" +#line 402 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__ShowExtensionVersions_routine(OUTPUT_STREAM) ; -#line 435 "inform7/Chapter 14/Extension Files.w" +#line 432 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__credit_ef(OUTPUT_STREAM, extension_file *ef, int with_newline) ; -#line 452 "inform7/Chapter 14/Extension Files.w" +#line 449 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__index(void) ; -#line 463 "inform7/Chapter 14/Extension Files.w" +#line 460 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__index_extensions_from(extension_file *from) ; -#line 527 "inform7/Chapter 14/Extension Files.w" +#line 524 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__handle_census_mode(void) ; -#line 537 "inform7/Chapter 14/Extension Files.w" +#line 534 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__update_census(void) ; -#line 553 "inform7/Chapter 14/Extension Files.w" +#line 550 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_sketchy_documentation_for_extensions_found(void) ; -#line 589 "inform7/Chapter 14/Extension Files.w" +#line 585 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_top_level_of_extensions_documentation(void) ; -#line 597 "inform7/Chapter 14/Extension Files.w" -void Extensions__Files__write_top_level_extensions_page(char *leafname, int content) ; +#line 593 "inform7/Chapter 14/Extension Files.w" +void Extensions__Files__write_top_level_extensions_page(char *leaf, int content) ; #line 31 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__traverse(void) ; #line 111 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__fulfill_request_to_include_extension(parse_node *p, parse_node *auth_p) ; #line 155 "inform7/Chapter 14/Including Extensions.w" extension_file * Extensions__Inclusion__load(int author_w1, int author_w2, int name_w1, int name_w2, int version_word, int vm1, int vm2) ; -#line 299 "inform7/Chapter 14/Including Extensions.w" +#line 286 "inform7/Chapter 14/Including Extensions.w" int Extensions__Inclusion__parse_version(int vwn) ; -#line 387 "inform7/Chapter 14/Including Extensions.w" +#line 374 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef) ; -#line 481 "inform7/Chapter 14/Including Extensions.w" +#line 468 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__check_ends_here(parse_node *PN, extension_file *ef) ; -#line 521 "inform7/Chapter 14/Including Extensions.w" +#line 508 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__handle_extension_begins(parse_node *PN) ; -#line 525 "inform7/Chapter 14/Including Extensions.w" +#line 512 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__handle_extension_ends(parse_node *PN) ; -#line 80 "inform7/Chapter 14/Extension Identifiers.w" +#line 76 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__new(extension_identifier *eid, char *an, char *ti, int context) ; -#line 102 "inform7/Chapter 14/Extension Identifiers.w" +#line 98 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__set_raw(extension_identifier *eid, char *raw_an, char *raw_ti) ; -#line 107 "inform7/Chapter 14/Extension Identifiers.w" +#line 103 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__write_to_HTML_file(OUTPUT_STREAM, extension_identifier *eid, int fancy) ; -#line 115 "inform7/Chapter 14/Extension Identifiers.w" +#line 111 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__write_to_I6_file(OUTPUT_STREAM, extension_identifier *eid) ; -#line 123 "inform7/Chapter 14/Extension Identifiers.w" +#line 119 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__write_to_C_string(char *p, extension_identifier *eid) ; -#line 127 "inform7/Chapter 14/Extension Identifiers.w" +#line 123 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__write_link_to_HTML_file(OUTPUT_STREAM, extension_identifier *eid) ; -#line 149 "inform7/Chapter 14/Extension Identifiers.w" +#line 145 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__match(extension_identifier *eid1, extension_identifier *eid2) ; -#line 160 "inform7/Chapter 14/Extension Identifiers.w" +#line 156 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__compare(extension_identifier *eid1, extension_identifier *eid2) ; -#line 168 "inform7/Chapter 14/Extension Identifiers.w" +#line 164 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__compare_by_title(extension_identifier *eid1, extension_identifier *eid2) ; -#line 176 "inform7/Chapter 14/Extension Identifiers.w" +#line 172 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__compare_by_date(extension_identifier *eid1, extension_identifier *eid2) ; -#line 186 "inform7/Chapter 14/Extension Identifiers.w" +#line 182 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__compare_by_length(extension_identifier *eid1, extension_identifier *eid2) ; -#line 203 "inform7/Chapter 14/Extension Identifiers.w" +#line 199 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__is_standard_rules(extension_identifier *eid) ; -#line 230 "inform7/Chapter 14/Extension Identifiers.w" +#line 226 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__add_EID_to_database(extension_identifier *eid, int context) ; -#line 257 "inform7/Chapter 14/Extension Identifiers.w" +#line 253 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__set_usage_date(extension_identifier *eid, char *date) ; -#line 267 "inform7/Chapter 14/Extension Identifiers.w" +#line 263 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__set_sort_date(extension_identifier *eid, char *date) ; -#line 277 "inform7/Chapter 14/Extension Identifiers.w" +#line 273 "inform7/Chapter 14/Extension Identifiers.w" char * Extensions__IDs__get_usage_date(extension_identifier *eid) ; -#line 291 "inform7/Chapter 14/Extension Identifiers.w" +#line 287 "inform7/Chapter 14/Extension Identifiers.w" char * Extensions__IDs__get_sort_date(extension_identifier *eid) ; -#line 305 "inform7/Chapter 14/Extension Identifiers.w" +#line 301 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__set_word_count(extension_identifier *eid, int wc) ; -#line 315 "inform7/Chapter 14/Extension Identifiers.w" +#line 311 "inform7/Chapter 14/Extension Identifiers.w" char * Extensions__IDs__get_sort_word_count(extension_identifier *eid) ; -#line 329 "inform7/Chapter 14/Extension Identifiers.w" +#line 325 "inform7/Chapter 14/Extension Identifiers.w" char * Extensions__IDs__get_word_count(extension_identifier *eid) ; -#line 339 "inform7/Chapter 14/Extension Identifiers.w" +#line 335 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__no_times_used_in_context(extension_identifier *eid, int context) ; -#line 349 "inform7/Chapter 14/Extension Identifiers.w" +#line 345 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__log_EID_hash_table(void) ; -#line 372 "inform7/Chapter 14/Extension Identifiers.w" +#line 368 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__truncated_strcpy(char *to, char *from, int max) ; -#line 384 "inform7/Chapter 14/Extension Identifiers.w" +#line 380 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__normalise_casing(char *p) ; -#line 401 "inform7/Chapter 14/Extension Identifiers.w" +#line 397 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__begin_extension_link(OUTPUT_STREAM, extension_identifier *eid, char *rubric) ; -#line 415 "inform7/Chapter 14/Extension Identifiers.w" +#line 411 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__escape_apostrophes(OUTPUT_STREAM, char *p) ; -#line 425 "inform7/Chapter 14/Extension Identifiers.w" +#line 421 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__end_extension_link(OUTPUT_STREAM, extension_identifier *eid) ; -#line 51 "inform7/Chapter 14/Extension Census.w" +#line 54 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__perform(void) ; -#line 86 "inform7/Chapter 14/Extension Census.w" -void Extensions__Census__take_census_of_domain(char *pathname, int origin) ; -#line 112 "inform7/Chapter 14/Extension Census.w" -void Extensions__Census__census_from(char *pathname, int top_level, int origin, char *parent) ; -#line 534 "inform7/Chapter 14/Extension Census.w" +#line 70 "inform7/Chapter 14/Extension Census.w" +void Extensions__Census__take_census_of_domain(pathname *P, int origin) ; +#line 96 "inform7/Chapter 14/Extension Census.w" +void Extensions__Census__census_from(pathname *P, int top_level, int origin, char *parent) ; +#line 514 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__begin_recording_census_errors(void) ; -#line 539 "inform7/Chapter 14/Extension Census.w" +#line 519 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__currently_recording_errors(void) ; -#line 544 "inform7/Chapter 14/Extension Census.w" +#line 524 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__end_recording_census_errors(void) ; -#line 554 "inform7/Chapter 14/Extension Census.w" +#line 534 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__census_error(char *message, char *auth, char *title, char *claimed_author, char *claimed_title) ; -#line 580 "inform7/Chapter 14/Extension Census.w" +#line 557 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__warn_about_census_errors(OUTPUT_STREAM) ; -#line 595 "inform7/Chapter 14/Extension Census.w" +#line 572 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__transcribe_census_errors(OUTPUT_STREAM) ; -#line 643 "inform7/Chapter 14/Extension Census.w" +#line 619 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__write_results(OUTPUT_STREAM) ; -#line 1026 "inform7/Chapter 14/Extension Census.w" +#line 1000 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__installation_region(extension_census_datum *ecd) ; -#line 1033 "inform7/Chapter 14/Extension Census.w" +#line 1007 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__ecd_used(extension_census_datum *ecd) ; -#line 1045 "inform7/Chapter 14/Extension Census.w" +#line 1019 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_title(const void *ecd1, const void *ecd2) ; -#line 1051 "inform7/Chapter 14/Extension Census.w" +#line 1025 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_author(const void *ecd1, const void *ecd2) ; -#line 1057 "inform7/Chapter 14/Extension Census.w" +#line 1031 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_installation(const void *ecd1, const void *ecd2) ; -#line 1065 "inform7/Chapter 14/Extension Census.w" +#line 1039 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_date(const void *ecd1, const void *ecd2) ; -#line 1071 "inform7/Chapter 14/Extension Census.w" +#line 1045 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_length(const void *ecd1, const void *ecd2) ; #line 109 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__log_entry(extension_dictionary_entry *ede) ; @@ -6715,21 +6757,21 @@ void Extensions__Dictionary__new_entry_from_string(char *category, extension_fi void Extensions__Dictionary__new_dictionary_entry_raw(char *category, char *author, char *title, char *headword) ; #line 221 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__load(void) ; -#line 292 "inform7/Chapter 14/Extension Dictionary.w" +#line 286 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__time_stamp(extension_file *ef) ; -#line 312 "inform7/Chapter 14/Extension Dictionary.w" +#line 306 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__write_back(void) ; -#line 365 "inform7/Chapter 14/Extension Dictionary.w" +#line 355 "inform7/Chapter 14/Extension Dictionary.w" int Extensions__Dictionary__sort_extension_dictionary(void) ; -#line 460 "inform7/Chapter 14/Extension Dictionary.w" +#line 450 "inform7/Chapter 14/Extension Dictionary.w" int Extensions__Dictionary__compare_ed_entries(const void *elem1, const void *elem2) ; -#line 476 "inform7/Chapter 14/Extension Dictionary.w" +#line 466 "inform7/Chapter 14/Extension Dictionary.w" known_extension_clash * Extensions__Dictionary__kec_new(extension_dictionary_entry *L, extension_dictionary_entry *R, int first_known_flag) ; -#line 540 "inform7/Chapter 14/Extension Dictionary.w" +#line 530 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, extension_dictionary_entry *ede2) ; -#line 597 "inform7/Chapter 14/Extension Dictionary.w" +#line 587 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__list_known_extension_clashes(OUTPUT_STREAM) ; -#line 645 "inform7/Chapter 14/Extension Dictionary.w" +#line 635 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__write_to_HTML(OUTPUT_STREAM) ; #line 14 "inform7/Chapter 14/Extension Documentation.w" void Extensions__Documentation__write_detailed(extension_file *ef) ; @@ -6739,7 +6781,7 @@ void Extensions__Documentation__write_sketchy(extension_census_datum *ecd) ; void Extensions__Documentation__write_extension_documentation(extension_census_datum *ecd, extension_file *ef) ; #line 61 "inform7/Chapter 14/Extension Documentation.w" int Extensions__Documentation__write_extension_documentation_page(extension_census_datum *ecd, extension_file *ef, int eg_number) ; -#line 419 "inform7/Chapter 14/Extension Documentation.w" +#line 410 "inform7/Chapter 14/Extension Documentation.w" int Extensions__Documentation__document_headword(OUTPUT_STREAM, int kc, extension_file *ef, char *par_heading, char *category, int w1, int w2) ; #line 96 "inform7/Chapter 15/Traverse for Assertions.w" void Assertions__Traverse__traverse(int pass) ; @@ -6859,99 +6901,99 @@ void Assertions__Assemblies__ensure_all_generalisations_made(inference_subject void Assertions__Assemblies__satisfies_generalisations(inference_subject *infs) ; #line 302 "inform7/Chapter 15/Assemblies.w" void Assertions__Assemblies__satisfies_generalisation(inference_subject *infs, generalisation *g) ; -#line 45 "inform7/Chapter 15/Implications.w" +#line 44 "inform7/Chapter 15/Implications.w" void Assertions__Implications__new(parse_node *px, parse_node *py) ; -#line 140 "inform7/Chapter 15/Implications.w" +#line 139 "inform7/Chapter 15/Implications.w" void Assertions__Implications__consider_all(inference_subject *infs) ; -#line 167 "inform7/Chapter 15/Implications.w" +#line 166 "inform7/Chapter 15/Implications.w" void Assertions__Implications__set_possessed_flags(inference_subject *infs) ; -#line 215 "inform7/Chapter 15/Implications.w" +#line 214 "inform7/Chapter 15/Implications.w" int Assertions__Implications__check_implications_of(inference_subject *domain, inference_subject *candidate) ; -#line 67 "inform7/Chapter 15/Property Declarations.w" +#line 65 "inform7/Chapter 15/Property Declarations.w" void Assertions__Property__declare_property_can_be(parse_node *p) ; -#line 115 "inform7/Chapter 15/Property Declarations.w" +#line 113 "inform7/Chapter 15/Property Declarations.w" int Assertions__Property__list_length(parse_node *P) ; -#line 459 "inform7/Chapter 15/Property Declarations.w" +#line 456 "inform7/Chapter 15/Property Declarations.w" property * Assertions__Property__recursively_declare_properties(parse_node *owner_ref, parse_node *p) ; -#line 530 "inform7/Chapter 15/Property Declarations.w" +#line 527 "inform7/Chapter 15/Property Declarations.w" void Assertions__Property__recursively_call_properties(parse_node *owner_ref, parse_node *kind_ref, parse_node *prn_ref) ; -#line 223 "inform7/Chapter 16/Meaning Lists.w" +#line 219 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__log_production(unsigned int production) ; -#line 305 "inform7/Chapter 16/Meaning Lists.w" +#line 301 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__log(meaning_list *ml) ; -#line 310 "inform7/Chapter 16/Meaning Lists.w" +#line 306 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int of, int gen) ; -#line 455 "inform7/Chapter 16/Meaning Lists.w" +#line 451 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__get_available_ml(int seeking_permanent_slot) ; -#line 511 "inform7/Chapter 16/Meaning Lists.w" +#line 507 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__finish_this_session(void) ; -#line 619 "inform7/Chapter 16/Meaning Lists.w" +#line 615 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__new(unsigned int code_number) ; -#line 626 "inform7/Chapter 16/Meaning Lists.w" +#line 622 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__new_permanent(unsigned int code_number) ; -#line 650 "inform7/Chapter 16/Meaning Lists.w" +#line 646 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__new_with_words(unsigned int code_number, int w1, int w2) ; -#line 659 "inform7/Chapter 16/Meaning Lists.w" +#line 655 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__from_nametag(nametag *nt) ; -#line 672 "inform7/Chapter 16/Meaning Lists.w" +#line 668 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__type_from_ID(int ID_number) ; -#line 681 "inform7/Chapter 16/Meaning Lists.w" +#line 677 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__type_from_kind(kind *K) ; -#line 692 "inform7/Chapter 16/Meaning Lists.w" +#line 688 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__determiner(quantifier *quant, int parameter, int w1, int w2) ; -#line 706 "inform7/Chapter 16/Meaning Lists.w" +#line 702 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__time(time_period tp) ; -#line 715 "inform7/Chapter 16/Meaning Lists.w" +#line 711 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__verb(verb_usage *vu) ; -#line 724 "inform7/Chapter 16/Meaning Lists.w" +#line 720 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__preposition(preposition_usage *pu) ; -#line 733 "inform7/Chapter 16/Meaning Lists.w" +#line 729 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__option(int opt_num) ; -#line 744 "inform7/Chapter 16/Meaning Lists.w" +#line 740 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__action(action_pattern *ap) ; -#line 750 "inform7/Chapter 16/Meaning Lists.w" +#line 746 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__pastaction(action_pattern *ap) ; -#line 759 "inform7/Chapter 16/Meaning Lists.w" +#line 755 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__say_verb(verb_conjugation *vc, int neg) ; -#line 769 "inform7/Chapter 16/Meaning Lists.w" +#line 765 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__say_modal_verb(verb_conjugation *vc) ; -#line 779 "inform7/Chapter 16/Meaning Lists.w" +#line 775 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__say_adjective(adjectival_phrase *aph) ; -#line 790 "inform7/Chapter 16/Meaning Lists.w" +#line 786 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__copy(meaning_list *ml_to, meaning_list *ml_from) ; -#line 806 "inform7/Chapter 16/Meaning Lists.w" +#line 802 "inform7/Chapter 16/Meaning Lists.w" unsigned int Parser__SP__MeaningLists__production(meaning_list *ml) ; -#line 809 "inform7/Chapter 16/Meaning Lists.w" +#line 805 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_production(meaning_list *ml, unsigned int pr) ; -#line 816 "inform7/Chapter 16/Meaning Lists.w" +#line 812 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__right(meaning_list *ml) ; -#line 819 "inform7/Chapter 16/Meaning Lists.w" +#line 815 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_right(meaning_list *ml, meaning_list *ml2) ; -#line 822 "inform7/Chapter 16/Meaning Lists.w" +#line 818 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__down(meaning_list *ml) ; -#line 825 "inform7/Chapter 16/Meaning Lists.w" +#line 821 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_down(meaning_list *ml, meaning_list *ml2) ; -#line 832 "inform7/Chapter 16/Meaning Lists.w" +#line 828 "inform7/Chapter 16/Meaning Lists.w" meaning_list * Parser__SP__MeaningLists__sideways(meaning_list *ml) ; -#line 835 "inform7/Chapter 16/Meaning Lists.w" +#line 831 "inform7/Chapter 16/Meaning Lists.w" int Parser__SP__MeaningLists__match_score(meaning_list *ml) ; -#line 838 "inform7/Chapter 16/Meaning Lists.w" +#line 834 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_score(meaning_list *ml, int s) ; -#line 849 "inform7/Chapter 16/Meaning Lists.w" +#line 845 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_text(meaning_list *ml, int w1, int w2) ; -#line 854 "inform7/Chapter 16/Meaning Lists.w" +#line 850 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__get_text(meaning_list *ml, int *w1, int *w2) ; -#line 861 "inform7/Chapter 16/Meaning Lists.w" +#line 857 "inform7/Chapter 16/Meaning Lists.w" excerpt_meaning * Parser__SP__MeaningLists__meaning(meaning_list *ml) ; -#line 864 "inform7/Chapter 16/Meaning Lists.w" +#line 860 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_meaning(meaning_list *ml, excerpt_meaning *em) ; -#line 871 "inform7/Chapter 16/Meaning Lists.w" +#line 867 "inform7/Chapter 16/Meaning Lists.w" specification * Parser__SP__MeaningLists__get_attached_spec(meaning_list *ml) ; -#line 874 "inform7/Chapter 16/Meaning Lists.w" +#line 870 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__attach_spec(meaning_list *ml, specification *spec) ; -#line 882 "inform7/Chapter 16/Meaning Lists.w" +#line 878 "inform7/Chapter 16/Meaning Lists.w" general_pointer Parser__SP__MeaningLists__get_attached_data(meaning_list *ml) ; -#line 885 "inform7/Chapter 16/Meaning Lists.w" +#line 881 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__attach_data(meaning_list *ml, general_pointer data) ; #line 84 "inform7/Chapter 16/Parse Excerpts.w" meaning_list * Parser__SP__parse_excerpt_maximal(unsigned int mc_bitmap, int w1, int w2) ; @@ -6979,227 +7021,227 @@ meaning_list * Parser__SP__Subtrees__verb_ml_subtree(unsigned int mc, verb_usage meaning_list * Parser__SP__Subtrees__player_ml_subtree(void) ; #line 204 "inform7/Chapter 16/Verbal and Relative Clauses.w" void Parser__SP__Subtrees__correct_S_subtree_for_adjectives(meaning_list *ml) ; -#line 95 "inform7/Chapter 16/Meaning List Conversions.w" +#line 93 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__CMD_subtree_to_spec(meaning_list *ml) ; -#line 130 "inform7/Chapter 16/Meaning List Conversions.w" +#line 128 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_subtree_to_spec(meaning_list *ml) ; -#line 158 "inform7/Chapter 16/Meaning List Conversions.w" +#line 156 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_subtree_to_spec(meaning_list *ml) ; -#line 212 "inform7/Chapter 16/Meaning List Conversions.w" +#line 210 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_subtree_to_spec(meaning_list *ml) ; -#line 272 "inform7/Chapter 16/Meaning List Conversions.w" +#line 270 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__ACTION_subtree_to_spec(meaning_list *ml) ; -#line 281 "inform7/Chapter 16/Meaning List Conversions.w" +#line 279 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__AP_subtree_to_spec(meaning_list *ml) ; -#line 290 "inform7/Chapter 16/Meaning List Conversions.w" +#line 288 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__CASE_subtree_to_spec(meaning_list *ml) ; -#line 307 "inform7/Chapter 16/Meaning List Conversions.w" +#line 305 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_AND_subtree_to_spec(meaning_list *ml) ; -#line 318 "inform7/Chapter 16/Meaning List Conversions.w" +#line 316 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_OR_subtree_to_spec(meaning_list *ml) ; -#line 329 "inform7/Chapter 16/Meaning List Conversions.w" +#line 327 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_NOT_subtree_to_spec(meaning_list *ml) ; -#line 342 "inform7/Chapter 16/Meaning List Conversions.w" +#line 340 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_PAST_subtree_to_spec(meaning_list *ml) ; -#line 356 "inform7/Chapter 16/Meaning List Conversions.w" +#line 354 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__COND_PHRASE_subtree_to_spec(meaning_list *ml) ; -#line 368 "inform7/Chapter 16/Meaning List Conversions.w" +#line 366 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__DC_subtree_to_spec(meaning_list *ml, int construed_as_noun) ; -#line 441 "inform7/Chapter 16/Meaning List Conversions.w" +#line 439 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__DC_ADJS_subtree_to_spec(meaning_list *ml, int construed_as_noun) ; -#line 464 "inform7/Chapter 16/Meaning List Conversions.w" +#line 462 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__DC_NOUN_subtree_to_spec(meaning_list *ml) ; -#line 473 "inform7/Chapter 16/Meaning List Conversions.w" +#line 471 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__DC_ADJSNOUN_subtree_to_spec(meaning_list *ml) ; -#line 482 "inform7/Chapter 16/Meaning List Conversions.w" +#line 480 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__LITERAL_subtree_to_spec(meaning_list *ml) ; -#line 491 "inform7/Chapter 16/Meaning List Conversions.w" +#line 489 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__LOCAL_subtree_to_spec(meaning_list *ml) ; -#line 500 "inform7/Chapter 16/Meaning List Conversions.w" +#line 498 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__MEMBER_OF_subtree_to_spec(meaning_list *ml) ; -#line 515 "inform7/Chapter 16/Meaning List Conversions.w" +#line 513 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__NP_subtree_to_spec(meaning_list *ml) ; -#line 532 "inform7/Chapter 16/Meaning List Conversions.w" +#line 530 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__OPTION_subtree_to_spec(meaning_list *ml) ; -#line 541 "inform7/Chapter 16/Meaning List Conversions.w" +#line 539 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__OTHERWISE_subtree_to_spec(meaning_list *ml) ; -#line 550 "inform7/Chapter 16/Meaning List Conversions.w" +#line 548 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__PHRASE_subtree_to_spec(meaning_list *ml) ; -#line 559 "inform7/Chapter 16/Meaning List Conversions.w" +#line 557 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__SN_subtree_to_spec(meaning_list *ml) ; -#line 568 "inform7/Chapter 16/Meaning List Conversions.w" +#line 566 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__STV_subtree_to_spec(meaning_list *ml) ; -#line 577 "inform7/Chapter 16/Meaning List Conversions.w" +#line 575 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__SV_subtree_to_spec(meaning_list *ml) ; -#line 586 "inform7/Chapter 16/Meaning List Conversions.w" +#line 584 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_CALLED_subtree_to_spec(meaning_list *ml) ; -#line 599 "inform7/Chapter 16/Meaning List Conversions.w" +#line 597 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_EX_VAR_subtree_to_spec(meaning_list *ml) ; -#line 609 "inform7/Chapter 16/Meaning List Conversions.w" +#line 607 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_GL_VAR_subtree_to_spec(meaning_list *ml) ; -#line 619 "inform7/Chapter 16/Meaning List Conversions.w" +#line 617 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_NEW_VAR_subtree_to_spec(meaning_list *ml) ; -#line 629 "inform7/Chapter 16/Meaning List Conversions.w" +#line 627 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TE_VAR_subtree_to_spec(meaning_list *ml) ; -#line 639 "inform7/Chapter 16/Meaning List Conversions.w" +#line 637 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_subtree_to_spec(meaning_list *ml) ; -#line 656 "inform7/Chapter 16/Meaning List Conversions.w" +#line 654 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_CORR_subtree_to_spec(meaning_list *ml) ; -#line 671 "inform7/Chapter 16/Meaning List Conversions.w" +#line 669 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_ENTRY_subtree_to_spec(meaning_list *ml) ; -#line 696 "inform7/Chapter 16/Meaning List Conversions.w" +#line 694 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_IN_ROW_subtree_to_spec(meaning_list *ml) ; -#line 708 "inform7/Chapter 16/Meaning List Conversions.w" +#line 706 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_LISTED_IN_subtree_to_spec(meaning_list *ml) ; -#line 719 "inform7/Chapter 16/Meaning List Conversions.w" +#line 717 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TR_OF_IN_subtree_to_spec(meaning_list *ml) ; -#line 732 "inform7/Chapter 16/Meaning List Conversions.w" +#line 730 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TYPE_subtree_to_spec(meaning_list *ml) ; -#line 746 "inform7/Chapter 16/Meaning List Conversions.w" +#line 744 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_LIST_ENTRY_subtree_to_spec(meaning_list *ml) ; -#line 757 "inform7/Chapter 16/Meaning List Conversions.w" +#line 755 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_NOTHING_subtree_to_spec(meaning_list *ml) ; -#line 766 "inform7/Chapter 16/Meaning List Conversions.w" +#line 764 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_PAIR_subtree_to_spec(meaning_list *ml) ; -#line 779 "inform7/Chapter 16/Meaning List Conversions.w" +#line 777 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_PROP_OF_subtree_to_spec(meaning_list *ml) ; -#line 805 "inform7/Chapter 16/Meaning List Conversions.w" +#line 803 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VALUE_PHRASE_subtree_to_spec(meaning_list *ml) ; -#line 814 "inform7/Chapter 16/Meaning List Conversions.w" +#line 812 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VAL_RESPONSE_subtree_to_spec(meaning_list *ml) ; -#line 840 "inform7/Chapter 16/Meaning List Conversions.w" +#line 838 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__ACTION_NAME_SMC_to_spec(meaning_list *ml) ; -#line 847 "inform7/Chapter 16/Meaning List Conversions.w" +#line 845 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__ACTIVITY_MC_to_spec(meaning_list *ml) ; -#line 854 "inform7/Chapter 16/Meaning List Conversions.w" +#line 852 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__EQUATION_MC_to_spec(meaning_list *ml) ; -#line 879 "inform7/Chapter 16/Meaning List Conversions.w" +#line 877 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__PROPERTY_MC_to_spec(meaning_list *ml) ; -#line 892 "inform7/Chapter 16/Meaning List Conversions.w" +#line 890 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__NAMED_CONSTANT_MC_to_spec(meaning_list *ml) ; -#line 899 "inform7/Chapter 16/Meaning List Conversions.w" +#line 897 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__PHRASE_CONSTANT_MC_to_spec(meaning_list *ml) ; -#line 906 "inform7/Chapter 16/Meaning List Conversions.w" +#line 904 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__RELATION_SMC_to_spec(meaning_list *ml) ; -#line 913 "inform7/Chapter 16/Meaning List Conversions.w" +#line 911 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__RULE_MC_to_spec(meaning_list *ml) ; -#line 920 "inform7/Chapter 16/Meaning List Conversions.w" +#line 918 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__RULE_SMC_to_spec(meaning_list *ml) ; -#line 927 "inform7/Chapter 16/Meaning List Conversions.w" +#line 925 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__RULEBOOK_MC_to_spec(meaning_list *ml) ; -#line 934 "inform7/Chapter 16/Meaning List Conversions.w" +#line 932 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__RULE_OUTCOME_SMC_to_spec(meaning_list *ml, int as_value) ; -#line 943 "inform7/Chapter 16/Meaning List Conversions.w" +#line 941 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TABLE_MC_to_spec(meaning_list *ml) ; -#line 950 "inform7/Chapter 16/Meaning List Conversions.w" +#line 948 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__TABLE_COLUMN_MC_to_spec(meaning_list *ml) ; -#line 957 "inform7/Chapter 16/Meaning List Conversions.w" +#line 955 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__USE_OPTION_SMC_to_spec(meaning_list *ml) ; -#line 964 "inform7/Chapter 16/Meaning List Conversions.w" +#line 962 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__VARIABLE_MC_to_spec(meaning_list *ml) ; -#line 971 "inform7/Chapter 16/Meaning List Conversions.w" +#line 969 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__NAMETAG_MC_to_spec(meaning_list *ml) ; -#line 986 "inform7/Chapter 16/Meaning List Conversions.w" +#line 984 "inform7/Chapter 16/Meaning List Conversions.w" kind * Parser__SP__Conversion__police_te(meaning_list *ml) ; -#line 1057 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1055 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) ; -#line 1232 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1230 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjlist, meaning_list *noun) ; -#line 1302 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1300 "inform7/Chapter 16/Meaning List Conversions.w" adjective_usage * Parser__SP__Conversion__adj_to_adjective_usage(meaning_list *ml) ; -#line 1325 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1323 "inform7/Chapter 16/Meaning List Conversions.w" specification * Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml) ; -#line 92 "inform7/Chapter 17/Terms.w" +#line 73 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__new_variable(int v) ; -#line 99 "inform7/Chapter 17/Terms.w" +#line 80 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__new_constant(specification *c) ; -#line 105 "inform7/Chapter 17/Terms.w" +#line 86 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__new_function(binary_predicate *bp, pcalc_term ptof, int t) ; -#line 149 "inform7/Chapter 17/Terms.w" +#line 130 "inform7/Chapter 17/Terms.w" specification * Calculus__Terms__constant_underlying(pcalc_term *t) ; -#line 156 "inform7/Chapter 17/Terms.w" +#line 137 "inform7/Chapter 17/Terms.w" int Calculus__Terms__variable_underlying(pcalc_term *t) ; -#line 175 "inform7/Chapter 17/Terms.w" +#line 156 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__adj_to_noun_conversion(adjective_usage *tr) ; -#line 187 "inform7/Chapter 17/Terms.w" +#line 168 "inform7/Chapter 17/Terms.w" adjective_usage * Calculus__Terms__noun_to_adj_conversion(pcalc_term pt) ; -#line 220 "inform7/Chapter 17/Terms.w" +#line 201 "inform7/Chapter 17/Terms.w" void Calculus__Terms__compile(OUTPUT_STREAM, pcalc_term pt) ; -#line 254 "inform7/Chapter 17/Terms.w" +#line 235 "inform7/Chapter 17/Terms.w" void Calculus__Terms__log(pcalc_term *pt) ; -#line 84 "inform7/Chapter 17/Atomic Propositions.w" +#line 74 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__element_get_group(int element) ; -#line 98 "inform7/Chapter 17/Atomic Propositions.w" +#line 88 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__element_get_match(int element) ; -#line 112 "inform7/Chapter 17/Atomic Propositions.w" +#line 102 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__new(int element) ; -#line 144 "inform7/Chapter 17/Atomic Propositions.w" +#line 134 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__QUANTIFIER_new(quantifier *quant, int v, int parameter) ; -#line 156 "inform7/Chapter 17/Atomic Propositions.w" +#line 146 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_quantifier(pcalc_prop *prop) ; -#line 161 "inform7/Chapter 17/Atomic Propositions.w" +#line 151 "inform7/Chapter 17/Atomic Propositions.w" quantifier * Calculus__Atoms__get_quantifier(pcalc_prop *prop) ; -#line 167 "inform7/Chapter 17/Atomic Propositions.w" +#line 157 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__get_quantification_parameter(pcalc_prop *prop) ; -#line 173 "inform7/Chapter 17/Atomic Propositions.w" +#line 163 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_existence_quantifier(pcalc_prop *prop) ; -#line 180 "inform7/Chapter 17/Atomic Propositions.w" +#line 170 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_nonexistence_quantifier(pcalc_prop *prop) ; -#line 187 "inform7/Chapter 17/Atomic Propositions.w" +#line 177 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_forall_quantifier(pcalc_prop *prop) ; -#line 194 "inform7/Chapter 17/Atomic Propositions.w" +#line 184 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_notall_quantifier(pcalc_prop *prop) ; -#line 201 "inform7/Chapter 17/Atomic Propositions.w" +#line 191 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_for_all_x(pcalc_prop *prop) ; -#line 209 "inform7/Chapter 17/Atomic Propositions.w" +#line 199 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_now_assertable_quantifier(pcalc_prop *prop) ; -#line 218 "inform7/Chapter 17/Atomic Propositions.w" +#line 208 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__EVERYWHERE_new(pcalc_term pt) ; -#line 228 "inform7/Chapter 17/Atomic Propositions.w" +#line 218 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__NOWHERE_new(pcalc_term pt) ; -#line 238 "inform7/Chapter 17/Atomic Propositions.w" +#line 228 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__HERE_new(pcalc_term pt) ; -#line 248 "inform7/Chapter 17/Atomic Propositions.w" +#line 238 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__ISAKIND_new(pcalc_term pt, kind *K) ; -#line 259 "inform7/Chapter 17/Atomic Propositions.w" +#line 249 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__ISAVAR_new(pcalc_term pt) ; -#line 269 "inform7/Chapter 17/Atomic Propositions.w" +#line 259 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__ISACONST_new(pcalc_term pt) ; -#line 291 "inform7/Chapter 17/Atomic Propositions.w" +#line 281 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__CALLED_new(int w1, int w2, pcalc_term pt, kind *K) ; -#line 300 "inform7/Chapter 17/Atomic Propositions.w" +#line 290 "inform7/Chapter 17/Atomic Propositions.w" void Calculus__Atoms__CALLED_get_name(pcalc_prop *prop, int *w1, int *w2) ; -#line 330 "inform7/Chapter 17/Atomic Propositions.w" +#line 320 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__KIND_new(kind *K, pcalc_term pt) ; -#line 338 "inform7/Chapter 17/Atomic Propositions.w" +#line 328 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__KIND_new_composited(kind *K, pcalc_term pt) ; -#line 347 "inform7/Chapter 17/Atomic Propositions.w" +#line 337 "inform7/Chapter 17/Atomic Propositions.w" kind * Calculus__Atoms__get_asserted_kind(pcalc_prop *prop) ; -#line 352 "inform7/Chapter 17/Atomic Propositions.w" +#line 342 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_composited(pcalc_prop *prop) ; -#line 357 "inform7/Chapter 17/Atomic Propositions.w" +#line 347 "inform7/Chapter 17/Atomic Propositions.w" void Calculus__Atoms__set_composited(pcalc_prop *prop, int state) ; -#line 364 "inform7/Chapter 17/Atomic Propositions.w" +#line 354 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_unarticled(pcalc_prop *prop) ; -#line 369 "inform7/Chapter 17/Atomic Propositions.w" +#line 359 "inform7/Chapter 17/Atomic Propositions.w" void Calculus__Atoms__set_unarticled(pcalc_prop *prop, int state) ; -#line 378 "inform7/Chapter 17/Atomic Propositions.w" +#line 368 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__unary_PREDICATE_from_aph(adjectival_phrase *aph, int negated) ; -#line 387 "inform7/Chapter 17/Atomic Propositions.w" +#line 377 "inform7/Chapter 17/Atomic Propositions.w" adjective_usage * Calculus__Atoms__au_from_unary_PREDICATE(pcalc_prop *prop) ; -#line 394 "inform7/Chapter 17/Atomic Propositions.w" +#line 384 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__binary_PREDICATE_new(binary_predicate *bp, pcalc_term pt1, pcalc_term pt2) ; -#line 403 "inform7/Chapter 17/Atomic Propositions.w" +#line 393 "inform7/Chapter 17/Atomic Propositions.w" binary_predicate * Calculus__Atoms__is_binary_predicate(pcalc_prop *prop) ; -#line 410 "inform7/Chapter 17/Atomic Propositions.w" +#line 400 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_equality_predicate(pcalc_prop *prop) ; -#line 419 "inform7/Chapter 17/Atomic Propositions.w" +#line 409 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop * Calculus__Atoms__prop_x_is_constant(specification *spec) ; -#line 427 "inform7/Chapter 17/Atomic Propositions.w" +#line 417 "inform7/Chapter 17/Atomic Propositions.w" pcalc_term * Calculus__Atoms__is_x_equals(pcalc_prop *prop) ; -#line 436 "inform7/Chapter 17/Atomic Propositions.w" +#line 426 "inform7/Chapter 17/Atomic Propositions.w" char * Calculus__Atoms__validate(pcalc_prop *prop) ; -#line 461 "inform7/Chapter 17/Atomic Propositions.w" +#line 451 "inform7/Chapter 17/Atomic Propositions.w" void Calculus__Atoms__log(pcalc_prop *prop) ; #line 141 "inform7/Chapter 17/Propositions.w" int Calculus__Propositions__implied_conjunction_between(pcalc_prop *p1, pcalc_prop *p2) ; @@ -7365,43 +7407,43 @@ pcalc_prop * Calculus__Simplifications__simp_redundant_kinds_dash(pcalc_prop *pr pcalc_prop * Calculus__Simplifications__turn_right_way_round(pcalc_prop *prop, int *changed) ; #line 711 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__region_containment(pcalc_prop *prop, int *changed) ; -#line 763 "inform7/Chapter 17/Simplifications.w" +#line 762 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__reduce_predicates(pcalc_prop *prop, int *changed) ; -#line 795 "inform7/Chapter 17/Simplifications.w" +#line 794 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop *prop, int *changed) ; -#line 927 "inform7/Chapter 17/Simplifications.w" +#line 926 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__not_related_to_something(pcalc_prop *prop, int *changed) ; -#line 974 "inform7/Chapter 17/Simplifications.w" +#line 973 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__convert_gerunds(pcalc_prop *prop, int *changed) ; -#line 1016 "inform7/Chapter 17/Simplifications.w" +#line 1015 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__eliminate_to_have(pcalc_prop *prop, int *changed) ; -#line 1061 "inform7/Chapter 17/Simplifications.w" +#line 1060 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__prop_substitute_prop_cons(pcalc_prop *prop, property *prn, specification *po_spec, int *count, pcalc_prop *not_this) ; -#line 1108 "inform7/Chapter 17/Simplifications.w" +#line 1107 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__is_all_rooms(pcalc_prop *prop, int *changed) ; -#line 1175 "inform7/Chapter 17/Simplifications.w" +#line 1174 "inform7/Chapter 17/Simplifications.w" pcalc_prop * Calculus__Simplifications__everywhere_and_nowhere(pcalc_prop *prop, int *changed) ; -#line 53 "inform7/Chapter 17/Type Check Propositions.w" +#line 49 "inform7/Chapter 17/Type Check Propositions.w" tc_problem_kit Calculus__Propositions__Checker__tc_no_problem_reporting(void) ; -#line 59 "inform7/Chapter 17/Type Check Propositions.w" +#line 55 "inform7/Chapter 17/Type Check Propositions.w" tc_problem_kit Calculus__Propositions__Checker__tc_problem_reporting(int w1, int w2, char *intent) ; -#line 69 "inform7/Chapter 17/Type Check Propositions.w" +#line 65 "inform7/Chapter 17/Type Check Propositions.w" tc_problem_kit Calculus__Propositions__Checker__tc_problem_logging(void) ; -#line 84 "inform7/Chapter 17/Type Check Propositions.w" +#line 80 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit tck_s) ; -#line 395 "inform7/Chapter 17/Type Check Propositions.w" +#line 391 "inform7/Chapter 17/Type Check Propositions.w" kind * Calculus__Propositions__Checker__kind_of_term(pcalc_term *pt, variable_type_assignment *vta, tc_problem_kit *tck) ; -#line 410 "inform7/Chapter 17/Type Check Propositions.w" +#line 406 "inform7/Chapter 17/Type Check Propositions.w" kind * Calculus__Propositions__Checker__kind_of_term_inner(pcalc_term *pt, variable_type_assignment *vta, tc_problem_kit *tck) ; -#line 441 "inform7/Chapter 17/Type Check Propositions.w" +#line 437 "inform7/Chapter 17/Type Check Propositions.w" kind * Calculus__Propositions__Checker__approximate_argument_kind(binary_predicate *bp, int i) ; -#line 453 "inform7/Chapter 17/Type Check Propositions.w" +#line 449 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check_unary_predicate(pcalc_prop *pl, variable_type_assignment *vta, tc_problem_kit *tck) ; -#line 483 "inform7/Chapter 17/Type Check Propositions.w" +#line 479 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, variable_type_assignment *vta, tc_problem_kit *tck) ; -#line 561 "inform7/Chapter 17/Type Check Propositions.w" +#line 557 "inform7/Chapter 17/Type Check Propositions.w" void Calculus__Propositions__Checker__issue_bp_typecheck_error(binary_predicate *bp, kind *t0, kind *t1, tc_problem_kit *tck) ; -#line 571 "inform7/Chapter 17/Type Check Propositions.w" +#line 567 "inform7/Chapter 17/Type Check Propositions.w" void Calculus__Propositions__Checker__issue_kind_typecheck_error(kind *actually_find, kind *need_to_find, tc_problem_kit *tck, pcalc_prop *ka) ; #line 20 "inform7/Chapter 18/The Equality Relation.w" void Calculus__Equality__REL_create_initial_stock(void) ; @@ -7469,61 +7511,61 @@ void Calculus__Schemas__sch_type_parameter(pcalc_term *pt) ; void Calculus__Schemas__log(i6_schema *sch) ; #line 361 "inform7/Chapter 18/I6 Schemas.w" void Calculus__Schemas__log_applied(i6_schema *sch, pcalc_term *pt1) ; -#line 61 "inform7/Chapter 18/Compile Atoms.w" +#line 56 "inform7/Chapter 18/Compile Atoms.w" void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, int with_semicolon) ; -#line 145 "inform7/Chapter 18/Compile Atoms.w" +#line 140 "inform7/Chapter 18/Compile Atoms.w" annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, pcalc_prop *pl, int task) ; -#line 329 "inform7/Chapter 18/Compile Atoms.w" +#line 324 "inform7/Chapter 18/Compile Atoms.w" int Calculus__Atoms__Compile__atom_involves_action_variables(pcalc_prop *pl) ; -#line 341 "inform7/Chapter 18/Compile Atoms.w" +#line 336 "inform7/Chapter 18/Compile Atoms.w" annotated_i6_schema Calculus__Atoms__Compile__blank_asch(void) ; -#line 53 "inform7/Chapter 18/Deciding to Defer.w" +#line 51 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__allow_no_further_deferrals(void) ; -#line 61 "inform7/Chapter 18/Deciding to Defer.w" +#line 59 "inform7/Chapter 18/Deciding to Defer.w" pcalc_prop_deferral * Calculus__Deferrals__new_deferred_proposition(pcalc_prop *prop, int reason) ; -#line 79 "inform7/Chapter 18/Deciding to Defer.w" +#line 77 "inform7/Chapter 18/Deciding to Defer.w" pcalc_prop_deferral * Calculus__Deferrals__defer_loop_domain(pcalc_prop *prop) ; -#line 93 "inform7/Chapter 18/Deciding to Defer.w" +#line 91 "inform7/Chapter 18/Deciding to Defer.w" int Calculus__Deferrals__compile_deferred_description_test(specification *spec) ; -#line 117 "inform7/Chapter 18/Deciding to Defer.w" +#line 115 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_test_of_proposition(OUTPUT_STREAM, specification *substitution, pcalc_prop *prop) ; -#line 231 "inform7/Chapter 18/Deciding to Defer.w" +#line 229 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int condition_context) ; -#line 257 "inform7/Chapter 18/Deciding to Defer.w" +#line 255 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__prepare_to_retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int condition_context) ; -#line 275 "inform7/Chapter 18/Deciding to Defer.w" +#line 273 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_test_if_var_matches_description(OUTPUT_STREAM, specification *var, specification *matches) ; -#line 320 "inform7/Chapter 18/Deciding to Defer.w" +#line 318 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_now_proposition(OUTPUT_STREAM, pcalc_prop *prop, int with_semicolon) ; -#line 420 "inform7/Chapter 18/Deciding to Defer.w" +#line 418 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_multiple_use_proposition(OUTPUT_STREAM, specification *spec, kind *K) ; -#line 490 "inform7/Chapter 18/Deciding to Defer.w" +#line 488 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_number_of_S(OUTPUT_STREAM, specification *spec) ; -#line 505 "inform7/Chapter 18/Deciding to Defer.w" +#line 503 "inform7/Chapter 18/Deciding to Defer.w" int Calculus__Deferrals__spec_is_variable_of_kind_description(specification *spec) ; -#line 512 "inform7/Chapter 18/Deciding to Defer.w" +#line 510 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_call_to_deferred_desc(OUTPUT_STREAM, pcalc_prop *prop, int reason, general_pointer data, kind *K) ; -#line 534 "inform7/Chapter 18/Deciding to Defer.w" +#line 532 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_list_of_S(OUTPUT_STREAM, specification *spec, kind *K) ; -#line 553 "inform7/Chapter 18/Deciding to Defer.w" +#line 551 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_random_of_S(OUTPUT_STREAM, specification *spec) ; -#line 590 "inform7/Chapter 18/Deciding to Defer.w" +#line 588 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_total_of_S(OUTPUT_STREAM, property *prn, specification *spec) ; -#line 609 "inform7/Chapter 18/Deciding to Defer.w" +#line 607 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_substitution_test(OUTPUT_STREAM, specification *in, specification *spec) ; -#line 626 "inform7/Chapter 18/Deciding to Defer.w" +#line 624 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_substitution_now(OUTPUT_STREAM, specification *in, specification *spec) ; -#line 646 "inform7/Chapter 18/Deciding to Defer.w" +#line 644 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_extremal_of_S(OUTPUT_STREAM, specification *spec, property *prn, int sign) ; -#line 695 "inform7/Chapter 18/Deciding to Defer.w" +#line 693 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_through_domain_S(OUTPUT_STREAM, specification *spec, local_variable *v1) ; -#line 775 "inform7/Chapter 18/Deciding to Defer.w" +#line 773 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_call(OUTPUT_STREAM, specification *spec, local_variable *fromv) ; -#line 788 "inform7/Chapter 18/Deciding to Defer.w" +#line 786 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_domain(OUTPUT_STREAM, pcalc_prop *prop, local_variable *fromv) ; -#line 800 "inform7/Chapter 18/Deciding to Defer.w" +#line 798 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_loop_over_list_S(OUTPUT_STREAM, specification *spec, local_variable *v1) ; -#line 830 "inform7/Chapter 18/Deciding to Defer.w" +#line 828 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__prop_verify_descriptive(pcalc_prop *prop, char *billing, specification *constructor) ; #line 63 "inform7/Chapter 18/Cinders and Deferrals.w" int Calculus__Deferrals__Cinders__find(OUTPUT_STREAM, pcalc_prop *prop, pcalc_prop_deferral *pdef) ; @@ -7547,187 +7589,187 @@ void Calculus__Propositions__Deferred__compile_remaining_deferred(OUTPUT_STREAM int Calculus__Propositions__Deferred__compilation_coroutine(OUTPUT_STREAM) ; #line 1216 "inform7/Chapter 18/Compile Deferred Propositions.w" pcalc_prop * Calculus__Propositions__Deferred__compile_loop_header(OUTPUT_STREAM, int var, pcalc_prop *proposition, int avoid_parent_optimisation, int grouped, pcalc_prop_deferral *pdef) ; -#line 283 "inform7/Chapter 19/Kinds.w" +#line 281 "inform7/Chapter 19/Kinds.w" kind * Kinds__base_construction(kind_constructor *con) ; -#line 313 "inform7/Chapter 19/Kinds.w" +#line 311 "inform7/Chapter 19/Kinds.w" kind * Kinds__intermediate_construction(unit_sequence *ik) ; -#line 331 "inform7/Chapter 19/Kinds.w" +#line 329 "inform7/Chapter 19/Kinds.w" kind * Kinds__variable_construction(int N, kind *declaration) ; -#line 352 "inform7/Chapter 19/Kinds.w" +#line 350 "inform7/Chapter 19/Kinds.w" kind * Kinds__unary_construction(kind_constructor *con, kind *X) ; -#line 361 "inform7/Chapter 19/Kinds.w" +#line 359 "inform7/Chapter 19/Kinds.w" kind * Kinds__binary_construction(kind_constructor *con, kind *X, kind *Y) ; -#line 409 "inform7/Chapter 19/Kinds.w" +#line 407 "inform7/Chapter 19/Kinds.w" kind * Kinds__function_kind(int no_args, kind **args, kind *return_K) ; -#line 422 "inform7/Chapter 19/Kinds.w" +#line 420 "inform7/Chapter 19/Kinds.w" kind * Kinds__pair_kind(kind *X, kind *Y) ; -#line 443 "inform7/Chapter 19/Kinds.w" +#line 441 "inform7/Chapter 19/Kinds.w" kind * Kinds__first_base_k(void) ; -#line 451 "inform7/Chapter 19/Kinds.w" +#line 449 "inform7/Chapter 19/Kinds.w" kind * Kinds__next_base_k(kind *K) ; -#line 465 "inform7/Chapter 19/Kinds.w" +#line 463 "inform7/Chapter 19/Kinds.w" kind_constructor * Kinds__get_construct(kind *K) ; -#line 473 "inform7/Chapter 19/Kinds.w" +#line 471 "inform7/Chapter 19/Kinds.w" int Kinds__is_intermediate(kind *K) ; -#line 478 "inform7/Chapter 19/Kinds.w" +#line 476 "inform7/Chapter 19/Kinds.w" int Kinds__get_variable_number(kind *K) ; -#line 483 "inform7/Chapter 19/Kinds.w" +#line 481 "inform7/Chapter 19/Kinds.w" kind * Kinds__get_variable_stipulation(kind *K) ; -#line 491 "inform7/Chapter 19/Kinds.w" +#line 489 "inform7/Chapter 19/Kinds.w" int Kinds__is_proper_constructor(kind *K) ; -#line 496 "inform7/Chapter 19/Kinds.w" +#line 494 "inform7/Chapter 19/Kinds.w" int Kinds__arity_of_constructor(kind *K) ; -#line 504 "inform7/Chapter 19/Kinds.w" +#line 502 "inform7/Chapter 19/Kinds.w" kind * Kinds__unary_construction_material(kind *K) ; -#line 512 "inform7/Chapter 19/Kinds.w" +#line 510 "inform7/Chapter 19/Kinds.w" void Kinds__binary_construction_material(kind *K, kind **X, kind **Y) ; -#line 526 "inform7/Chapter 19/Kinds.w" +#line 524 "inform7/Chapter 19/Kinds.w" int Kinds__contains(kind *K, kind_constructor *con) ; -#line 549 "inform7/Chapter 19/Kinds.w" +#line 547 "inform7/Chapter 19/Kinds.w" kind * Kinds__substitute(kind *K, kind **meanings, int *changed) ; -#line 585 "inform7/Chapter 19/Kinds.w" +#line 583 "inform7/Chapter 19/Kinds.w" kind * Kinds__weaken(kind *K) ; -#line 607 "inform7/Chapter 19/Kinds.w" +#line 605 "inform7/Chapter 19/Kinds.w" kind * Kinds__dereference_properties(kind *K) ; -#line 650 "inform7/Chapter 19/Kinds.w" +#line 648 "inform7/Chapter 19/Kinds.w" kind * Kinds__new_base(int w1, int w2, kind *super) ; -#line 724 "inform7/Chapter 19/Kinds.w" +#line 722 "inform7/Chapter 19/Kinds.w" kind_constructor ** Kinds__known_constructor_name(char *sn) ; -#line 742 "inform7/Chapter 19/Kinds.w" +#line 740 "inform7/Chapter 19/Kinds.w" kind ** Kinds__known_kind_name(char *sn) ; -#line 767 "inform7/Chapter 19/Kinds.w" +#line 765 "inform7/Chapter 19/Kinds.w" int Kinds__known_name(char *sn) ; -#line 116 "inform7/Chapter 19/Kind Checking.w" +#line 112 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__le(kind *from, kind *to) ; -#line 121 "inform7/Chapter 19/Kind Checking.w" +#line 117 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__lt(kind *from, kind *to) ; -#line 145 "inform7/Chapter 19/Kind Checking.w" +#line 141 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__eq(kind *K1, kind *K2) ; -#line 168 "inform7/Chapter 19/Kind Checking.w" +#line 164 "inform7/Chapter 19/Kind Checking.w" kind * Kinds__Compare__super(kind *K) ; -#line 182 "inform7/Chapter 19/Kind Checking.w" +#line 178 "inform7/Chapter 19/Kind Checking.w" kind * Kinds__Compare__max(kind *K1, kind *K2) ; -#line 194 "inform7/Chapter 19/Kind Checking.w" +#line 190 "inform7/Chapter 19/Kind Checking.w" kind * Kinds__Compare__traverse_kind_poset(kind *K1, kind *K2, int direction) ; -#line 231 "inform7/Chapter 19/Kind Checking.w" +#line 227 "inform7/Chapter 19/Kind Checking.w" kind * Kinds__Compare__accumulative_max(kind *K1, kind *K2) ; -#line 259 "inform7/Chapter 19/Kind Checking.w" +#line 255 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__compatible(kind *from, kind *to) ; -#line 278 "inform7/Chapter 19/Kind Checking.w" +#line 274 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) ; -#line 436 "inform7/Chapter 19/Kind Checking.w" +#line 432 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__show_variables(void) ; -#line 450 "inform7/Chapter 19/Kind Checking.w" +#line 446 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__make_subkind(kind *sub, kind *super) ; -#line 497 "inform7/Chapter 19/Kind Checking.w" +#line 493 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__log_poset(int n) ; -#line 156 "inform7/Chapter 19/Kind Constructors.w" +#line 154 "inform7/Chapter 19/Kind Constructors.w" kind_constructor * Kinds__Constructors__new(kind_constructor *super, char *source_name, char *initialisation_macro) ; -#line 305 "inform7/Chapter 19/Kind Constructors.w" +#line 303 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__attach_nametag(kind_constructor *con, nametag *nt) ; -#line 310 "inform7/Chapter 19/Kind Constructors.w" +#line 308 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__get_name(kind_constructor *con, int *w1, int *w2, int plural_form) ; -#line 318 "inform7/Chapter 19/Kind Constructors.w" +#line 316 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__get_name_in_play(kind_constructor *con, int *w1, int *w2, int plural_form) ; -#line 326 "inform7/Chapter 19/Kind Constructors.w" +#line 324 "inform7/Chapter 19/Kind Constructors.w" nametag * Kinds__Constructors__get_nametag(kind_constructor *con) ; -#line 338 "inform7/Chapter 19/Kind Constructors.w" +#line 336 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__compile_I6_constants(OUTPUT_STREAM) ; -#line 349 "inform7/Chapter 19/Kind Constructors.w" +#line 347 "inform7/Chapter 19/Kind Constructors.w" char * Kinds__Constructors__name_in_template_code(kind_constructor *con) ; -#line 357 "inform7/Chapter 19/Kind Constructors.w" +#line 355 "inform7/Chapter 19/Kind Constructors.w" kind_constructor * Kinds__Constructors__parse(char *sn) ; -#line 371 "inform7/Chapter 19/Kind Constructors.w" +#line 369 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__convert_to_unit(kind_constructor *con) ; -#line 381 "inform7/Chapter 19/Kind Constructors.w" +#line 379 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__convert_to_enumeration(kind_constructor *con) ; -#line 397 "inform7/Chapter 19/Kind Constructors.w" +#line 395 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__convert_to_real(kind_constructor *con) ; -#line 406 "inform7/Chapter 19/Kind Constructors.w" +#line 404 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__mark_as_linguistic(kind_constructor *con) ; -#line 413 "inform7/Chapter 19/Kind Constructors.w" +#line 411 "inform7/Chapter 19/Kind Constructors.w" kind ** Kinds__Constructors__cache_location(kind_constructor *con) ; -#line 418 "inform7/Chapter 19/Kind Constructors.w" +#line 416 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__arity(kind_constructor *con) ; -#line 424 "inform7/Chapter 19/Kind Constructors.w" +#line 422 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__tupling(kind_constructor *con, int b) ; -#line 428 "inform7/Chapter 19/Kind Constructors.w" +#line 426 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__variance(kind_constructor *con, int b) ; -#line 437 "inform7/Chapter 19/Kind Constructors.w" +#line 435 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__is_definite(kind_constructor *con) ; -#line 444 "inform7/Chapter 19/Kind Constructors.w" +#line 442 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__get_weak_ID(kind_constructor *con) ; -#line 449 "inform7/Chapter 19/Kind Constructors.w" +#line 447 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__is_arithmetic(kind_constructor *con) ; -#line 457 "inform7/Chapter 19/Kind Constructors.w" +#line 455 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__is_arithmetic_and_real(kind_constructor *con) ; -#line 465 "inform7/Chapter 19/Kind Constructors.w" +#line 463 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__is_enumeration(kind_constructor *con) ; -#line 478 "inform7/Chapter 19/Kind Constructors.w" +#line 476 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__find_cast(kind_constructor *from, kind_constructor *to) ; -#line 498 "inform7/Chapter 19/Kind Constructors.w" +#line 496 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__find_instance(kind_constructor *from, kind_constructor *to) ; -#line 515 "inform7/Chapter 19/Kind Constructors.w" +#line 513 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__compatible(kind_constructor *from, kind_constructor *to, int allow_casts) ; -#line 526 "inform7/Chapter 19/Kind Constructors.w" +#line 524 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__uses_pointer_values(kind_constructor *con) ; -#line 533 "inform7/Chapter 19/Kind Constructors.w" +#line 531 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__allow_word_as_pointer(kind_constructor *left, kind_constructor *right) ; -#line 250 "inform7/Chapter 19/Kind Interpreter.w" +#line 247 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__start(void) ; -#line 269 "inform7/Chapter 19/Kind Interpreter.w" +#line 265 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__despatch_kind_command(char *command) ; -#line 326 "inform7/Chapter 19/Kind Interpreter.w" +#line 322 "inform7/Chapter 19/Kind Interpreter.w" single_kind_command Kinds__Interpreter__parse_kind_command(char *command) ; -#line 504 "inform7/Chapter 19/Kind Interpreter.w" +#line 500 "inform7/Chapter 19/Kind Interpreter.w" kind_template_definition * Kinds__Interpreter__new_kind_template(char *name) ; -#line 510 "inform7/Chapter 19/Kind Interpreter.w" +#line 506 "inform7/Chapter 19/Kind Interpreter.w" kind_template_definition * Kinds__Interpreter__parse_kind_template_name(char *name) ; -#line 524 "inform7/Chapter 19/Kind Interpreter.w" +#line 520 "inform7/Chapter 19/Kind Interpreter.w" int Kinds__Interpreter__recording_a_kind_template(void) ; -#line 529 "inform7/Chapter 19/Kind Interpreter.w" +#line 525 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__begin_kind_template(char *name) ; -#line 537 "inform7/Chapter 19/Kind Interpreter.w" +#line 533 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__record_into_kind_template(char *line) ; -#line 541 "inform7/Chapter 19/Kind Interpreter.w" +#line 537 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__end_kind_template(void) ; -#line 553 "inform7/Chapter 19/Kind Interpreter.w" +#line 549 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__remember_to_transcribe_spec_template(kind_template_definition *ttd, kind_constructor *C) ; -#line 562 "inform7/Chapter 19/Kind Interpreter.w" +#line 558 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__include_templates_for_kinds(void) ; -#line 568 "inform7/Chapter 19/Kind Interpreter.w" +#line 564 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__transcribe_kind_template(kind_template_definition *ttd, kind_constructor *con) ; -#line 658 "inform7/Chapter 19/Kind Interpreter.w" +#line 654 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__transcribe_constructor_name(char *buffer, kind_constructor *con, int lower_case) ; -#line 687 "inform7/Chapter 19/Kind Interpreter.w" +#line 683 "inform7/Chapter 19/Kind Interpreter.w" kind_macro_definition * Kinds__Interpreter__new_kind_macro(char *name) ; -#line 694 "inform7/Chapter 19/Kind Interpreter.w" +#line 690 "inform7/Chapter 19/Kind Interpreter.w" kind_macro_definition * Kinds__Interpreter__parse_kind_macro_name(char *name) ; -#line 704 "inform7/Chapter 19/Kind Interpreter.w" +#line 700 "inform7/Chapter 19/Kind Interpreter.w" int Kinds__Interpreter__recording_a_kind_macro(void) ; -#line 709 "inform7/Chapter 19/Kind Interpreter.w" +#line 705 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__begin_kind_macro(char *name) ; -#line 715 "inform7/Chapter 19/Kind Interpreter.w" +#line 711 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__record_into_kind_macro(single_kind_command stc) ; -#line 723 "inform7/Chapter 19/Kind Interpreter.w" +#line 719 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__end_kind_macro(void) ; -#line 732 "inform7/Chapter 19/Kind Interpreter.w" +#line 728 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__play_back_kind_macro(kind_macro_definition *macro, kind_constructor *con) ; -#line 751 "inform7/Chapter 19/Kind Interpreter.w" +#line 747 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__initialise_kind_text_archiver(void) ; -#line 755 "inform7/Chapter 19/Kind Interpreter.w" +#line 751 "inform7/Chapter 19/Kind Interpreter.w" char * Kinds__Interpreter__archive_kind_text(char *original) ; -#line 766 "inform7/Chapter 19/Kind Interpreter.w" +#line 762 "inform7/Chapter 19/Kind Interpreter.w" char * Kinds__Interpreter__begin_recording_kind_text(void) ; -#line 772 "inform7/Chapter 19/Kind Interpreter.w" +#line 768 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__record_kind_text(char *line) ; -#line 777 "inform7/Chapter 19/Kind Interpreter.w" +#line 773 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__end_recording_kind_text(void) ; -#line 785 "inform7/Chapter 19/Kind Interpreter.w" +#line 781 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__kind_command_error(char *command, char *error) ; -#line 833 "inform7/Chapter 19/Kind Interpreter.w" +#line 829 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constructor *con) ; -#line 1019 "inform7/Chapter 19/Kind Interpreter.w" +#line 1015 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__batch_done(void) ; #line 11 "inform7/Chapter 19/Using Kinds.w" void Kinds__Behaviour__get_name(kind *K, int *w1, int *w2, int plural_form) ; @@ -8473,63 +8515,63 @@ int Specifications__Checking__typecheck_recursive_inner(specification *found, s void Specifications__Checking__note_inv_token_text(specification *found) ; #line 3444 "inform7/Chapter 20/Type Checking.w" kind * Specifications__Checking__fix_arithmetic_operand(specification *operand, int depth) ; -#line 96 "inform7/Chapter 21/Properties.w" +#line 93 "inform7/Chapter 21/Properties.w" property * Properties__obtain(int w1, int w2, int valued) ; -#line 121 "inform7/Chapter 21/Properties.w" +#line 118 "inform7/Chapter 21/Properties.w" property * Properties__create(int w1, int w2) ; -#line 288 "inform7/Chapter 21/Properties.w" +#line 285 "inform7/Chapter 21/Properties.w" specification * Properties__to_specification(property *prn) ; -#line 298 "inform7/Chapter 21/Properties.w" +#line 295 "inform7/Chapter 21/Properties.w" property * Properties__from_specification(specification *spec) ; -#line 404 "inform7/Chapter 21/Properties.w" +#line 401 "inform7/Chapter 21/Properties.w" int Properties__match_longest(int w1, int w2) ; -#line 425 "inform7/Chapter 21/Properties.w" +#line 422 "inform7/Chapter 21/Properties.w" property * Properties__fast_property_parse(int w1, int w2) ; -#line 438 "inform7/Chapter 21/Properties.w" +#line 435 "inform7/Chapter 21/Properties.w" property_permission * Properties__permission_list(property *prn) ; -#line 441 "inform7/Chapter 21/Properties.w" +#line 438 "inform7/Chapter 21/Properties.w" void Properties__set_permission_list(property *prn, property_permission *pp) ; -#line 448 "inform7/Chapter 21/Properties.w" +#line 445 "inform7/Chapter 21/Properties.w" void Properties__log(property *prn) ; -#line 459 "inform7/Chapter 21/Properties.w" +#line 456 "inform7/Chapter 21/Properties.w" void Properties__log_basic_pname(property *prn) ; -#line 471 "inform7/Chapter 21/Properties.w" +#line 468 "inform7/Chapter 21/Properties.w" int Properties__is_either_or(property *prn) ; -#line 474 "inform7/Chapter 21/Properties.w" +#line 471 "inform7/Chapter 21/Properties.w" int Properties__is_value_property(property *prn) ; -#line 485 "inform7/Chapter 21/Properties.w" +#line 482 "inform7/Chapter 21/Properties.w" int Properties__can_be_compiled(property *prn) ; -#line 494 "inform7/Chapter 21/Properties.w" +#line 491 "inform7/Chapter 21/Properties.w" int Properties__is_shown_in_index(property *prn) ; -#line 497 "inform7/Chapter 21/Properties.w" +#line 494 "inform7/Chapter 21/Properties.w" void Properties__exclude_from_index(property *prn) ; -#line 504 "inform7/Chapter 21/Properties.w" +#line 501 "inform7/Chapter 21/Properties.w" void Properties__set_indexed_already_flag(property *prn, int state) ; -#line 507 "inform7/Chapter 21/Properties.w" +#line 504 "inform7/Chapter 21/Properties.w" int Properties__get_indexed_already_flag(property *prn) ; -#line 514 "inform7/Chapter 21/Properties.w" +#line 511 "inform7/Chapter 21/Properties.w" void Properties__offset_in_runtime_metadata_table_is(property *prn, int pos) ; -#line 517 "inform7/Chapter 21/Properties.w" +#line 514 "inform7/Chapter 21/Properties.w" int Properties__get_offset_in_runtime_metadata_table(property *prn) ; -#line 531 "inform7/Chapter 21/Properties.w" +#line 528 "inform7/Chapter 21/Properties.w" void Properties__set_translation(property *prn, char *t) ; -#line 542 "inform7/Chapter 21/Properties.w" +#line 539 "inform7/Chapter 21/Properties.w" char * Properties__get_translation(property *prn) ; -#line 547 "inform7/Chapter 21/Properties.w" +#line 544 "inform7/Chapter 21/Properties.w" int Properties__has_been_translated(property *prn) ; -#line 557 "inform7/Chapter 21/Properties.w" +#line 554 "inform7/Chapter 21/Properties.w" void Properties__translates(int w1, int w2, parse_node *p2) ; -#line 614 "inform7/Chapter 21/Properties.w" +#line 611 "inform7/Chapter 21/Properties.w" void Properties__alias_translations(OUTPUT_STREAM) ; -#line 629 "inform7/Chapter 21/Properties.w" +#line 626 "inform7/Chapter 21/Properties.w" void Properties__begin_traverse(void) ; -#line 633 "inform7/Chapter 21/Properties.w" +#line 630 "inform7/Chapter 21/Properties.w" int Properties__visited_in_traverse(property *prn) ; -#line 648 "inform7/Chapter 21/Properties.w" +#line 645 "inform7/Chapter 21/Properties.w" possession_marker * Properties__get_possession_marker(property *prn) ; -#line 659 "inform7/Chapter 21/Properties.w" +#line 656 "inform7/Chapter 21/Properties.w" void Properties__compile_inferred_value(OUTPUT_STREAM, inference_subject *infs, property *prn) ; -#line 676 "inform7/Chapter 21/Properties.w" +#line 673 "inform7/Chapter 21/Properties.w" int Properties__compile_property_value_inner(OUTPUT_STREAM, inference_subject *infs, property *prn) ; #line 57 "inform7/Chapter 21/Either-Or Properties.w" property * Properties__EitherOr__obtain(int w1, int w2, inference_subject *infs) ; @@ -9335,89 +9377,89 @@ void Rules__Bookings__start_list_compilation(OUTPUT_STREAM) ; void Rules__Bookings__list_compile(booking *list_head, OUTPUT_STREAM, char *identifier, int action_based, int parameter_based) ; #line 932 "inform7/Chapter 27/Rule Bookings.w" action_name * Rules__Bookings__br_required_action(booking *br) ; -#line 222 "inform7/Chapter 27/Rulebooks.w" +#line 221 "inform7/Chapter 27/Rulebooks.w" rulebook * Rulebooks__new(kind *create_as, int w1, int w2) ; -#line 275 "inform7/Chapter 27/Rulebooks.w" +#line 274 "inform7/Chapter 27/Rulebooks.w" outcomes * Rulebooks__get_outcomes(rulebook *rb) ; -#line 279 "inform7/Chapter 27/Rulebooks.w" +#line 278 "inform7/Chapter 27/Rulebooks.w" specification * Rulebooks__to_specification(rulebook *rb) ; -#line 287 "inform7/Chapter 27/Rulebooks.w" +#line 286 "inform7/Chapter 27/Rulebooks.w" kind * Rulebooks__content_kind(rulebook *rb) ; -#line 293 "inform7/Chapter 27/Rulebooks.w" +#line 292 "inform7/Chapter 27/Rulebooks.w" rulebook * Rulebooks__from_specification(specification *spec) ; -#line 303 "inform7/Chapter 27/Rulebooks.w" +#line 302 "inform7/Chapter 27/Rulebooks.w" rulebook * Rulebooks__new_automatic(int w1, int w2, kind *basis, int oc, int ata, int ubfaa, int rda) ; -#line 316 "inform7/Chapter 27/Rulebooks.w" +#line 315 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__set_alt_name(rulebook *rb, int aw1, int aw2) ; -#line 322 "inform7/Chapter 27/Rulebooks.w" +#line 321 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__fragment_by_actions(rulebook *rb, int wn) ; -#line 326 "inform7/Chapter 27/Rulebooks.w" +#line 325 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__requires_specific_action(rulebook *rb) ; -#line 338 "inform7/Chapter 27/Rulebooks.w" +#line 337 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__affected_by_placement(rulebook *rb, parse_node *where) ; -#line 345 "inform7/Chapter 27/Rulebooks.w" +#line 344 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__rb_no_placements(rulebook *rb) ; -#line 352 "inform7/Chapter 27/Rulebooks.w" +#line 351 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__rb_index_placements(rulebook *rb) ; -#line 367 "inform7/Chapter 27/Rulebooks.w" +#line 366 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__focus(rulebook *rb) ; -#line 371 "inform7/Chapter 27/Rulebooks.w" +#line 370 "inform7/Chapter 27/Rulebooks.w" kind * Rulebooks__get_parameter_kind(rulebook *rb) ; -#line 375 "inform7/Chapter 27/Rulebooks.w" +#line 374 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__used_by_future_actions(rulebook *rb) ; -#line 379 "inform7/Chapter 27/Rulebooks.w" +#line 378 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__is_empty(rulebook *rb, scene *context) ; -#line 384 "inform7/Chapter 27/Rulebooks.w" +#line 383 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__no_rules(rulebook *rb) ; -#line 389 "inform7/Chapter 27/Rulebooks.w" +#line 388 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__rule_in_rulebook(rule *R, rulebook *rb) ; -#line 394 "inform7/Chapter 27/Rulebooks.w" +#line 393 "inform7/Chapter 27/Rulebooks.w" booking * Rulebooks__first_booking(rulebook *rb) ; -#line 399 "inform7/Chapter 27/Rulebooks.w" +#line 398 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__runs_during_activities(rulebook *rb) ; -#line 429 "inform7/Chapter 27/Rulebooks.w" +#line 428 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__add_variable(rulebook *rb, parse_node *cnode) ; -#line 508 "inform7/Chapter 27/Rulebooks.w" +#line 507 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__make_stvs_accessible(rulebook *rb, stacked_variable_owner *stvo) ; -#line 512 "inform7/Chapter 27/Rulebooks.w" +#line 511 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__rulebook_var_creators_array(OUTPUT_STREAM) ; -#line 529 "inform7/Chapter 27/Rulebooks.w" +#line 528 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__rulebook_var_creators_lookup(OUTPUT_STREAM) ; -#line 545 "inform7/Chapter 27/Rulebooks.w" +#line 544 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__log_name_only(rulebook *rb) ; -#line 549 "inform7/Chapter 27/Rulebooks.w" +#line 548 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__log(rulebook *rb) ; -#line 555 "inform7/Chapter 27/Rulebooks.w" +#line 554 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__index(rulebook *rb, char *billing, scene *context, action_name *action_context, int *resp_count) ; -#line 571 "inform7/Chapter 27/Rulebooks.w" +#line 570 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__index_action_rules(action_name *an, rulebook *rb, int code, char *desc, int *resp_count) ; -#line 641 "inform7/Chapter 27/Rulebooks.w" +#line 640 "inform7/Chapter 27/Rulebooks.w" rulebook_match Rulebooks__rb_match_from_description(int w1, int w2) ; -#line 731 "inform7/Chapter 27/Rulebooks.w" +#line 730 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__attach_rule(rulebook *rb, booking *the_new_rule, int placing, int side, rule *ref_rule) ; -#line 791 "inform7/Chapter 27/Rulebooks.w" +#line 790 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__detach_rule(rulebook *rb, rule *the_new_rule) ; -#line 801 "inform7/Chapter 27/Rulebooks.w" +#line 800 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__compile_rule_phrases(rulebook *rb, OUTPUT_STREAM, int *i, int max_i) ; -#line 814 "inform7/Chapter 27/Rulebooks.w" +#line 813 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__rulebooks_array_array(OUTPUT_STREAM) ; -#line 822 "inform7/Chapter 27/Rulebooks.w" +#line 821 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__procedurals_exist(void) ; -#line 826 "inform7/Chapter 27/Rulebooks.w" +#line 825 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__compile_rulebooks(OUTPUT_STREAM) ; -#line 841 "inform7/Chapter 27/Rulebooks.w" +#line 840 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__RulebookNames_array(OUTPUT_STREAM) ; -#line 881 "inform7/Chapter 27/Rulebooks.w" +#line 880 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__parse_properties(rulebook *rb, int w1, int w2) ; -#line 886 "inform7/Chapter 27/Rulebooks.w" +#line 885 "inform7/Chapter 27/Rulebooks.w" kind * Rulebooks__kind_from_context(void) ; -#line 901 "inform7/Chapter 27/Rulebooks.w" +#line 900 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__index_page(int n) ; -#line 1111 "inform7/Chapter 27/Rulebooks.w" +#line 1110 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__noteworthy_rulebooks(extension_file *ef) ; -#line 1129 "inform7/Chapter 27/Rulebooks.w" +#line 1128 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__index_scene(void) ; -#line 1135 "inform7/Chapter 27/Rulebooks.w" +#line 1134 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__index_rules_box(char *name, int w1, int w2, char *doc_link, rulebook *rb, activity *av, char *text, int indent, int hide_behind_plus) ; #line 90 "inform7/Chapter 27/Focus and Outcome.w" void Rulebooks__Outcomes__initialise_outcomes(outcomes *outs, kind *K, int def) ; @@ -9577,167 +9619,167 @@ void Phrases__Manager__RulebookNames_array(OUTPUT_STREAM) ; void Phrases__Manager__compile_rule_printing_switch(OUTPUT_STREAM) ; #line 494 "inform7/Chapter 28/Construction Sequence.w" void Phrases__Manager__compile_as_needed(OUTPUT_STREAM) ; -#line 105 "inform7/Chapter 28/Phrases.w" +#line 87 "inform7/Chapter 28/Phrases.w" void Phrases__create_from_preamble(parse_node *p) ; -#line 326 "inform7/Chapter 28/Phrases.w" +#line 308 "inform7/Chapter 28/Phrases.w" void Phrases__parse_possible_inline_defn(int w1, int w2, int *wn, int *mor) ; -#line 336 "inform7/Chapter 28/Phrases.w" +#line 318 "inform7/Chapter 28/Phrases.w" void Phrases__log(phrase *ph) ; -#line 342 "inform7/Chapter 28/Phrases.w" +#line 324 "inform7/Chapter 28/Phrases.w" void Phrases__log_briefly(phrase *ph) ; -#line 349 "inform7/Chapter 28/Phrases.w" +#line 331 "inform7/Chapter 28/Phrases.w" void Phrases__write_HTML_representation(OUTPUT_STREAM, phrase *ph, int format) ; -#line 356 "inform7/Chapter 28/Phrases.w" +#line 338 "inform7/Chapter 28/Phrases.w" char * Phrases__get_inline_definition(phrase *ph) ; -#line 362 "inform7/Chapter 28/Phrases.w" +#line 344 "inform7/Chapter 28/Phrases.w" char * Phrases__identifier(phrase *ph) ; -#line 366 "inform7/Chapter 28/Phrases.w" +#line 348 "inform7/Chapter 28/Phrases.w" parse_node * Phrases__declaration_node(phrase *ph) ; -#line 377 "inform7/Chapter 28/Phrases.w" +#line 359 "inform7/Chapter 28/Phrases.w" void Phrases__compile(OUTPUT_STREAM, phrase *ph, int *i, int max_i, stacked_variable_owner_list *legible, to_phrase_request *req, applicability_condition *acl) ; -#line 54 "inform7/Chapter 28/Phrase Usage.w" +#line 53 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__predeclare_name_in(parse_node *p) ; -#line 75 "inform7/Chapter 28/Phrase Usage.w" +#line 74 "inform7/Chapter 28/Phrase Usage.w" rule * Phrases__Usage__to_rule(ph_usage_data *phud, phrase *ph) ; -#line 235 "inform7/Chapter 28/Phrase Usage.w" +#line 234 "inform7/Chapter 28/Phrase Usage.w" ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) ; -#line 509 "inform7/Chapter 28/Phrase Usage.w" +#line 506 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__get_preamble_text(ph_usage_data *phud, int *w1, int *w2) ; -#line 524 "inform7/Chapter 28/Phrase Usage.w" +#line 521 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__get_prewhile_text(ph_usage_data *phud, int *pw1, int *pw2) ; -#line 548 "inform7/Chapter 28/Phrase Usage.w" +#line 545 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__get_effect(ph_usage_data *phud) ; -#line 552 "inform7/Chapter 28/Phrase Usage.w" +#line 549 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__get_rulebook_placement(ph_usage_data *phud) ; -#line 556 "inform7/Chapter 28/Phrase Usage.w" +#line 553 "inform7/Chapter 28/Phrase Usage.w" rulebook * Phrases__Usage__get_rulebook(ph_usage_data *phud) ; -#line 560 "inform7/Chapter 28/Phrase Usage.w" +#line 557 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__set_rulebook(ph_usage_data *phud, rulebook *rb) ; -#line 565 "inform7/Chapter 28/Phrase Usage.w" +#line 562 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__get_timing_of_event(ph_usage_data *phud) ; -#line 569 "inform7/Chapter 28/Phrase Usage.w" +#line 566 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__has_name_as_constant(ph_usage_data *phud) ; -#line 576 "inform7/Chapter 28/Phrase Usage.w" +#line 573 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__get_equation_form(ph_usage_data *phud) ; -#line 582 "inform7/Chapter 28/Phrase Usage.w" +#line 579 "inform7/Chapter 28/Phrase Usage.w" phrase * Phrases__Usage__get_equation_inverse(ph_usage_data *phud) ; -#line 600 "inform7/Chapter 28/Phrase Usage.w" +#line 597 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__log(ph_usage_data *phud) ; -#line 648 "inform7/Chapter 28/Phrase Usage.w" +#line 645 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__log_rule_name(ph_usage_data *phud) ; -#line 659 "inform7/Chapter 28/Phrase Usage.w" +#line 656 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__write_I6_comment_describing(ph_usage_data *phud, OUTPUT_STREAM) ; -#line 668 "inform7/Chapter 28/Phrase Usage.w" +#line 665 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__index_preamble(ph_usage_data *phud) ; -#line 688 "inform7/Chapter 28/Phrase Usage.w" +#line 685 "inform7/Chapter 28/Phrase Usage.w" ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *phud) ; -#line 47 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 46 "inform7/Chapter 28/Phrase Runtime Context Data.w" ph_runtime_context_data Phrases__Context__new(void) ; -#line 66 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 65 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__set_always_test_actor(ph_runtime_context_data *phrcd) ; -#line 70 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 69 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__clear_always_test_actor(ph_runtime_context_data *phrcd) ; -#line 74 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 73 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__set_never_test_actor(ph_runtime_context_data *phrcd) ; -#line 78 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 77 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__set_marked_for_anyone(ph_runtime_context_data *phrcd, int to) ; -#line 82 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 81 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__get_marked_for_anyone(ph_runtime_context_data *phrcd) ; -#line 89 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 88 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__within_action_context(ph_runtime_context_data *phrcd, action_name *an) ; -#line 95 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 94 "inform7/Chapter 28/Phrase Runtime Context Data.w" action_name * Phrases__Context__required_action(ph_runtime_context_data *phrcd) ; -#line 101 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 100 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__suppress_action_testing(ph_runtime_context_data *phrcd) ; -#line 111 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 110 "inform7/Chapter 28/Phrase Runtime Context Data.w" scene * Phrases__Context__get_scene(ph_runtime_context_data *phrcd) ; -#line 124 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 123 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__outcome_restrictions_waived(void) ; -#line 142 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 141 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, ph_runtime_context_data *rcd2) ; -#line 231 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 230 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__ensure_avl(rule *R) ; -#line 272 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 271 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, applicability_condition *acl) ; -#line 295 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 294 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__compile_test_tail(OUTPUT_STREAM, phrase *ph, applicability_condition *acl) ; -#line 159 "inform7/Chapter 28/Phrase Type Data.w" +#line 155 "inform7/Chapter 28/Phrase Type Data.w" ph_type_data Phrases__TypeData__new(void) ; -#line 179 "inform7/Chapter 28/Phrase Type Data.w" +#line 175 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__set_mor(ph_type_data *phtd, int mor, kind *K) ; -#line 184 "inform7/Chapter 28/Phrase Type Data.w" +#line 180 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__get_mor(ph_type_data *phtd) ; -#line 188 "inform7/Chapter 28/Phrase Type Data.w" +#line 184 "inform7/Chapter 28/Phrase Type Data.w" kind * Phrases__TypeData__get_return_kind(ph_type_data *phtd) ; -#line 196 "inform7/Chapter 28/Phrase Type Data.w" +#line 192 "inform7/Chapter 28/Phrase Type Data.w" char * Phrases__TypeData__describe_manner_of_return(int mor, ph_type_data *phtd, kind **K) ; -#line 248 "inform7/Chapter 28/Phrase Type Data.w" +#line 244 "inform7/Chapter 28/Phrase Type Data.w" kind * Phrases__TypeData__kind(ph_type_data *phtd) ; -#line 260 "inform7/Chapter 28/Phrase Type Data.w" +#line 256 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__contains_variables(ph_type_data *phtd) ; -#line 270 "inform7/Chapter 28/Phrase Type Data.w" +#line 266 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__tokens_contain_variable(ph_type_data *phtd, int v) ; -#line 280 "inform7/Chapter 28/Phrase Type Data.w" +#line 276 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__get_no_tokens(ph_type_data *phtd) ; -#line 287 "inform7/Chapter 28/Phrase Type Data.w" +#line 283 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__index_of_token_creating_a_variable(ph_type_data *phtd) ; -#line 302 "inform7/Chapter 28/Phrase Type Data.w" +#line 298 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__preamble_requires_property_value(ph_type_data *phtd) ; -#line 320 "inform7/Chapter 28/Phrase Type Data.w" +#line 316 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__deprecated(ph_type_data *phtd) ; -#line 324 "inform7/Chapter 28/Phrase Type Data.w" +#line 320 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__deprecate_phrase(ph_type_data *phtd) ; -#line 359 "inform7/Chapter 28/Phrase Type Data.w" +#line 355 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__into_stack_frame(ph_stack_frame *phsf, ph_type_data *phtd, kind *kind_in_this_compilation, int first) ; -#line 390 "inform7/Chapter 28/Phrase Type Data.w" +#line 386 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__comparison(ph_type_data *phtd1, ph_type_data *phtd2) ; -#line 518 "inform7/Chapter 28/Phrase Type Data.w" +#line 514 "inform7/Chapter 28/Phrase Type Data.w" say_details Phrases__TypeData__new_say_details(void) ; -#line 531 "inform7/Chapter 28/Phrase Type Data.w" +#line 527 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__make_sd(say_details *sd, int ro, int cs, int pos, int at, int cat) ; -#line 544 "inform7/Chapter 28/Phrase Type Data.w" +#line 540 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__log_say_details(say_details sd) ; -#line 563 "inform7/Chapter 28/Phrase Type Data.w" +#line 559 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_say_phrase(phrase *ph) ; -#line 568 "inform7/Chapter 28/Phrase Type Data.w" +#line 564 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_say_X_phrase(ph_type_data *phtd) ; -#line 575 "inform7/Chapter 28/Phrase Type Data.w" +#line 571 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_spare_say_X_phrase(ph_type_data *phtd) ; -#line 585 "inform7/Chapter 28/Phrase Type Data.w" +#line 581 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_the_primordial_say(ph_type_data *phtd) ; -#line 590 "inform7/Chapter 28/Phrase Type Data.w" +#line 586 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__get_say_data(say_details *sd, int *say_cs, int *ssp_tok, int *ssp_ctok, int *ssp_pos) ; -#line 598 "inform7/Chapter 28/Phrase Type Data.w" +#line 594 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__preface_for_say_HTML(OUTPUT_STREAM, say_details sd, int paste_format) ; -#line 616 "inform7/Chapter 28/Phrase Type Data.w" +#line 612 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__epilogue_for_say_HTML(OUTPUT_STREAM, say_details sd, int paste_format) ; -#line 627 "inform7/Chapter 28/Phrase Type Data.w" +#line 623 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__ssp_matches(ph_type_data *phtd, int ssp_tok, int list_pos, int *w1, int *w2) ; -#line 650 "inform7/Chapter 28/Phrase Type Data.w" +#line 646 "inform7/Chapter 28/Phrase Type Data.w" inline_details Phrases__TypeData__new_inline_details(void) ; -#line 669 "inform7/Chapter 28/Phrase Type Data.w" +#line 665 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__make_id(inline_details *id, int op, int assgn, int let, int blk, int only_in) ; -#line 682 "inform7/Chapter 28/Phrase Type Data.w" +#line 678 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__log_inline_details(inline_details id) ; -#line 695 "inform7/Chapter 28/Phrase Type Data.w" +#line 691 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__make_inline(ph_type_data *phtd) ; -#line 699 "inform7/Chapter 28/Phrase Type Data.w" +#line 695 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__invoked_inline(phrase *ph) ; -#line 706 "inform7/Chapter 28/Phrase Type Data.w" +#line 702 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_let_assignment(phrase *ph) ; -#line 711 "inform7/Chapter 28/Phrase Type Data.w" +#line 707 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_let_equation(phrase *ph) ; -#line 716 "inform7/Chapter 28/Phrase Type Data.w" +#line 712 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__arithmetic_operation(phrase *ph) ; -#line 720 "inform7/Chapter 28/Phrase Type Data.w" +#line 716 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_assignment_phrase(phrase *ph) ; -#line 724 "inform7/Chapter 28/Phrase Type Data.w" +#line 720 "inform7/Chapter 28/Phrase Type Data.w" char * Phrases__TypeData__only_in(phrase *ph) ; -#line 729 "inform7/Chapter 28/Phrase Type Data.w" +#line 725 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__block_follows(phrase *ph) ; -#line 742 "inform7/Chapter 28/Phrase Type Data.w" +#line 738 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__return_decided_dimensionally(ph_type_data *phtd) ; -#line 756 "inform7/Chapter 28/Phrase Type Data.w" +#line 752 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__inline_type_data_comparison(ph_type_data *phtd1, ph_type_data *phtd2) ; #line 12 "inform7/Chapter 28/Describing Phrase Type Data.w" void Phrases__TypeData__Textual__log(ph_type_data *phtd) ; @@ -9991,47 +10033,47 @@ char * LocalVariables__lvalue(local_variable *lvar) ; void LocalVariables__compile_parameter_list(OUTPUT_STREAM, ph_stack_frame *phsf, int no_vars) ; #line 942 "inform7/Chapter 30/Local Variables.w" void LocalVariables__declare(OUTPUT_STREAM, ph_stack_frame *phsf, int call_pars_only) ; -#line 60 "inform7/Chapter 30/Phrase Blocks.w" +#line 59 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__empty_stack(void) ; -#line 70 "inform7/Chapter 30/Phrase Blocks.w" +#line 69 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__prepush_stack(void) ; -#line 77 "inform7/Chapter 30/Phrase Blocks.w" +#line 76 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__push_stack(void) ; -#line 86 "inform7/Chapter 30/Phrase Blocks.w" +#line 85 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__pop_stack(void) ; -#line 100 "inform7/Chapter 30/Phrase Blocks.w" +#line 99 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__begin_code_blocks(void) ; -#line 112 "inform7/Chapter 30/Phrase Blocks.w" +#line 111 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__end_code_blocks(void) ; -#line 139 "inform7/Chapter 30/Phrase Blocks.w" +#line 138 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__beginning_block_phrase(OUTPUT_STREAM, phrase *ph) ; -#line 170 "inform7/Chapter 30/Phrase Blocks.w" +#line 169 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__open_code_block(OUTPUT_STREAM, phrase *owner, kind *K, STREAM *TAIL) ; -#line 183 "inform7/Chapter 30/Phrase Blocks.w" +#line 182 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__make_indentation_follow_code(OUTPUT_STREAM) ; -#line 199 "inform7/Chapter 30/Phrase Blocks.w" +#line 198 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__divide_code_block(int division_form) ; -#line 206 "inform7/Chapter 30/Phrase Blocks.w" +#line 205 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__read_division_count(int division_form) ; -#line 214 "inform7/Chapter 30/Phrase Blocks.w" +#line 213 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__close_code_block(OUTPUT_STREAM) ; -#line 232 "inform7/Chapter 30/Phrase Blocks.w" +#line 231 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__inside_a_loop_body(void) ; -#line 245 "inform7/Chapter 30/Phrase Blocks.w" +#line 244 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__inside_a_conditional_block(void) ; -#line 262 "inform7/Chapter 30/Phrase Blocks.w" +#line 261 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__current_block_level(void) ; -#line 266 "inform7/Chapter 30/Phrase Blocks.w" +#line 265 "inform7/Chapter 30/Phrase Blocks.w" char * Frames__Blocks__name_of_current_block(void) ; -#line 271 "inform7/Chapter 30/Phrase Blocks.w" +#line 270 "inform7/Chapter 30/Phrase Blocks.w" parse_node * Frames__Blocks__start_of_current_block(void) ; -#line 276 "inform7/Chapter 30/Phrase Blocks.w" +#line 275 "inform7/Chapter 30/Phrase Blocks.w" kind * Frames__Blocks__switch_value_kind(void) ; -#line 290 "inform7/Chapter 30/Phrase Blocks.w" +#line 289 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__compile_break(OUTPUT_STREAM) ; -#line 310 "inform7/Chapter 30/Phrase Blocks.w" +#line 309 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__set_variable_scope(local_variable *lvar) ; -#line 321 "inform7/Chapter 30/Phrase Blocks.w" +#line 320 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__set_scope_to_block_about_to_open(local_variable *lvar) ; #line 67 "inform7/Chapter 30/Stack Frames.w" ph_stack_frame Frames__new(void) ; @@ -10091,83 +10133,83 @@ void Chronology__past_actions_i6_routines(OUTPUT_STREAM) ; void Chronology__past_tenses_i6_escape(OUTPUT_STREAM) ; #line 364 "inform7/Chapter 30/Chronology.w" void Chronology__chronology_extents_i6_escape(OUTPUT_STREAM) ; -#line 210 "inform7/Chapter 31/Invocations.w" +#line 204 "inform7/Chapter 31/Invocations.w" invocation * Invocations__new(void) ; -#line 231 "inform7/Chapter 31/Invocations.w" +#line 225 "inform7/Chapter 31/Invocations.w" void Invocations__log(invocation *inv) ; -#line 268 "inform7/Chapter 31/Invocations.w" +#line 262 "inform7/Chapter 31/Invocations.w" void Invocations__set_flag(invocation *inv, int flag) ; -#line 273 "inform7/Chapter 31/Invocations.w" +#line 267 "inform7/Chapter 31/Invocations.w" void Invocations__clear_flag(invocation *inv, int flag) ; -#line 278 "inform7/Chapter 31/Invocations.w" +#line 272 "inform7/Chapter 31/Invocations.w" int Invocations__test_flag(invocation *inv, int flag) ; -#line 287 "inform7/Chapter 31/Invocations.w" +#line 281 "inform7/Chapter 31/Invocations.w" int Invocations__get_group(invocation *inv) ; -#line 292 "inform7/Chapter 31/Invocations.w" +#line 286 "inform7/Chapter 31/Invocations.w" void Invocations__set_group(invocation *inv, int g) ; -#line 302 "inform7/Chapter 31/Invocations.w" +#line 296 "inform7/Chapter 31/Invocations.w" int Invocations__get_unsorted_position(invocation *inv) ; -#line 307 "inform7/Chapter 31/Invocations.w" +#line 301 "inform7/Chapter 31/Invocations.w" void Invocations__set_unsorted_position(invocation *inv, int n) ; -#line 317 "inform7/Chapter 31/Invocations.w" +#line 311 "inform7/Chapter 31/Invocations.w" void Invocations__set_word_range(invocation *inv, int w1, int w2) ; -#line 325 "inform7/Chapter 31/Invocations.w" +#line 319 "inform7/Chapter 31/Invocations.w" void Invocations__set_verb_conjugation(invocation *inv, verb_conjugation *vc, verb_conjugation *modal, int neg) ; -#line 336 "inform7/Chapter 31/Invocations.w" +#line 330 "inform7/Chapter 31/Invocations.w" void Invocations__set_adjectival_phrase(invocation *inv, adjectival_phrase *aph) ; -#line 345 "inform7/Chapter 31/Invocations.w" +#line 339 "inform7/Chapter 31/Invocations.w" invocation_token_list * Invocations__new_token_list(void) ; -#line 358 "inform7/Chapter 31/Invocations.w" +#line 352 "inform7/Chapter 31/Invocations.w" void Invocations__set_token_check_to_do(invocation *inv, int i, specification *spec) ; -#line 369 "inform7/Chapter 31/Invocations.w" +#line 363 "inform7/Chapter 31/Invocations.w" void Invocations__set_token_as_parsed(invocation *inv, int i, specification *spec) ; -#line 380 "inform7/Chapter 31/Invocations.w" +#line 374 "inform7/Chapter 31/Invocations.w" void Invocations__set_token_to_be_parsed_against(invocation *inv, int i, specification *spec) ; -#line 394 "inform7/Chapter 31/Invocations.w" +#line 388 "inform7/Chapter 31/Invocations.w" specification * Invocations__get_token_check_to_do(invocation *inv, int i) ; -#line 402 "inform7/Chapter 31/Invocations.w" +#line 396 "inform7/Chapter 31/Invocations.w" specification * Invocations__get_token_as_parsed(invocation *inv, int i) ; -#line 410 "inform7/Chapter 31/Invocations.w" +#line 404 "inform7/Chapter 31/Invocations.w" specification * Invocations__get_token_to_be_parsed_against(invocation *inv, int i) ; -#line 418 "inform7/Chapter 31/Invocations.w" +#line 412 "inform7/Chapter 31/Invocations.w" kind * Invocations__get_token_variable_kind(invocation *inv, int i) ; -#line 426 "inform7/Chapter 31/Invocations.w" +#line 420 "inform7/Chapter 31/Invocations.w" void Invocations__set_token_variable_kind(invocation *inv, int i, kind *K) ; -#line 434 "inform7/Chapter 31/Invocations.w" +#line 428 "inform7/Chapter 31/Invocations.w" int Invocations__get_no_tokens(invocation *inv) ; -#line 444 "inform7/Chapter 31/Invocations.w" +#line 438 "inform7/Chapter 31/Invocations.w" phrase * Invocations__get_phrase_invoked(invocation *inv) ; -#line 449 "inform7/Chapter 31/Invocations.w" +#line 443 "inform7/Chapter 31/Invocations.w" void Invocations__set_phrase_invoked(invocation *inv, phrase *ph) ; -#line 453 "inform7/Chapter 31/Invocations.w" +#line 447 "inform7/Chapter 31/Invocations.w" void Invocations__set_instead_flag(invocation *inv, int t) ; -#line 462 "inform7/Chapter 31/Invocations.w" +#line 456 "inform7/Chapter 31/Invocations.w" int Invocations__get_number_tokens(invocation *inv) ; -#line 471 "inform7/Chapter 31/Invocations.w" +#line 465 "inform7/Chapter 31/Invocations.w" void Invocations__set_phrase_options(invocation *inv, int w1, int w2) ; -#line 483 "inform7/Chapter 31/Invocations.w" +#line 477 "inform7/Chapter 31/Invocations.w" void Invocations__get_phrase_options(invocation *inv, int *w1, int *w2) ; -#line 495 "inform7/Chapter 31/Invocations.w" +#line 489 "inform7/Chapter 31/Invocations.w" int Invocations__get_phrase_options_bitmap(invocation *inv) ; -#line 500 "inform7/Chapter 31/Invocations.w" +#line 494 "inform7/Chapter 31/Invocations.w" void Invocations__set_phrase_options_bitmap(invocation *inv, int further_bits) ; -#line 515 "inform7/Chapter 31/Invocations.w" +#line 509 "inform7/Chapter 31/Invocations.w" int Invocations__implies_newline(invocation *inv) ; -#line 527 "inform7/Chapter 31/Invocations.w" +#line 521 "inform7/Chapter 31/Invocations.w" invocation_list * Invocations__new_list(void) ; -#line 536 "inform7/Chapter 31/Invocations.w" +#line 530 "inform7/Chapter 31/Invocations.w" void Invocations__append_list(invocation_list *to, invocation_list *from) ; -#line 545 "inform7/Chapter 31/Invocations.w" +#line 539 "inform7/Chapter 31/Invocations.w" void Invocations__add_to_list(invocation_list *invl, invocation *inv) ; -#line 556 "inform7/Chapter 31/Invocations.w" +#line 550 "inform7/Chapter 31/Invocations.w" int Invocations__length_of_list(invocation_list *invl) ; -#line 574 "inform7/Chapter 31/Invocations.w" +#line 568 "inform7/Chapter 31/Invocations.w" void Invocations__sort_list(invocation_list *invl) ; -#line 630 "inform7/Chapter 31/Invocations.w" +#line 624 "inform7/Chapter 31/Invocations.w" int Invocations__comparison(const void *i1, const void *i2) ; -#line 687 "inform7/Chapter 31/Invocations.w" +#line 681 "inform7/Chapter 31/Invocations.w" void Invocations__log_list(invocation_list *invl) ; -#line 698 "inform7/Chapter 31/Invocations.w" +#line 692 "inform7/Chapter 31/Invocations.w" void Invocations__log_list_in_detail(invocation_list *invl) ; #line 33 "inform7/Chapter 31/Parse Invocations.w" void Phrases__Parser__register_excerpt(phrase *ph) ; @@ -10323,7 +10365,7 @@ STREAM * Routines__end(OUTPUT_STREAM) ; STREAM * Routines__end_retrieving(OUTPUT_STREAM, ph_stack_frame *retrieve) ; #line 29 "inform7/Chapter 33/Interactive Fiction ID.w" char * PL__Bibliographic__IFID__read_uuid(void) ; -#line 57 "inform7/Chapter 33/Interactive Fiction ID.w" +#line 55 "inform7/Chapter 33/Interactive Fiction ID.w" void PL__Bibliographic__IFID__UUID_ARRAY_array(OUTPUT_STREAM) ; #line 41 "inform7/Chapter 33/Bibliographic Data.w" void PL__Bibliographic__start(void) ; @@ -10351,41 +10393,41 @@ void PL__Bibliographic__index_bibliographic_variable(nonlocal_variable *nlv, ch void PL__Bibliographic__Release__handle_release_declaration(parse_node *p) ; #line 122 "inform7/Chapter 33/Release Instructions.w" void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) ; -#line 263 "inform7/Chapter 33/Release Instructions.w" -auxiliary_file * PL__Bibliographic__Release__create_aux_file(char *leafname, char *desc, char *subfolder, int payload) ; -#line 281 "inform7/Chapter 33/Release Instructions.w" +#line 270 "inform7/Chapter 33/Release Instructions.w" +auxiliary_file * PL__Bibliographic__Release__create_aux_file(filename *name, pathname *fold, char *desc, int payload) ; +#line 288 "inform7/Chapter 33/Release Instructions.w" void PL__Bibliographic__Release__write_ifiction_and_blurb(void) ; -#line 534 "inform7/Chapter 33/Release Instructions.w" +#line 519 "inform7/Chapter 33/Release Instructions.w" void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *header, int cover_picture_number, char *cover_art_format, unsigned int height, unsigned int width) ; -#line 757 "inform7/Chapter 33/Release Instructions.w" +#line 742 "inform7/Chapter 33/Release Instructions.w" int PL__Bibliographic__Release__write_var_to_XML(OUTPUT_STREAM, nonlocal_variable *nlv, int desc_mode) ; -#line 794 "inform7/Chapter 33/Release Instructions.w" -void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materials_folder, int cover_picture_number, char *cover_art_format) ; -#line 39 "inform7/Chapter 34/The Naming Thicket.w" +#line 779 "inform7/Chapter 33/Release Instructions.w" +void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, int cover_picture_number, char *cover_art_format) ; +#line 38 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__start(void) ; -#line 65 "inform7/Chapter 34/The Naming Thicket.w" +#line 64 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__naming_new_property_notify(property *prn) ; -#line 90 "inform7/Chapter 34/The Naming Thicket.w" +#line 89 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__now_has_proper_name(inference_subject *infs) ; -#line 95 "inform7/Chapter 34/The Naming Thicket.w" +#line 94 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__object_now_has_proper_name(instance *I) ; -#line 101 "inform7/Chapter 34/The Naming Thicket.w" +#line 100 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__object_now_has_plural_name(instance *I) ; -#line 117 "inform7/Chapter 34/The Naming Thicket.w" +#line 116 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__object_takes_definite_article(inference_subject *subj) ; -#line 128 "inform7/Chapter 34/The Naming Thicket.w" +#line 127 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__transfer_details(inference_subject *from, inference_subject *to) ; -#line 138 "inform7/Chapter 34/The Naming Thicket.w" +#line 137 "inform7/Chapter 34/The Naming Thicket.w" instance * PL__Naming__object_this_is_named_after(instance *I) ; -#line 149 "inform7/Chapter 34/The Naming Thicket.w" +#line 148 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__object_is_privately_named(instance *I) ; -#line 161 "inform7/Chapter 34/The Naming Thicket.w" +#line 160 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__naming_complete_model(int stage) ; -#line 439 "inform7/Chapter 34/The Naming Thicket.w" +#line 423 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__look_for_printed_name(inference_subject *subj) ; -#line 455 "inform7/Chapter 34/The Naming Thicket.w" +#line 439 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__compose_words_to_I6_naming_text(OUTPUT_STREAM, int w1, int w2, int cap, int your_flag) ; -#line 485 "inform7/Chapter 34/The Naming Thicket.w" +#line 469 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__compile_small_names(OUTPUT_STREAM) ; #line 38 "inform7/Chapter 34/Instance Counting.w" void PL__Counting__start(void) ; @@ -10579,67 +10621,67 @@ instance * PL__Regions__enclosing(instance *reg) ; int PL__Regions__regions_complete_model(int stage) ; #line 353 "inform7/Chapter 34/Regions.w" int PL__Regions__regions_add_to_World_index(instance *O) ; -#line 100 "inform7/Chapter 34/The Map.w" +#line 96 "inform7/Chapter 34/The Map.w" void PL__Map__start(void) ; -#line 123 "inform7/Chapter 34/The Map.w" +#line 119 "inform7/Chapter 34/The Map.w" map_data * PL__Map__new_data(inference_subject *subj) ; -#line 143 "inform7/Chapter 34/The Map.w" +#line 139 "inform7/Chapter 34/The Map.w" int PL__Map__map_log_inference_type(int it) ; -#line 156 "inform7/Chapter 34/The Map.w" +#line 152 "inform7/Chapter 34/The Map.w" int PL__Map__map_inferences_contradict(inference *A, inference *B, int similarity) ; -#line 178 "inform7/Chapter 34/The Map.w" +#line 174 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) ; -#line 191 "inform7/Chapter 34/The Map.w" +#line 187 "inform7/Chapter 34/The Map.w" int PL__Map__map_set_subkind_notify(kind *sub, kind *super) ; -#line 206 "inform7/Chapter 34/The Map.w" +#line 202 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_subject_notify(inference_subject *subj) ; -#line 214 "inform7/Chapter 34/The Map.w" +#line 210 "inform7/Chapter 34/The Map.w" int PL__Map__object_is_a_direction(instance *I) ; -#line 224 "inform7/Chapter 34/The Map.w" +#line 220 "inform7/Chapter 34/The Map.w" int PL__Map__object_is_a_door(instance *I) ; -#line 231 "inform7/Chapter 34/The Map.w" +#line 227 "inform7/Chapter 34/The Map.w" int PL__Map__subject_is_a_door(inference_subject *infs) ; -#line 244 "inform7/Chapter 34/The Map.w" +#line 240 "inform7/Chapter 34/The Map.w" int PL__Map__is_a_direction(inference_subject *infs) ; -#line 268 "inform7/Chapter 34/The Map.w" +#line 264 "inform7/Chapter 34/The Map.w" int PL__Map__map_set_kind_notify(instance *I, kind *k) ; -#line 318 "inform7/Chapter 34/The Map.w" +#line 314 "inform7/Chapter 34/The Map.w" int PL__Map__map_compile_object_header(OUTPUT_STREAM, instance *I) ; -#line 340 "inform7/Chapter 34/The Map.w" +#line 336 "inform7/Chapter 34/The Map.w" void PL__Map__build_exits_array(void) ; -#line 365 "inform7/Chapter 34/The Map.w" +#line 361 "inform7/Chapter 34/The Map.w" int PL__Map__map_compile_model_tables(OUTPUT_STREAM) ; -#line 421 "inform7/Chapter 34/The Map.w" +#line 417 "inform7/Chapter 34/The Map.w" void PL__Map__get_door_data(instance *door, instance **c1, instance **c2) ; -#line 439 "inform7/Chapter 34/The Map.w" +#line 435 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_property_notify(property *prn) ; -#line 458 "inform7/Chapter 34/The Map.w" +#line 454 "inform7/Chapter 34/The Map.w" int PL__Map__map_property_value_notify(property *prn, specification *val) ; -#line 476 "inform7/Chapter 34/The Map.w" +#line 472 "inform7/Chapter 34/The Map.w" void PL__Map__set_found_in(instance *I, STREAM *S) ; -#line 493 "inform7/Chapter 34/The Map.w" +#line 489 "inform7/Chapter 34/The Map.w" instance * PL__Map__get_value_of_opposite_property(instance *I) ; -#line 503 "inform7/Chapter 34/The Map.w" +#line 499 "inform7/Chapter 34/The Map.w" int PL__Map__map_estimate_property_usage(kind *k, int *words_used) ; -#line 520 "inform7/Chapter 34/The Map.w" +#line 516 "inform7/Chapter 34/The Map.w" int PL__Map__map_act_on_special_NPs(parse_node *p) ; -#line 543 "inform7/Chapter 34/The Map.w" +#line 539 "inform7/Chapter 34/The Map.w" int PL__Map__map_check_going(specification *from, specification *to, specification *by, specification *through, specification *pushing) ; -#line 576 "inform7/Chapter 34/The Map.w" +#line 572 "inform7/Chapter 34/The Map.w" int PL__Map__map_intervene_in_assertion(parse_node *px, parse_node *py) ; -#line 607 "inform7/Chapter 34/The Map.w" +#line 603 "inform7/Chapter 34/The Map.w" void PL__Map__enter_one_way_mode(void) ; -#line 608 "inform7/Chapter 34/The Map.w" +#line 604 "inform7/Chapter 34/The Map.w" void PL__Map__exit_one_way_mode(void) ; -#line 617 "inform7/Chapter 34/The Map.w" +#line 613 "inform7/Chapter 34/The Map.w" void PL__Map__connect(inference_subject *i_from, inference_subject *i_to, inference_subject *i_dir) ; -#line 642 "inform7/Chapter 34/The Map.w" +#line 638 "inform7/Chapter 34/The Map.w" void PL__Map__oneway_map_connection(instance *go_from, instance *go_to, instance *forwards_dir, int certainty_level) ; -#line 659 "inform7/Chapter 34/The Map.w" +#line 655 "inform7/Chapter 34/The Map.w" int PL__Map__map_complete_model(int stage) ; -#line 1001 "inform7/Chapter 34/The Map.w" +#line 997 "inform7/Chapter 34/The Map.w" int PL__Map__map_add_to_World_index(instance *O) ; -#line 1008 "inform7/Chapter 34/The Map.w" +#line 1004 "inform7/Chapter 34/The Map.w" int PL__Map__map_annotate_in_World_index(instance *O) ; #line 25 "inform7/Chapter 34/Map Connection Relations.w" void PL__MapDirections__create_relations(void) ; @@ -10665,41 +10707,41 @@ int PL__MapDirections__REL_describe_for_problems(OUTPUT_STREAM, binary_predicat binary_predicate * PL__MapDirections__get_mapping_relation(instance *dir) ; #line 239 "inform7/Chapter 34/Map Connection Relations.w" instance * PL__MapDirections__get_mapping_direction(binary_predicate *bp) ; -#line 61 "inform7/Chapter 34/Spatial Geometry.w" +#line 55 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec(int x, int y, int z) ; -#line 70 "inform7/Chapter 34/Spatial Geometry.w" +#line 64 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__vec_eq(vector U, vector V) ; -#line 75 "inform7/Chapter 34/Spatial Geometry.w" +#line 69 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__vec_lateral(vector V) ; -#line 83 "inform7/Chapter 34/Spatial Geometry.w" +#line 77 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec_plus(vector U, vector V) ; -#line 89 "inform7/Chapter 34/Spatial Geometry.w" +#line 83 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec_minus(vector U, vector V) ; -#line 95 "inform7/Chapter 34/Spatial Geometry.w" +#line 89 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec_negate(vector V) ; -#line 101 "inform7/Chapter 34/Spatial Geometry.w" +#line 95 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec_scale(int lambda, vector V) ; -#line 110 "inform7/Chapter 34/Spatial Geometry.w" +#line 104 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__vec_length_squared(vector V) ; -#line 114 "inform7/Chapter 34/Spatial Geometry.w" +#line 108 "inform7/Chapter 34/Spatial Geometry.w" float Geometry__vec_length(vector V) ; -#line 127 "inform7/Chapter 34/Spatial Geometry.w" +#line 121 "inform7/Chapter 34/Spatial Geometry.w" float Geometry__vec_angular_separation(vector E, vector D) ; -#line 140 "inform7/Chapter 34/Spatial Geometry.w" +#line 134 "inform7/Chapter 34/Spatial Geometry.w" cuboid Geometry__empty_cuboid(void) ; -#line 147 "inform7/Chapter 34/Spatial Geometry.w" +#line 141 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__adjust_cuboid(cuboid *C, vector V) ; -#line 163 "inform7/Chapter 34/Spatial Geometry.w" +#line 157 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__merge_cuboid(cuboid *C, cuboid X) ; -#line 179 "inform7/Chapter 34/Spatial Geometry.w" +#line 173 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__cuboid_translate(cuboid *C, vector D) ; -#line 189 "inform7/Chapter 34/Spatial Geometry.w" +#line 183 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__within_cuboid(vector P, cuboid C) ; -#line 206 "inform7/Chapter 34/Spatial Geometry.w" +#line 200 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__cuboid_index(vector P, cuboid C) ; -#line 214 "inform7/Chapter 34/Spatial Geometry.w" +#line 208 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__cuboid_volume(cuboid C) ; -#line 227 "inform7/Chapter 34/Spatial Geometry.w" +#line 221 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__thicken_cuboid(cuboid *C, vector V, vector S) ; #line 144 "inform7/Chapter 34/Spatial Map.w" void PL__SpatialMap__establish_spatial_coordinates(void) ; @@ -10927,37 +10969,37 @@ void PL__EPSMap__new_map_hint_sentence(int pass, parse_node *p) ; int PL__EPSMap__parse_eps_map_offset(char *original) ; #line 802 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__render_map_as_EPS(void) ; -#line 884 "inform7/Chapter 34/EPS Map.w" +#line 882 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) ; -#line 1154 "inform7/Chapter 34/EPS Map.w" +#line 1152 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, int abbrev_to, char *font, int x, int y, int pointsize, int centre_h, int centre_v) ; -#line 1222 "inform7/Chapter 34/EPS Map.w" +#line 1220 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_header(OUTPUT_STREAM, int bounding_box_width, int bounding_box_height, char *default_font, int default_point_size) ; -#line 1236 "inform7/Chapter 34/EPS Map.w" +#line 1234 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_circular_path(OUTPUT_STREAM, int x0, int y0, int radius) ; -#line 1243 "inform7/Chapter 34/EPS Map.w" +#line 1241 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_rectangular_path(OUTPUT_STREAM, int x0, int y0, int x1, int y1) ; -#line 1254 "inform7/Chapter 34/EPS Map.w" +#line 1252 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_room_boundary_path(OUTPUT_STREAM, int bx, int by, int boxsize, char *shape) ; -#line 1268 "inform7/Chapter 34/EPS Map.w" +#line 1266 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_horizontal_line_path(OUTPUT_STREAM, int x0, int x1, int y) ; -#line 1277 "inform7/Chapter 34/EPS Map.w" +#line 1275 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_dashed_arrow(OUTPUT_STREAM, int length, vector Dir, int x0, int y0) ; -#line 1291 "inform7/Chapter 34/EPS Map.w" +#line 1289 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_Bezier_curve(OUTPUT_STREAM, int stiffness0, int stiffness1, int x0, int y0, int exit0, int x1, int y1, int exit1) ; -#line 1309 "inform7/Chapter 34/EPS Map.w" +#line 1307 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_line_width_setting(OUTPUT_STREAM, int new) ; -#line 1314 "inform7/Chapter 34/EPS Map.w" +#line 1312 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_line_width_unsetting(OUTPUT_STREAM) ; -#line 1322 "inform7/Chapter 34/EPS Map.w" +#line 1320 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_text(OUTPUT_STREAM, char *text, int x, int y, char *font, int pointsize, int centre_h, int centre_v) ; -#line 1341 "inform7/Chapter 34/EPS Map.w" +#line 1339 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_set_colour(OUTPUT_STREAM, char *htmlcolour) ; -#line 1349 "inform7/Chapter 34/EPS Map.w" +#line 1347 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__choose_colour_beam(OUTPUT_STREAM, char hex1, char hex2) ; -#line 1354 "inform7/Chapter 34/EPS Map.w" +#line 1352 "inform7/Chapter 34/EPS Map.w" int PL__EPSMap__hex_to_int(char hex) ; -#line 1380 "inform7/Chapter 34/EPS Map.w" +#line 1378 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_set_greyscale(OUTPUT_STREAM, int N) ; #line 16 "inform7/Chapter 34/Showme Command.w" void PL__Showme__start(void) ; @@ -10973,41 +11015,41 @@ int PL__Showme__is_property_worth_SHOWME(OUTPUT_STREAM, inference_subject *subj void PL__Showme__compile_property_SHOWME(OUTPUT_STREAM, inference_subject *subj, property *prn) ; #line 109 "inform7/Chapter 34/Showme Command.w" int PL__Showme__SHOWME_primitive(OUTPUT_STREAM, inference_subject *subj, property *prn, int comp) ; -#line 100 "inform7/Chapter 34/Scenes.w" +#line 98 "inform7/Chapter 34/Scenes.w" void PL__Scenes__start(void) ; -#line 109 "inform7/Chapter 34/Scenes.w" +#line 107 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) ; -#line 127 "inform7/Chapter 34/Scenes.w" +#line 125 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_property_notify(property *prn) ; -#line 140 "inform7/Chapter 34/Scenes.w" +#line 138 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_named_instance_notify(instance *I) ; -#line 153 "inform7/Chapter 34/Scenes.w" +#line 151 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene(instance *I) ; -#line 194 "inform7/Chapter 34/Scenes.w" +#line 192 "inform7/Chapter 34/Scenes.w" scene * PL__Scenes__from_named_constant(instance *I) ; -#line 202 "inform7/Chapter 34/Scenes.w" +#line 200 "inform7/Chapter 34/Scenes.w" void PL__Scenes__get_name(scene *sc, int *w1, int *w2) ; -#line 209 "inform7/Chapter 34/Scenes.w" +#line 207 "inform7/Chapter 34/Scenes.w" int PL__Scenes__parse_scene_end_name(scene *sc, int en1, int en2, int create) ; -#line 243 "inform7/Chapter 34/Scenes.w" +#line 241 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene_rulebook(scene *sc, int end) ; -#line 322 "inform7/Chapter 34/Scenes.w" +#line 320 "inform7/Chapter 34/Scenes.w" void PL__Scenes__begins_or_ends_when(parse_node *p) ; -#line 450 "inform7/Chapter 34/Scenes.w" +#line 448 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene_anchor(parse_node *p) ; -#line 566 "inform7/Chapter 34/Scenes.w" +#line 564 "inform7/Chapter 34/Scenes.w" void PL__Scenes__DetectSceneChange_routine(OUTPUT_STREAM) ; -#line 604 "inform7/Chapter 34/Scenes.w" +#line 602 "inform7/Chapter 34/Scenes.w" void PL__Scenes__test_scene_end(OUTPUT_STREAM, scene *sc, int end) ; -#line 662 "inform7/Chapter 34/Scenes.w" +#line 660 "inform7/Chapter 34/Scenes.w" void PL__Scenes__compile_scene_end(OUTPUT_STREAM, scene *sc, int end) ; -#line 677 "inform7/Chapter 34/Scenes.w" +#line 675 "inform7/Chapter 34/Scenes.w" void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) ; -#line 790 "inform7/Chapter 34/Scenes.w" +#line 788 "inform7/Chapter 34/Scenes.w" void PL__Scenes__ShowSceneStatus_routine(OUTPUT_STREAM) ; -#line 837 "inform7/Chapter 34/Scenes.w" +#line 835 "inform7/Chapter 34/Scenes.w" void PL__Scenes__PrintSceneName_routine(OUTPUT_STREAM) ; -#line 883 "inform7/Chapter 34/Scenes.w" +#line 881 "inform7/Chapter 34/Scenes.w" void PL__Scenes__test_during_clause(OUTPUT_STREAM, specification *spec) ; #line 20 "inform7/Chapter 34/Temporal Map.w" void PL__Scenes__Index__index(void) ; @@ -11025,127 +11067,127 @@ void PL__Scenes__Index__scene_icon_legend(char *si, char *gloss) ; void PL__Scenes__Index__scene_icon_unspaced(char *si) ; #line 368 "inform7/Chapter 34/Temporal Map.w" int PL__Scenes__Index__compare_scenes(const void *ent1, const void *ent2) ; -#line 107 "inform7/Chapter 35/Actions.w" +#line 106 "inform7/Chapter 35/Actions.w" void PL__Actions__start(void) ; -#line 119 "inform7/Chapter 35/Actions.w" +#line 118 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) ; -#line 135 "inform7/Chapter 35/Actions.w" +#line 134 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_compile_constant(OUTPUT_STREAM, kind *K, specification *spec) ; -#line 156 "inform7/Chapter 35/Actions.w" +#line 155 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_offered_property(kind *K, specification *owner, parse_node *what) ; -#line 166 "inform7/Chapter 35/Actions.w" +#line 165 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_offered_specification(specification *owner, int w1, int w2) ; -#line 179 "inform7/Chapter 35/Actions.w" +#line 178 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_typecheck_equality(kind *K1, kind *K2) ; -#line 193 "inform7/Chapter 35/Actions.w" +#line 192 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_forbid_setting(kind *K) ; -#line 209 "inform7/Chapter 35/Actions.w" +#line 208 "inform7/Chapter 35/Actions.w" void PL__Actions__coerce_TEST_ACTION_to_STORED_ACTION(specification *spec) ; -#line 227 "inform7/Chapter 35/Actions.w" +#line 226 "inform7/Chapter 35/Actions.w" void PL__Actions__coerce_TEST_ACTION_to_DESCRIPTION_OF_ACTION(specification *spec) ; -#line 258 "inform7/Chapter 35/Actions.w" +#line 257 "inform7/Chapter 35/Actions.w" action_name * PL__Actions__act_new(int w1, int w2, int implemented_by_I7) ; -#line 359 "inform7/Chapter 35/Actions.w" +#line 358 "inform7/Chapter 35/Actions.w" int PL__Actions__action_names_overlap(action_name *an1, action_name *an2) ; -#line 370 "inform7/Chapter 35/Actions.w" +#line 369 "inform7/Chapter 35/Actions.w" void PL__Actions__log(action_name *an) ; -#line 414 "inform7/Chapter 35/Actions.w" +#line 413 "inform7/Chapter 35/Actions.w" action_name * PL__Actions__longest_null(int w1, int w2, int tense, int *excess) ; -#line 430 "inform7/Chapter 35/Actions.w" +#line 429 "inform7/Chapter 35/Actions.w" int PL__Actions__it_optional(action_name *an) ; -#line 434 "inform7/Chapter 35/Actions.w" +#line 433 "inform7/Chapter 35/Actions.w" int PL__Actions__abbreviable(action_name *an) ; -#line 438 "inform7/Chapter 35/Actions.w" +#line 437 "inform7/Chapter 35/Actions.w" char * PL__Actions__identifier(action_name *an) ; -#line 442 "inform7/Chapter 35/Actions.w" +#line 441 "inform7/Chapter 35/Actions.w" rulebook * PL__Actions__get_fragmented_rulebook(action_name *an, rulebook *rb) ; -#line 449 "inform7/Chapter 35/Actions.w" +#line 448 "inform7/Chapter 35/Actions.w" rulebook * PL__Actions__switch_fragmented_rulebook(action_name *new_an, rulebook *orig) ; -#line 460 "inform7/Chapter 35/Actions.w" +#line 459 "inform7/Chapter 35/Actions.w" void PL__Actions__actions_set_specification_text(action_name *an, int wn) ; -#line 463 "inform7/Chapter 35/Actions.w" +#line 462 "inform7/Chapter 35/Actions.w" int PL__Actions__an_get_specification_text(action_name *an) ; -#line 472 "inform7/Chapter 35/Actions.w" +#line 471 "inform7/Chapter 35/Actions.w" void PL__Actions__name_all(void) ; -#line 480 "inform7/Chapter 35/Actions.w" +#line 479 "inform7/Chapter 35/Actions.w" void PL__Actions__translates(int w1, int w2, parse_node *p2) ; -#line 501 "inform7/Chapter 35/Actions.w" +#line 500 "inform7/Chapter 35/Actions.w" int PL__Actions__get_stem_length(action_name *an) ; -#line 564 "inform7/Chapter 35/Actions.w" +#line 563 "inform7/Chapter 35/Actions.w" void PL__Actions__an_add_variable(action_name *an, parse_node *cnode) ; -#line 689 "inform7/Chapter 35/Actions.w" +#line 688 "inform7/Chapter 35/Actions.w" stacked_variable * PL__Actions__parse_match_clause(action_name *an, int w1, int w2) ; -#line 693 "inform7/Chapter 35/Actions.w" +#line 692 "inform7/Chapter 35/Actions.w" void PL__Actions__compile_action_name_var_creators(OUTPUT_STREAM) ; -#line 867 "inform7/Chapter 35/Actions.w" +#line 866 "inform7/Chapter 35/Actions.w" void PL__Actions__act_parse_definition(parse_node *p) ; -#line 902 "inform7/Chapter 35/Actions.w" +#line 901 "inform7/Chapter 35/Actions.w" int PL__Actions__is_out_of_world(action_name *an) ; -#line 907 "inform7/Chapter 35/Actions.w" +#line 906 "inform7/Chapter 35/Actions.w" kind * PL__Actions__get_data_type_of_noun(action_name *an) ; -#line 911 "inform7/Chapter 35/Actions.w" +#line 910 "inform7/Chapter 35/Actions.w" kind * PL__Actions__get_data_type_of_second_noun(action_name *an) ; -#line 915 "inform7/Chapter 35/Actions.w" +#line 914 "inform7/Chapter 35/Actions.w" void PL__Actions__set_text_to_name_tensed(action_name *an, int *x1, int *x2, int tense) ; -#line 925 "inform7/Chapter 35/Actions.w" +#line 924 "inform7/Chapter 35/Actions.w" int PL__Actions__can_have_parameters(action_name *an) ; -#line 930 "inform7/Chapter 35/Actions.w" +#line 929 "inform7/Chapter 35/Actions.w" int PL__Actions__get_max_parameters(action_name *an) ; -#line 942 "inform7/Chapter 35/Actions.w" +#line 941 "inform7/Chapter 35/Actions.w" int PL__Actions__can_be_compiled_in_past_tense(action_name *an) ; -#line 951 "inform7/Chapter 35/Actions.w" +#line 950 "inform7/Chapter 35/Actions.w" void PL__Actions__compile_action_bitmap_property(OUTPUT_STREAM) ; -#line 956 "inform7/Chapter 35/Actions.w" +#line 955 "inform7/Chapter 35/Actions.w" void PL__Actions__ActionHappened_array(OUTPUT_STREAM) ; -#line 968 "inform7/Chapter 35/Actions.w" +#line 967 "inform7/Chapter 35/Actions.w" void PL__Actions__add_gl(action_name *an, grammar_line *gl) ; -#line 973 "inform7/Chapter 35/Actions.w" +#line 972 "inform7/Chapter 35/Actions.w" void PL__Actions__remove_gl(action_name *an) ; -#line 980 "inform7/Chapter 35/Actions.w" +#line 979 "inform7/Chapter 35/Actions.w" void PL__Actions__check_types_for_grammar(action_name *an, int tok_values, kind **tok_value_kinds) ; -#line 1095 "inform7/Chapter 35/Actions.w" +#line 1094 "inform7/Chapter 35/Actions.w" void PL__Actions__compile_action_routines(OUTPUT_STREAM) ; -#line 1114 "inform7/Chapter 35/Actions.w" +#line 1113 "inform7/Chapter 35/Actions.w" void PL__Actions__ActionData_array(OUTPUT_STREAM) ; -#line 1155 "inform7/Chapter 35/Actions.w" +#line 1154 "inform7/Chapter 35/Actions.w" void PL__Actions__DB_Action_Details(OUTPUT_STREAM) ; -#line 1204 "inform7/Chapter 35/Actions.w" +#line 1203 "inform7/Chapter 35/Actions.w" void PL__Actions__cat_something2(OUTPUT_STREAM, action_name *an, int n) ; -#line 1214 "inform7/Chapter 35/Actions.w" +#line 1213 "inform7/Chapter 35/Actions.w" void PL__Actions__print_action_text_to(int w1, int w2, int start, OUTPUT_STREAM) ; -#line 1224 "inform7/Chapter 35/Actions.w" +#line 1223 "inform7/Chapter 35/Actions.w" void PL__Actions__ActionCoding_array(OUTPUT_STREAM) ; -#line 1240 "inform7/Chapter 35/Actions.w" +#line 1239 "inform7/Chapter 35/Actions.w" int PL__Actions__index(action_name *an, int pass, extension_file **ext, heading **current_area, int f, int *new_par, int bold, int on_details_page) ; -#line 1361 "inform7/Chapter 35/Actions.w" +#line 1360 "inform7/Chapter 35/Actions.w" void PL__Actions__act_index_something(action_name *an, int argc) ; -#line 39 "inform7/Chapter 35/Action Name Lists.w" +#line 38 "inform7/Chapter 35/Action Name Lists.w" action_name_list * PL__Actions__Lists__anl_new(void) ; -#line 55 "inform7/Chapter 35/Action Name Lists.w" +#line 54 "inform7/Chapter 35/Action Name Lists.w" void PL__Actions__Lists__log(action_name_list *anl) ; -#line 73 "inform7/Chapter 35/Action Name Lists.w" +#line 72 "inform7/Chapter 35/Action Name Lists.w" void PL__Actions__Lists__log_briefly(action_name_list *anl) ; -#line 93 "inform7/Chapter 35/Action Name Lists.w" +#line 92 "inform7/Chapter 35/Action Name Lists.w" action_name * PL__Actions__Lists__get_singleton_action(action_name_list *anl) ; -#line 285 "inform7/Chapter 35/Action Name Lists.w" +#line 284 "inform7/Chapter 35/Action Name Lists.w" action_name_list * PL__Actions__Lists__flip_anl_parity(action_name_list *anl, int flip_all) ; -#line 301 "inform7/Chapter 35/Action Name Lists.w" +#line 300 "inform7/Chapter 35/Action Name Lists.w" action_name_list * PL__Actions__Lists__parse(int w1, int w2, int tense) ; -#line 313 "inform7/Chapter 35/Action Name Lists.w" +#line 312 "inform7/Chapter 35/Action Name Lists.w" action_name_list * PL__Actions__Lists__anl_parse_internal(int w1, int w2) ; -#line 405 "inform7/Chapter 35/Action Name Lists.w" +#line 404 "inform7/Chapter 35/Action Name Lists.w" action_name_list * PL__Actions__Lists__extract_actions_only(int w1, int w2) ; -#line 423 "inform7/Chapter 35/Action Name Lists.w" +#line 422 "inform7/Chapter 35/Action Name Lists.w" action_name * PL__Actions__Lists__get_single_action(action_name_list *anl) ; -#line 450 "inform7/Chapter 35/Action Name Lists.w" +#line 449 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__get_explicit_anyone_flag(action_name_list *anl) ; -#line 455 "inform7/Chapter 35/Action Name Lists.w" +#line 454 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__negated(action_name_list *anl) ; -#line 460 "inform7/Chapter 35/Action Name Lists.w" +#line 459 "inform7/Chapter 35/Action Name Lists.w" void PL__Actions__Lists__compile(OUTPUT_STREAM, action_name_list *anl) ; -#line 500 "inform7/Chapter 35/Action Name Lists.w" +#line 499 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__compare_specificity(action_name_list *anl1, action_name_list *anl2) ; -#line 512 "inform7/Chapter 35/Action Name Lists.w" +#line 511 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__count_actions_covered(action_name_list *anl) ; #line 124 "inform7/Chapter 35/Action Patterns.w" action_pattern PL__Actions__Patterns__new(void) ; @@ -11301,31 +11343,31 @@ void PL__Parsing__understand_nothing(understanding_reference *ur, int when1, in void PL__Parsing__understand_block(int w1, int w2, understanding_reference *ur, int when1, int when2, int table_entry) ; #line 900 "inform7/Chapter 36/Traverse for Grammar.w" int PL__Parsing__valid_new_token_name(int w1, int w2) ; -#line 54 "inform7/Chapter 36/Grammar Properties.w" +#line 52 "inform7/Chapter 36/Grammar Properties.w" parsing_data * PL__Parsing__Visibility__new_data(inference_subject *subj) ; -#line 60 "inform7/Chapter 36/Grammar Properties.w" +#line 58 "inform7/Chapter 36/Grammar Properties.w" parsing_pp_data * PL__Parsing__Visibility__new_pp_data(property_permission *pp) ; -#line 72 "inform7/Chapter 36/Grammar Properties.w" +#line 70 "inform7/Chapter 36/Grammar Properties.w" void PL__Parsing__Visibility__start(void) ; -#line 80 "inform7/Chapter 36/Grammar Properties.w" +#line 78 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_new_subject_notify(inference_subject *subj) ; -#line 85 "inform7/Chapter 36/Grammar Properties.w" +#line 83 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_new_permission_notify(property_permission *new_pp) ; -#line 110 "inform7/Chapter 36/Grammar Properties.w" +#line 108 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_new_variable_notify(nonlocal_variable *var) ; -#line 135 "inform7/Chapter 36/Grammar Properties.w" +#line 133 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_estimate_property_usage(kind *k, int *words_used) ; -#line 149 "inform7/Chapter 36/Grammar Properties.w" +#line 147 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_complete_model(int stage) ; -#line 282 "inform7/Chapter 36/Grammar Properties.w" +#line 280 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__seek(property *pr, inference_subject *subj, int level, int when1, int when2) ; -#line 300 "inform7/Chapter 36/Grammar Properties.w" +#line 298 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__any_property_visible_to_subject(inference_subject *subj, int allow_inheritance) ; -#line 311 "inform7/Chapter 36/Grammar Properties.w" +#line 309 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__get_level(property_permission *pp) ; -#line 315 "inform7/Chapter 36/Grammar Properties.w" +#line 313 "inform7/Chapter 36/Grammar Properties.w" specification * PL__Parsing__Visibility__get_condition(property_permission *pp) ; -#line 337 "inform7/Chapter 36/Grammar Properties.w" +#line 335 "inform7/Chapter 36/Grammar Properties.w" void PL__Parsing__Visibility__log_parsing_visibility(inference_subject *infs) ; #line 89 "inform7/Chapter 36/Grammar Verbs.w" grammar_verb * PL__Parsing__Verbs__gv_new(int gv_is) ; @@ -11635,17 +11677,17 @@ blorb_figure * PL__Figures__new_blorb_figure(instance *nc) ; void PL__Figures__handle_figure_definition(parse_node *p) ; #line 135 "inform7/Chapter 37/Figures.w" void PL__Figures__register_figure(int f1, int f2, int fn1, int fn2) ; -#line 174 "inform7/Chapter 37/Figures.w" +#line 175 "inform7/Chapter 37/Figures.w" char * PL__Figures__description_of_cover_art(void) ; -#line 185 "inform7/Chapter 37/Figures.w" +#line 186 "inform7/Chapter 37/Figures.w" void PL__Figures__write_picture_manifest(OUTPUT_STREAM, int releasing_cover) ; -#line 214 "inform7/Chapter 37/Figures.w" -void PL__Figures__write_blurb_commands(OUTPUT_STREAM, char *resources) ; -#line 237 "inform7/Chapter 37/Figures.w" +#line 217 "inform7/Chapter 37/Figures.w" +void PL__Figures__write_blurb_commands(OUTPUT_STREAM) ; +#line 235 "inform7/Chapter 37/Figures.w" void PL__Figures__write_copy_commands(void) ; -#line 249 "inform7/Chapter 37/Figures.w" +#line 247 "inform7/Chapter 37/Figures.w" void PL__Figures__tableoffigures_array(OUTPUT_STREAM) ; -#line 265 "inform7/Chapter 37/Figures.w" +#line 263 "inform7/Chapter 37/Figures.w" void PL__Figures__index_all(void) ; #line 41 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__start(void) ; @@ -11659,15 +11701,15 @@ blorb_sound * PL__Sounds__new_blorb_sound(instance *nc) ; void PL__Sounds__handle_sound_definition(parse_node *p) ; #line 118 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__register_sound(int f1, int f2, int fn1, int fn2) ; -#line 161 "inform7/Chapter 37/Sound Effects.w" +#line 162 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__write_sounds_manifest(OUTPUT_STREAM) ; -#line 177 "inform7/Chapter 37/Sound Effects.w" -void PL__Sounds__write_blurb_commands(OUTPUT_STREAM, char *resources) ; +#line 180 "inform7/Chapter 37/Sound Effects.w" +void PL__Sounds__write_blurb_commands(OUTPUT_STREAM) ; #line 197 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__write_copy_commands(void) ; -#line 208 "inform7/Chapter 37/Sound Effects.w" +#line 211 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__tableofsounds_array(OUTPUT_STREAM) ; -#line 220 "inform7/Chapter 37/Sound Effects.w" +#line 223 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__index_all(void) ; #line 43 "inform7/Chapter 37/External Files.w" void PL__Files__start(void) ; @@ -11687,9 +11729,11 @@ int PL__Files__files_compile_constant(OUTPUT_STREAM, kind *K, specification *sp void PL__Files__arrays(OUTPUT_STREAM) ; #line 303 "inform7/Chapter 37/External Files.w" void PL__Files__index_all(void) ; -#line 31 "inform7/Chapter 38/Main Routine.w" +#line 13 "inform7/Chapter 38/Main Routine.w" int main(int argc, char *argv[]) ; -#line 199 "inform7/Chapter 38/Main Routine.w" +#line 29 "inform7/Chapter 38/Main Routine.w" +int Main__core_inform_main(int argc, char *argv[]) ; +#line 130 "inform7/Chapter 38/Main Routine.w" char * Main__cli_pair(char *wanted, char *got) ; #line 68 "inform7/Chapter 38/Translate to Identifiers.w" void IdentifierTranslations__as(parse_node *pn) ; @@ -11697,17 +11741,17 @@ void IdentifierTranslations__as(parse_node *pn) ; void IdentifierTranslations__plus_responses(parse_node *p, rule *R) ; #line 162 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N_escape) ; -#line 942 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 922 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__compile_I7_from_I6(OUTPUT_STREAM, char *p) ; -#line 991 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 971 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__new_intervention(int stage, char *segment, char *part, char *i6, char *seg) ; -#line 1019 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 999 "inform7/Chapter 38/I6 Template Interpreter.w" int TemplateFiles__I6T_file_intervene(OUTPUT_STREAM, int stage, char *segment, char *part) ; -#line 1046 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1026 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__report_unacted_upon_interventions(void) ; -#line 1077 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1057 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__compile_build_number(OUTPUT_STREAM) ; -#line 1087 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1067 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__register_sentence_handlers(void) ; #line 93 "inform7/Chapter 38/Plugins.w" word_assemblage Plugins__Manage__wording(int N) ; @@ -11797,9 +11841,9 @@ int Plugins__Call__detect_bodysnatching(inference_subject *body, int *snatcher, int Plugins__Call__add_to_World_index(instance *O) ; #line 236 "inform7/Chapter 38/Plugin Calls.w" int Plugins__Call__annotate_in_World_index(instance *O) ; -#line 421 "inform7/Chapter 2/Debugging Log.w" +#line 419 "inform7/Chapter 2/Debugging Log.w" nonterminal *include_in_debugging_sentence_subject_NTM = NULL; -#line 425 "inform7/Chapter 2/Debugging Log.w" +#line 423 "inform7/Chapter 2/Debugging Log.w" nonterminal *debugging_log_request_NTM = NULL; #line 69 "inform7/Chapter 4/HTML Documentation.w" nonterminal *extension_documentation_heading_NTM = NULL; @@ -11815,9 +11859,9 @@ nonterminal *documentation_symbol_tail_NTM = NULL; nonterminal *documentation_symbol_NTM = NULL; #line 618 "inform7/Chapter 7/Tries and Inflections.w" nonterminal *small_trie_test_NTM = NULL; -#line 286 "inform7/Chapter 7/Natural Languages.w" +#line 273 "inform7/Chapter 7/Natural Languages.w" nonterminal *natural_language_NTM = NULL; -#line 471 "inform7/Chapter 7/Preform.w" +#line 467 "inform7/Chapter 7/Preform.w" nonterminal *preform_nonterminal_NTM = NULL; #line 74 "inform7/Chapter 7/English Inflections.w" nonterminal *singular_noun_to_its_indefinite_article_NTM = NULL; @@ -12029,39 +12073,39 @@ nonterminal *iteration_repetitions_NTM = NULL; nonterminal *turn_repetitions_NTM = NULL; #line 198 "inform7/Chapter 8/Time Periods.w" nonterminal *rep_number_NTM = NULL; -#line 61 "inform7/Chapter 9/Adjectives.w" +#line 63 "inform7/Chapter 9/Adjectives.w" nonterminal *adjective_name_NTM = NULL; #line 1023 "inform7/Chapter 9/Adjective Meanings.w" nonterminal *adaptive_adjective_NTM = NULL; -#line 1490 "inform7/Chapter 10/Literal Patterns.w" +#line 1492 "inform7/Chapter 10/Literal Patterns.w" nonterminal *specifies_sentence_subject_NTM = NULL; -#line 1496 "inform7/Chapter 10/Literal Patterns.w" +#line 1498 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_group_list_NTM = NULL; -#line 1500 "inform7/Chapter 10/Literal Patterns.w" +#line 1502 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_group_tail_NTM = NULL; -#line 1504 "inform7/Chapter 10/Literal Patterns.w" +#line 1506 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_group_NTM = NULL; -#line 1560 "inform7/Chapter 10/Literal Patterns.w" +#line 1562 "inform7/Chapter 10/Literal Patterns.w" nonterminal *specifies_sentence_object_NTM = NULL; -#line 1564 "inform7/Chapter 10/Literal Patterns.w" +#line 1566 "inform7/Chapter 10/Literal Patterns.w" nonterminal *kind_specified_NTM = NULL; -#line 1568 "inform7/Chapter 10/Literal Patterns.w" +#line 1570 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_specification_tail_NTM = NULL; -#line 1575 "inform7/Chapter 10/Literal Patterns.w" +#line 1577 "inform7/Chapter 10/Literal Patterns.w" nonterminal *scaling_instruction_NTM = NULL; -#line 1601 "inform7/Chapter 10/Literal Patterns.w" +#line 1603 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_list_NTM = NULL; -#line 1605 "inform7/Chapter 10/Literal Patterns.w" +#line 1607 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_tail_NTM = NULL; -#line 1609 "inform7/Chapter 10/Literal Patterns.w" +#line 1611 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_NTM = NULL; -#line 1613 "inform7/Chapter 10/Literal Patterns.w" +#line 1615 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_option_list_NTM = NULL; -#line 1617 "inform7/Chapter 10/Literal Patterns.w" +#line 1619 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_option_tail_NTM = NULL; -#line 1621 "inform7/Chapter 10/Literal Patterns.w" +#line 1623 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_part_option_NTM = NULL; -#line 1905 "inform7/Chapter 10/Literal Patterns.w" +#line 1907 "inform7/Chapter 10/Literal Patterns.w" nonterminal *literal_pattern_group_name_NTM = NULL; #line 71 "inform7/Chapter 10/Times of Day.w" nonterminal *literal_time_NTM = NULL; @@ -12085,7 +12129,7 @@ nonterminal *translates_into_unicode_sentence_object_NTM = NULL; nonterminal *unicode_character_NTM = NULL; #line 84 "inform7/Chapter 10/Unicode Translations.w" nonterminal *unicode_character_name_NTM = NULL; -#line 335 "inform7/Chapter 10/Nametags.w" +#line 338 "inform7/Chapter 10/Nametags.w" nonterminal *translates_into_nl_sentence_subject_NTM = NULL; #line 349 "inform7/Chapter 10/Instances.w" nonterminal *instance_of_object_NTM = NULL; @@ -12097,7 +12141,7 @@ nonterminal *instance_NTM = NULL; nonterminal *notable_variables_NTM = NULL; #line 629 "inform7/Chapter 10/Nonlocal Variables.w" nonterminal *value_understood_variable_name_NTM = NULL; -#line 700 "inform7/Chapter 11/Binary Predicates.w" +#line 694 "inform7/Chapter 11/Binary Predicates.w" nonterminal *relation_name_NTM = NULL; #line 66 "inform7/Chapter 11/Relations.w" nonterminal *relation_names_NTM = NULL; @@ -12359,9 +12403,9 @@ nonterminal *extension_unversioned_NTM = NULL; nonterminal *extension_unversioned_inner_NTM = NULL; #line 103 "inform7/Chapter 14/Including Extensions.w" nonterminal *extension_version_NTM = NULL; -#line 251 "inform7/Chapter 14/Including Extensions.w" +#line 238 "inform7/Chapter 14/Including Extensions.w" nonterminal *extension_body_NTM = NULL; -#line 367 "inform7/Chapter 14/Including Extensions.w" +#line 354 "inform7/Chapter 14/Including Extensions.w" nonterminal *begins_here_sentence_subject_NTM = NULL; #line 301 "inform7/Chapter 15/Traverse for Assertions.w" nonterminal *no_verb_diagnosis_NTM = NULL; @@ -12387,15 +12431,15 @@ nonterminal *unsuitable_name_for_locals_NTM = NULL; nonterminal *unfortunate_name_NTM = NULL; #line 1690 "inform7/Chapter 15/Make Assertions.w" nonterminal *something_loose_diagnosis_NTM = NULL; -#line 33 "inform7/Chapter 15/Property Declarations.w" +#line 31 "inform7/Chapter 15/Property Declarations.w" nonterminal *forbidden_property_owners_NTM = NULL; -#line 131 "inform7/Chapter 15/Property Declarations.w" +#line 129 "inform7/Chapter 15/Property Declarations.w" nonterminal *can_be_sentence_object_NTM = NULL; -#line 137 "inform7/Chapter 15/Property Declarations.w" +#line 135 "inform7/Chapter 15/Property Declarations.w" nonterminal *condition_name_NTM = NULL; -#line 141 "inform7/Chapter 15/Property Declarations.w" +#line 139 "inform7/Chapter 15/Property Declarations.w" nonterminal *condition_name_inner_NTM = NULL; -#line 146 "inform7/Chapter 15/Property Declarations.w" +#line 144 "inform7/Chapter 15/Property Declarations.w" nonterminal *condition_name_innermost_NTM = NULL; #line 26 "inform7/Chapter 16/Architecture of the S-Parser.w" nonterminal *s_plain_text_NTM = NULL; @@ -12605,7 +12649,7 @@ nonterminal *s_say_term_NTM = NULL; nonterminal *s_text_substitution_NTM = NULL; #line 356 "inform7/Chapter 16/Conditions and Phrases.w" nonterminal *s_unpacked_text_with_substitutions_NTM = NULL; -#line 631 "inform7/Chapter 19/Kinds.w" +#line 629 "inform7/Chapter 19/Kinds.w" nonterminal *notable_linguistic_kinds_NTM = NULL; #line 41 "inform7/Chapter 19/Describing Kinds.w" nonterminal *if_parsing_phrase_tokens_NTM = NULL; @@ -12699,21 +12743,21 @@ nonterminal *condition_problem_diagnosis_NTM = NULL; nonterminal *condition_problem_part_tail_NTM = NULL; #line 3472 "inform7/Chapter 20/Type Checking.w" nonterminal *condition_problem_part_NTM = NULL; -#line 230 "inform7/Chapter 21/Properties.w" +#line 227 "inform7/Chapter 21/Properties.w" nonterminal *notable_properties_NTM = NULL; -#line 271 "inform7/Chapter 21/Properties.w" +#line 268 "inform7/Chapter 21/Properties.w" nonterminal *property_name_construction_NTM = NULL; -#line 313 "inform7/Chapter 21/Properties.w" +#line 310 "inform7/Chapter 21/Properties.w" nonterminal *property_name_NTM = NULL; -#line 329 "inform7/Chapter 21/Properties.w" +#line 326 "inform7/Chapter 21/Properties.w" nonterminal *either_or_property_name_NTM = NULL; -#line 343 "inform7/Chapter 21/Properties.w" +#line 340 "inform7/Chapter 21/Properties.w" nonterminal *value_property_name_NTM = NULL; -#line 361 "inform7/Chapter 21/Properties.w" +#line 358 "inform7/Chapter 21/Properties.w" nonterminal *property_name_v_NTM = NULL; -#line 379 "inform7/Chapter 21/Properties.w" +#line 376 "inform7/Chapter 21/Properties.w" nonterminal *name_looking_like_property_test_NTM = NULL; -#line 386 "inform7/Chapter 21/Properties.w" +#line 383 "inform7/Chapter 21/Properties.w" nonterminal *ambiguous_property_name_NTM = NULL; #line 232 "inform7/Chapter 21/Measurement Adjectives.w" nonterminal *measurement_adjective_definition_NTM = NULL; @@ -12775,21 +12819,21 @@ nonterminal *equation_where_setting_NTM = NULL; nonterminal *equation_symbol_NTM = NULL; #line 641 "inform7/Chapter 26/Equations.w" nonterminal *valid_equation_symbol_NTM = NULL; -#line 160 "inform7/Chapter 27/Rulebooks.w" +#line 159 "inform7/Chapter 27/Rulebooks.w" nonterminal *new_rulebook_name_NTM = NULL; -#line 209 "inform7/Chapter 27/Rulebooks.w" +#line 208 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_name_construction_NTM = NULL; -#line 407 "inform7/Chapter 27/Rulebooks.w" +#line 406 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_variable_name_NTM = NULL; -#line 593 "inform7/Chapter 27/Rulebooks.w" +#line 592 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_stem_NTM = NULL; -#line 621 "inform7/Chapter 27/Rulebooks.w" +#line 620 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_stem_inner_NTM = NULL; -#line 626 "inform7/Chapter 27/Rulebooks.w" +#line 625 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_stem_inner_unarticled_NTM = NULL; -#line 633 "inform7/Chapter 27/Rulebooks.w" +#line 632 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_stem_name_NTM = NULL; -#line 863 "inform7/Chapter 27/Rulebooks.w" +#line 862 "inform7/Chapter 27/Rulebooks.w" nonterminal *rulebook_property_NTM = NULL; #line 110 "inform7/Chapter 27/Focus and Outcome.w" nonterminal *rulebook_default_outcome_NTM = NULL; @@ -12843,37 +12887,37 @@ nonterminal *activity_operand_NTM = NULL; nonterminal *activity_name_NTM = NULL; #line 578 "inform7/Chapter 27/Activities.w" nonterminal *if_parsing_al_conditions_NTM = NULL; -#line 307 "inform7/Chapter 28/Phrases.w" +#line 289 "inform7/Chapter 28/Phrases.w" nonterminal *inline_phrase_definition_NTM = NULL; -#line 137 "inform7/Chapter 28/Phrase Usage.w" +#line 136 "inform7/Chapter 28/Phrase Usage.w" nonterminal *rule_preamble_NTM = NULL; -#line 191 "inform7/Chapter 28/Phrase Usage.w" +#line 190 "inform7/Chapter 28/Phrase Usage.w" nonterminal *now_phrase_preamble_NTM = NULL; -#line 201 "inform7/Chapter 28/Phrase Usage.w" +#line 200 "inform7/Chapter 28/Phrase Usage.w" nonterminal *rule_preamble_fine_NTM = NULL; -#line 205 "inform7/Chapter 28/Phrase Usage.w" +#line 204 "inform7/Chapter 28/Phrase Usage.w" nonterminal *rule_preamble_finer_NTM = NULL; -#line 210 "inform7/Chapter 28/Phrase Usage.w" +#line 209 "inform7/Chapter 28/Phrase Usage.w" nonterminal *rulebook_stem_embellished_NTM = NULL; -#line 215 "inform7/Chapter 28/Phrase Usage.w" +#line 214 "inform7/Chapter 28/Phrase Usage.w" nonterminal *rulebook_bud_NTM = NULL; -#line 453 "inform7/Chapter 28/Phrase Usage.w" +#line 450 "inform7/Chapter 28/Phrase Usage.w" nonterminal *unrecognised_rule_stem_diagnosis_NTM = NULL; -#line 541 "inform7/Chapter 28/Phrase Usage.w" +#line 538 "inform7/Chapter 28/Phrase Usage.w" nonterminal *when_while_clause_NTM = NULL; -#line 947 "inform7/Chapter 28/Phrase Usage.w" +#line 944 "inform7/Chapter 28/Phrase Usage.w" nonterminal *parametric_problem_diagnosis_NTM = NULL; -#line 974 "inform7/Chapter 28/Phrase Usage.w" +#line 971 "inform7/Chapter 28/Phrase Usage.w" nonterminal *action_problem_diagnosis_NTM = NULL; -#line 1013 "inform7/Chapter 28/Phrase Usage.w" +#line 1010 "inform7/Chapter 28/Phrase Usage.w" nonterminal *action_when_diagnosis_NTM = NULL; -#line 1023 "inform7/Chapter 28/Phrase Usage.w" +#line 1020 "inform7/Chapter 28/Phrase Usage.w" nonterminal *anl_diagnosis_NTM = NULL; -#line 1027 "inform7/Chapter 28/Phrase Usage.w" +#line 1024 "inform7/Chapter 28/Phrase Usage.w" nonterminal *anl_inner_diagnosis_NTM = NULL; -#line 1031 "inform7/Chapter 28/Phrase Usage.w" +#line 1028 "inform7/Chapter 28/Phrase Usage.w" nonterminal *anl_tail_diagnosis_NTM = NULL; -#line 1035 "inform7/Chapter 28/Phrase Usage.w" +#line 1032 "inform7/Chapter 28/Phrase Usage.w" nonterminal *anl_entry_diagnosis_NTM = NULL; #line 433 "inform7/Chapter 28/Describing Phrase Type Data.w" nonterminal *phrase_preamble_NTM = NULL; @@ -12973,7 +13017,7 @@ nonterminal *release_sentence_object_NTM = NULL; nonterminal *privacy_indicator_NTM = NULL; #line 107 "inform7/Chapter 33/Release Instructions.w" nonterminal *exposed_innards_NTM = NULL; -#line 50 "inform7/Chapter 34/The Naming Thicket.w" +#line 49 "inform7/Chapter 34/The Naming Thicket.w" nonterminal *notable_naming_properties_NTM = NULL; #line 237 "inform7/Chapter 34/Spatial Model.w" nonterminal *notable_spatial_kinds_NTM = NULL; @@ -12999,13 +13043,13 @@ nonterminal *notable_backdrops_noun_phrases_NTM = NULL; nonterminal *notable_regions_kinds_NTM = NULL; #line 139 "inform7/Chapter 34/Regions.w" nonterminal *notable_regions_properties_NTM = NULL; -#line 171 "inform7/Chapter 34/The Map.w" +#line 167 "inform7/Chapter 34/The Map.w" nonterminal *notable_map_kinds_NTM = NULL; -#line 261 "inform7/Chapter 34/The Map.w" +#line 257 "inform7/Chapter 34/The Map.w" nonterminal *notable_map_directions_NTM = NULL; -#line 432 "inform7/Chapter 34/The Map.w" +#line 428 "inform7/Chapter 34/The Map.w" nonterminal *notable_map_properties_NTM = NULL; -#line 513 "inform7/Chapter 34/The Map.w" +#line 509 "inform7/Chapter 34/The Map.w" nonterminal *notable_map_noun_phrases_NTM = NULL; #line 91 "inform7/Chapter 34/Map Connection Relations.w" nonterminal *mapping_relation_construction_NTM = NULL; @@ -13037,77 +13081,77 @@ nonterminal *map_setting_boolean_NTM = NULL; nonterminal *map_offset_NTM = NULL; #line 466 "inform7/Chapter 34/EPS Map.w" nonterminal *map_rubric_NTM = NULL; -#line 121 "inform7/Chapter 34/Scenes.w" +#line 119 "inform7/Chapter 34/Scenes.w" nonterminal *notable_scene_properties_NTM = NULL; -#line 179 "inform7/Chapter 34/Scenes.w" +#line 177 "inform7/Chapter 34/Scenes.w" nonterminal *notable_scenes_NTM = NULL; -#line 342 "inform7/Chapter 34/Scenes.w" +#line 340 "inform7/Chapter 34/Scenes.w" nonterminal *scene_ends_sentence_subject_NTM = NULL; -#line 359 "inform7/Chapter 34/Scenes.w" +#line 357 "inform7/Chapter 34/Scenes.w" nonterminal *scene_ends_sentence_adverb_NTM = NULL; -#line 367 "inform7/Chapter 34/Scenes.w" +#line 365 "inform7/Chapter 34/Scenes.w" nonterminal *scene_ends_sentence_object_NTM = NULL; -#line 411 "inform7/Chapter 34/Scenes.w" +#line 409 "inform7/Chapter 34/Scenes.w" nonterminal *scene_name_NTM = NULL; -#line 415 "inform7/Chapter 34/Scenes.w" +#line 413 "inform7/Chapter 34/Scenes.w" nonterminal *scene_name_unarticled_NTM = NULL; -#line 431 "inform7/Chapter 34/Scenes.w" +#line 429 "inform7/Chapter 34/Scenes.w" nonterminal *scene_end_name_NTM = NULL; -#line 437 "inform7/Chapter 34/Scenes.w" +#line 435 "inform7/Chapter 34/Scenes.w" nonterminal *scene_end_name_creating_NTM = NULL; -#line 864 "inform7/Chapter 34/Scenes.w" +#line 862 "inform7/Chapter 34/Scenes.w" nonterminal *spec_scene_description_NTM = NULL; -#line 245 "inform7/Chapter 35/Actions.w" +#line 244 "inform7/Chapter 35/Actions.w" nonterminal *notable_actions_NTM = NULL; -#line 252 "inform7/Chapter 35/Actions.w" +#line 251 "inform7/Chapter 35/Actions.w" nonterminal *action_name_construction_NTM = NULL; -#line 353 "inform7/Chapter 35/Actions.w" +#line 352 "inform7/Chapter 35/Actions.w" nonterminal *action_pronoun_NTM = NULL; -#line 380 "inform7/Chapter 35/Actions.w" +#line 379 "inform7/Chapter 35/Actions.w" nonterminal *action_name_NTM = NULL; -#line 408 "inform7/Chapter 35/Actions.w" +#line 407 "inform7/Chapter 35/Actions.w" nonterminal *action_optional_trailing_prepositions_NTM = NULL; -#line 520 "inform7/Chapter 35/Actions.w" +#line 519 "inform7/Chapter 35/Actions.w" nonterminal *action_variable_NTM = NULL; -#line 528 "inform7/Chapter 35/Actions.w" +#line 527 "inform7/Chapter 35/Actions.w" nonterminal *action_variable_name_NTM = NULL; -#line 730 "inform7/Chapter 35/Actions.w" +#line 729 "inform7/Chapter 35/Actions.w" nonterminal *action_sentence_subject_NTM = NULL; -#line 758 "inform7/Chapter 35/Actions.w" +#line 757 "inform7/Chapter 35/Actions.w" nonterminal *action_clause_NTM = NULL; -#line 765 "inform7/Chapter 35/Actions.w" +#line 764 "inform7/Chapter 35/Actions.w" nonterminal *action_applications_NTM = NULL; -#line 776 "inform7/Chapter 35/Actions.w" +#line 775 "inform7/Chapter 35/Actions.w" nonterminal *act_req_NTM = NULL; -#line 780 "inform7/Chapter 35/Actions.w" +#line 779 "inform7/Chapter 35/Actions.w" nonterminal *action_access_NTM = NULL; -#line 788 "inform7/Chapter 35/Actions.w" +#line 787 "inform7/Chapter 35/Actions.w" nonterminal *action_sentence_object_NTM = NULL; -#line 792 "inform7/Chapter 35/Actions.w" +#line 791 "inform7/Chapter 35/Actions.w" nonterminal *action_clauses_NTM = NULL; -#line 797 "inform7/Chapter 35/Actions.w" +#line 796 "inform7/Chapter 35/Actions.w" nonterminal *action_clause_terminated_NTM = NULL; -#line 113 "inform7/Chapter 35/Action Name Lists.w" +#line 112 "inform7/Chapter 35/Action Name Lists.w" nonterminal *action_list_NTM = NULL; -#line 121 "inform7/Chapter 35/Action Name Lists.w" +#line 120 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_excluded_NTM = NULL; -#line 125 "inform7/Chapter 35/Action Name Lists.w" +#line 124 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_minimal_common_operand_NTM = NULL; -#line 150 "inform7/Chapter 35/Action Name Lists.w" +#line 149 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_to_tail_NTM = NULL; -#line 154 "inform7/Chapter 35/Action Name Lists.w" +#line 153 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_operand_NTM = NULL; -#line 157 "inform7/Chapter 35/Action Name Lists.w" +#line 156 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_in_tail_NTM = NULL; -#line 189 "inform7/Chapter 35/Action Name Lists.w" +#line 188 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_NTM = NULL; -#line 193 "inform7/Chapter 35/Action Name Lists.w" +#line 192 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_tail_NTM = NULL; -#line 208 "inform7/Chapter 35/Action Name Lists.w" +#line 207 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_entry_NTM = NULL; -#line 213 "inform7/Chapter 35/Action Name Lists.w" +#line 212 "inform7/Chapter 35/Action Name Lists.w" nonterminal *named_action_pattern_NTM = NULL; -#line 221 "inform7/Chapter 35/Action Name Lists.w" +#line 220 "inform7/Chapter 35/Action Name Lists.w" nonterminal *anl_entry_with_action_NTM = NULL; #line 587 "inform7/Chapter 35/Action Patterns.w" nonterminal *action_pattern_NTM = NULL; @@ -13183,7 +13227,7 @@ nonterminal *understand_property_sentence_object_NTM = NULL; nonterminal *understand_property_sentence_object_unconditional_NTM = NULL; #line 416 "inform7/Chapter 36/Traverse for Grammar.w" nonterminal *understand_property_reference_NTM = NULL; -#line 97 "inform7/Chapter 36/Grammar Properties.w" +#line 95 "inform7/Chapter 36/Grammar Properties.w" nonterminal *notable_parsing_variables_NTM = NULL; #line 187 "inform7/Chapter 36/Grammar Lines.w" nonterminal *understand_condition_NTM = NULL; @@ -13318,29 +13362,31 @@ kind * kind_understood_NTMV = NULL; grammar_verb * grammar_verb_named_NTMV = NULL; int ownership_NTMV = 0; void register_tangled_nonterminals(void); -#line 21 "inform7/Chapter 1/Basic Definitions.w" +#line 18 "inform7/Chapter 1/Basic Definitions.w" -#line 48 "inform7/Chapter 1/Basic Definitions.w" +#line 45 "inform7/Chapter 1/Basic Definitions.w" int this_is_a_release_compile = FALSE; /* Omit sections of source text marked not for release */ int existing_story_file = FALSE; /* Ignore source text to blorb existing story file? */ -int fix_rng_at_start_of_play = FALSE; /* Compile I6 code which seeds the RNG */ int rng_seed_at_start_of_play = 0; /* The seed value, or 0 if not seeded */ int census_mode = FALSE; /* NI running only to update extension documentation */ -char *story_filename_extension = NULL; /* What story file we will eventually have */ +char *story_filename_extension = "ulx"; /* What story file we will eventually have */ int show_progress_indicator = TRUE; /* Produce percentage of progress messages */ int default_scoring_setting = FALSE; /* By default, whether a score is kept at run time */ int scoring_option_set = NOT_APPLICABLE; /* Whether in this case a score is kept at run time */ -#line 62 "inform7/Chapter 1/Basic Definitions.w" +#line 59 "inform7/Chapter 1/Basic Definitions.w" +struct tm *the_present = NULL; + +#line 65 "inform7/Chapter 1/Basic Definitions.w" int no_deprecated_features = FALSE; /* forbid syntaxes marked as deprecated? */ -#line 76 "inform7/Chapter 1/Basic Definitions.w" +#line 79 "inform7/Chapter 1/Basic Definitions.w" int text_loaded_from_source = FALSE; /* Lexical scanning is done */ int model_world_under_construction = FALSE; /* World model is being constructed */ int model_world_constructed = FALSE; /* World model is now constructed */ int indexing_stage = FALSE; /* Everything is done except indexing */ -#line 199 "inform7/Chapter 1/Basic Definitions.w" +#line 202 "inform7/Chapter 1/Basic Definitions.w" STREAM debug_log_file_struct; /* The actual debugging log file */ STREAM inform6_file_struct; /* The actual I6 code file */ STREAM problems_file_struct; /* The actual report of Problems file */ @@ -13363,23 +13409,25 @@ int it_is_not_worth_adding = FALSE; /* To suppress the "It may be worth adding.. int trace_sentences = FALSE; /* Currently debugging text to trace rather than log */ int logging_to_I6_text = FALSE; /* Used for internal test cases */ -#line 228 "inform7/Chapter 1/Basic Definitions.w" +#line 230 "inform7/Chapter 1/Basic Definitions.w" int abort_I6T_interpreter = FALSE; #line 21 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifndef PLATFORM_MACOSX #ifndef PLATFORM_WINDOWS #ifndef PLATFORM_UNIX +#ifndef PLATFORM_ANDROID #define PLATFORM_MACOSX /* the original home for NI, and still the default */ #endif #endif #endif +#endif #ifndef CPU_WORDSIZE_MULTIPLIER #define CPU_WORDSIZE_MULTIPLIER 1 /* the CPU word size is by default 32 bits */ #endif -#line 79 "inform7/Chapter 2/Memory.w" +#line 77 "inform7/Chapter 2/Memory.w" #line 18 "inform7/Chapter 2/Single Integers.w" @@ -13472,18 +13520,67 @@ debugging_aspect the_debugging_aspects[] = { { "", "", "", FALSE, FALSE } }; -#line 34 "inform7/Chapter 3/Filenames.w" -char filename_of_telemetry[MAX_FILENAME_LENGTH]; -char filename_of_options[MAX_FILENAME_LENGTH]; -char filename_of_epsfile[MAX_FILENAME_LENGTH]; -char pathname_of_extensions[MAX_FILENAME_LENGTH]; -char pathname_of_languages[MAX_FILENAME_LENGTH]; -char pathname_of_templates[MAX_FILENAME_LENGTH]; -char pathname_of_extension_docs[MAX_FILENAME_LENGTH]; -char pathname_of_bundle[MAX_FILENAME_LENGTH]; -char pathname_of_built_in_extensions[MAX_FILENAME_LENGTH]; -char materials_folder[MAX_FILENAME_LENGTH]; -char pathname_of_materials_extensions[MAX_FILENAME_LENGTH]; +#line 50 "inform7/Chapter 3/Pathnames.w" + +#line 55 "inform7/Chapter 3/Pathnames.w" +pathname *home_path = NULL; + +#line 23 "inform7/Chapter 3/Filenames.w" + +#line 19 "inform7/Chapter 3/Where Everything Lives.w" +char *AREA_NAME[3] = { "built in", "installed", "from .materials" }; + +#line 24 "inform7/Chapter 3/Where Everything Lives.w" +pathname *pathname_of_area[NO_FS_AREAS] = { NULL, NULL, NULL }; +pathname *pathname_of_extensions[NO_FS_AREAS] = { NULL, NULL, NULL }; +pathname *pathname_of_i6t_files[NO_FS_AREAS] = { NULL, NULL, NULL }; +pathname *pathname_of_languages[NO_FS_AREAS] = { NULL, NULL, NULL }; +pathname *pathname_of_website_templates[NO_FS_AREAS] = { NULL, NULL, NULL }; + +pathname *pathname_of_extension_docs = NULL; +pathname *pathname_of_extension_docs_inner = NULL; +pathname *pathname_of_materials_figures = NULL; +pathname *pathname_of_materials_release = NULL; +pathname *pathname_of_materials_sounds = NULL; +pathname *pathname_of_project = NULL; +pathname *pathname_of_project_index_details_folder = NULL; +pathname *pathname_of_project_index_folder = NULL; +pathname *pathname_of_released_figures = NULL; +pathname *pathname_of_released_interpreter = NULL; +pathname *pathname_of_released_sounds = NULL; +pathname *pathname_of_transient_census_data = NULL; +pathname *pathname_of_transient_external_resources = NULL; + +#line 47 "inform7/Chapter 3/Where Everything Lives.w" +filename *filename_of_blurb = NULL; +filename *filename_of_cblorb_report = NULL; +filename *filename_of_cblorb_report_model = NULL; +filename *filename_of_compiled_i6_code = NULL; +filename *filename_of_debugging_log = NULL; +filename *filename_of_documentation_snippets = NULL; +filename *filename_of_epsfile = NULL; +filename *filename_of_existing_story_file = NULL; +filename *filename_of_extension_file_documentation_model = NULL; +filename *filename_of_extensions_census_errors = NULL; +filename *filename_of_extensions_dictionary = NULL; +filename *filename_of_extensions_documentation_model = NULL; +filename *filename_of_headings = NULL; +filename *filename_of_i7_source = NULL; +filename *filename_of_ifiction_record = NULL; +filename *filename_of_intro_booklet = NULL; +filename *filename_of_intro_postcard = NULL; +filename *filename_of_large_cover_art_jpeg = NULL; +filename *filename_of_large_cover_art_png = NULL; +filename *filename_of_large_default_cover_art = NULL; +filename *filename_of_manifest = NULL; +filename *filename_of_options = NULL; +filename *filename_of_report = NULL; +filename *filename_of_small_cover_art_jpeg = NULL; +filename *filename_of_small_cover_art_png = NULL; +filename *filename_of_small_default_cover_art = NULL; +filename *filename_of_story_file = NULL; +filename *filename_of_telemetry = NULL; +filename *filename_of_uuid = NULL; #line 32 "inform7/Chapter 5/Index File Services.w" @@ -13496,7 +13593,7 @@ char pathname_of_materials_extensions[MAX_FILENAME_LENGTH]; lexicon_entry *sorted_lexicon = NULL; /* head of list in lexicographic order */ lexicon_entry *current_main_verb = NULL; /* when parsing verb declarations */ -#line 55 "inform7/Chapter 7/Vocabulary.w" +#line 52 "inform7/Chapter 7/Vocabulary.w" #line 32 "inform7/Chapter 7/Tries and Inflections.w" @@ -13519,25 +13616,25 @@ natural_language *English_language = NULL; /* until created, early in run */ natural_language *language_of_play = NULL; /* the language read and typed by the player */ natural_language *language_of_source_text = NULL; /* the language written by the author */ -#line 88 "inform7/Chapter 7/Preform.w" +#line 84 "inform7/Chapter 7/Preform.w" int language_definition_top = -1; -#line 94 "inform7/Chapter 7/Preform.w" +#line 90 "inform7/Chapter 7/Preform.w" natural_language *language_being_read_by_Preform = NULL; -#line 185 "inform7/Chapter 7/Preform.w" +#line 181 "inform7/Chapter 7/Preform.w" -#line 198 "inform7/Chapter 7/Preform.w" +#line 194 "inform7/Chapter 7/Preform.w" -#line 260 "inform7/Chapter 7/Preform.w" +#line 256 "inform7/Chapter 7/Preform.w" -#line 320 "inform7/Chapter 7/Preform.w" +#line 316 "inform7/Chapter 7/Preform.w" -#line 325 "inform7/Chapter 7/Preform.w" +#line 321 "inform7/Chapter 7/Preform.w" int most_recent_result = 0; /* this is the variable which |inweb| writes |most_recent_result| */ void *most_recent_result_p = NULL; /* this is the variable which |inweb| writes |most_recent_result_p| */ -#line 334 "inform7/Chapter 7/Preform.w" +#line 330 "inform7/Chapter 7/Preform.w" vocabulary_entry *CAPITAL_K_V; vocabulary_entry *CAPITAL_L_V; vocabulary_entry *CLOSEBRACE_V; @@ -13554,15 +13651,15 @@ vocabulary_entry *PARBREAK_V; vocabulary_entry *SEMICOLON_V; vocabulary_entry *STROKE_V; -#line 368 "inform7/Chapter 7/Preform.w" +#line 364 "inform7/Chapter 7/Preform.w" int no_req_bits = 0; -#line 60 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 58 "inform7/Chapter 7/Non-Parsing Preform.w" -#line 66 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 64 "inform7/Chapter 7/Non-Parsing Preform.w" -#line 70 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 68 "inform7/Chapter 7/Non-Parsing Preform.w" verb_conjugation *to_be_conjugation = NULL; #line 62 "inform7/Chapter 8/Determiners and Quantifiers.w" @@ -13599,9 +13696,9 @@ quantifier #line 37 "inform7/Chapter 10/Times of Day.w" kind *K_time = NULL; -#line 76 "inform7/Chapter 10/Excerpt Meanings.w" +#line 74 "inform7/Chapter 10/Excerpt Meanings.w" -#line 81 "inform7/Chapter 10/Excerpt Meanings.w" +#line 79 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning *meaning_of_player = NULL; #line 53 "inform7/Chapter 10/Nametags.w" @@ -13626,9 +13723,9 @@ nonlocal_variable *i6_nothing_VAR = NULL; /* the I6 |nothing| constant */ #line 52 "inform7/Chapter 10/Nonlocal Variables.w" nonlocal_variable *latest_nonlocal_variable = NULL; -#line 145 "inform7/Chapter 11/Binary Predicates.w" +#line 139 "inform7/Chapter 11/Binary Predicates.w" -#line 249 "inform7/Chapter 11/Binary Predicates.w" +#line 243 "inform7/Chapter 11/Binary Predicates.w" #line 30 "inform7/Chapter 11/Relations.w" @@ -13644,20 +13741,20 @@ verb_usage *negated_plural_to_be = NULL; /* "are not" */ #line 36 "inform7/Chapter 11/Prepositions.w" -#line 51 "inform7/Chapter 12/Lexer.w" +#line 45 "inform7/Chapter 12/Lexer.w" source_location lexer_position; -#line 77 "inform7/Chapter 12/Lexer.w" +#line 71 "inform7/Chapter 12/Lexer.w" int lexer_wordcount; /* Number of words read in to arrays */ -#line 212 "inform7/Chapter 12/Lexer.w" +#line 206 "inform7/Chapter 12/Lexer.w" lexer_details *lw_array = NULL; /* a dynamically allocated (and mobile) array */ int lexer_details_memory_allocated = 0; /* bytes allocated to this array */ int lexer_workspace_allocated = 0; /* bytes allocated to text storage */ -#line 49 "inform7/Chapter 12/Read Source Text.w" +#line 48 "inform7/Chapter 12/Read Source Text.w" source_file *primary_source_file = NULL; /* first to be opened */ @@ -13686,9 +13783,9 @@ parse_node *tree_root = NULL; parse_node *current_sentence = NULL; int near_start_of_extension = 0; -#line 87 "inform7/Chapter 13/Verify Parse Tree.w" +#line 85 "inform7/Chapter 13/Verify Parse Tree.w" -#line 93 "inform7/Chapter 13/Verify Parse Tree.w" +#line 91 "inform7/Chapter 13/Verify Parse Tree.w" parse_tree_node_type parse_tree_node_types[]; #line 17 "inform7/Chapter 13/Sentences.w" @@ -13719,15 +13816,15 @@ control_structure_phrase *case_CSP = NULL, *lambda_CSP = NULL; -#line 181 "inform7/Chapter 14/Extension Files.w" +#line 178 "inform7/Chapter 14/Extension Files.w" extension_file *standard_rules_extension; /* the Standard Rules by Graham Nelson */ -#line 34 "inform7/Chapter 14/Extension Identifiers.w" +#line 30 "inform7/Chapter 14/Extension Identifiers.w" -#line 58 "inform7/Chapter 14/Extension Identifiers.w" +#line 54 "inform7/Chapter 14/Extension Identifiers.w" -#line 35 "inform7/Chapter 14/Extension Census.w" +#line 34 "inform7/Chapter 14/Extension Census.w" #line 38 "inform7/Chapter 14/Extension Dictionary.w" @@ -13750,11 +13847,11 @@ sentence_handler *how_to_handle_sentences[MAX_OF_NTS_AND_VBS]; /* for |SENTENCE_ #line 70 "inform7/Chapter 15/Assemblies.w" -#line 30 "inform7/Chapter 15/Implications.w" +#line 29 "inform7/Chapter 15/Implications.w" -#line 38 "inform7/Chapter 15/Implications.w" +#line 37 "inform7/Chapter 15/Implications.w" -#line 136 "inform7/Chapter 16/Meaning Lists.w" +#line 132 "inform7/Chapter 16/Meaning Lists.w" int no_permanent_MLs = 0, no_ephemeral_MLs = 0, GAP_movements = 0; @@ -13771,15 +13868,15 @@ vocabulary_entry *word_to_suppress_in_phrases = NULL; int last_parsed_phrase_was_if = FALSE; int last_parsed_phrase_opened_a_block = FALSE; -#line 64 "inform7/Chapter 17/Terms.w" +#line 45 "inform7/Chapter 17/Terms.w" -#line 86 "inform7/Chapter 17/Terms.w" +#line 67 "inform7/Chapter 17/Terms.w" -#line 46 "inform7/Chapter 17/Atomic Propositions.w" +#line 36 "inform7/Chapter 17/Atomic Propositions.w" -#line 34 "inform7/Chapter 17/Type Check Propositions.w" +#line 30 "inform7/Chapter 17/Type Check Propositions.w" -#line 45 "inform7/Chapter 17/Type Check Propositions.w" +#line 41 "inform7/Chapter 17/Type Check Propositions.w" #line 11 "inform7/Chapter 18/The Equality Relation.w" binary_predicate *R_equality = NULL; @@ -13795,36 +13892,36 @@ int ptim_recursion_depth = 0; /* depth of recursion of |Calculus__Propositions__ #line 66 "inform7/Chapter 18/I6 Schemas.w" -#line 34 "inform7/Chapter 18/Compile Atoms.w" +#line 29 "inform7/Chapter 18/Compile Atoms.w" -#line 53 "inform7/Chapter 18/Compile Atoms.w" +#line 48 "inform7/Chapter 18/Compile Atoms.w" int suppress_C14CantChangeKind = FALSE; int suppress_C14ActionVarsPastTense = FALSE; -#line 44 "inform7/Chapter 18/Deciding to Defer.w" +#line 42 "inform7/Chapter 18/Deciding to Defer.w" -#line 141 "inform7/Chapter 19/Kinds.w" +#line 139 "inform7/Chapter 19/Kinds.w" kind *K_value = NULL; kind *K_word_value = NULL; kind *K_pointer_value = NULL; -#line 153 "inform7/Chapter 19/Kinds.w" +#line 151 "inform7/Chapter 19/Kinds.w" kind *K_arithmetic_value = NULL; kind *K_real_arithmetic_value = NULL; /* those using real, not integer, arithmetic */ kind *K_enumerated_value = NULL; -#line 179 "inform7/Chapter 19/Kinds.w" +#line 177 "inform7/Chapter 19/Kinds.w" kind *K_nil = NULL; kind_constructor *CON_NIL = NULL; kind_constructor *CON_TUPLE_ENTRY = NULL; -#line 191 "inform7/Chapter 19/Kinds.w" +#line 189 "inform7/Chapter 19/Kinds.w" kind_constructor *CON_INTERMEDIATE = NULL; -#line 202 "inform7/Chapter 19/Kinds.w" +#line 200 "inform7/Chapter 19/Kinds.w" kind_constructor *CON_KIND_VARIABLE = NULL; -#line 208 "inform7/Chapter 19/Kinds.w" +#line 206 "inform7/Chapter 19/Kinds.w" kind *K_equation = NULL; kind *K_grammatical_gender = NULL; kind *K_natural_language = NULL; @@ -13840,11 +13937,11 @@ kind *K_unicode_character = NULL; kind *K_use_option = NULL; kind *K_verb = NULL; -#line 239 "inform7/Chapter 19/Kinds.w" +#line 237 "inform7/Chapter 19/Kinds.w" kind *K_rulebook_outcome = NULL; kind *K_understanding = NULL; -#line 245 "inform7/Chapter 19/Kinds.w" +#line 243 "inform7/Chapter 19/Kinds.w" kind_constructor *CON_list_of = NULL; kind_constructor *CON_description = NULL; kind_constructor *CON_relation = NULL; @@ -13856,36 +13953,36 @@ kind_constructor *CON_property = NULL; kind_constructor *CON_table_column = NULL; kind_constructor *CON_combination = NULL; -#line 265 "inform7/Chapter 19/Kinds.w" +#line 263 "inform7/Chapter 19/Kinds.w" -#line 269 "inform7/Chapter 19/Kinds.w" +#line 267 "inform7/Chapter 19/Kinds.w" int no_base_kinds_created = 0; int no_intermediate_kinds_created = 0; int no_constructed_kinds_created = 0; -#line 72 "inform7/Chapter 19/Kind Checking.w" +#line 68 "inform7/Chapter 19/Kind Checking.w" kind *values_of_kind_variables[MAX_KIND_VARIABLES]; -#line 94 "inform7/Chapter 19/Kind Checking.w" +#line 90 "inform7/Chapter 19/Kind Checking.w" int kind_checker_mode = MATCH_KIND_VARIABLES_AS_SYMBOLS; -#line 110 "inform7/Chapter 19/Kind Checking.w" +#line 106 "inform7/Chapter 19/Kind Checking.w" -#line 112 "inform7/Chapter 19/Kind Constructors.w" +#line 110 "inform7/Chapter 19/Kind Constructors.w" -#line 125 "inform7/Chapter 19/Kind Constructors.w" +#line 123 "inform7/Chapter 19/Kind Constructors.w" int next_free_data_type_ID = 2; /* i.e., leaving room for |UNKNOWN_TY| to be 1 at run-time */ kind *latest_base_kind_of_value = NULL; -#line 80 "inform7/Chapter 19/Kind Interpreter.w" +#line 77 "inform7/Chapter 19/Kind Interpreter.w" -#line 97 "inform7/Chapter 19/Kind Interpreter.w" +#line 94 "inform7/Chapter 19/Kind Interpreter.w" -#line 108 "inform7/Chapter 19/Kind Interpreter.w" +#line 105 "inform7/Chapter 19/Kind Interpreter.w" -#line 118 "inform7/Chapter 19/Kind Interpreter.w" +#line 115 "inform7/Chapter 19/Kind Interpreter.w" -#line 122 "inform7/Chapter 19/Kind Interpreter.w" +#line 119 "inform7/Chapter 19/Kind Interpreter.w" kind_command_definition table_of_kind_commands[] = { { "can-coincide-with-property", can_coincide_with_property_KCC, BOOLEAN_KCA }, { "can-exchange", can_exchange_KCC, BOOLEAN_KCA }, @@ -13937,13 +14034,13 @@ kind_command_definition table_of_kind_commands[] = { { NULL, -1, NO_KCA } }; -#line 181 "inform7/Chapter 19/Kind Interpreter.w" +#line 178 "inform7/Chapter 19/Kind Interpreter.w" -#line 190 "inform7/Chapter 19/Kind Interpreter.w" +#line 187 "inform7/Chapter 19/Kind Interpreter.w" -#line 197 "inform7/Chapter 19/Kind Interpreter.w" +#line 194 "inform7/Chapter 19/Kind Interpreter.w" -#line 208 "inform7/Chapter 19/Kind Interpreter.w" +#line 205 "inform7/Chapter 19/Kind Interpreter.w" #line 14 "inform7/Chapter 19/Describing Kinds.w" int kind_parsing_mode = NORMAL_KIND_PARSING; @@ -13975,9 +14072,9 @@ int compilation_mode = DEREFERENCE_POINTERS_CMODE + IMPLY_NEWLINES_IN_SAY_CMODE; #line 24 "inform7/Chapter 20/VALUE Specifications.w" -#line 76 "inform7/Chapter 21/Properties.w" +#line 73 "inform7/Chapter 21/Properties.w" -#line 81 "inform7/Chapter 21/Properties.w" +#line 78 "inform7/Chapter 21/Properties.w" property *P_specification = NULL; /* a pseudo-property for indexing kinds */ property *P_variable_initial_value = NULL; /* a pseudo-property for initialising variables */ property *P_indefinite_appearance_text = NULL; @@ -14071,13 +14168,13 @@ int adopted_marker_for_compilation = -1; /* when a new response is being compile #line 32 "inform7/Chapter 27/Rule Bookings.w" -#line 73 "inform7/Chapter 27/Rulebooks.w" +#line 72 "inform7/Chapter 27/Rulebooks.w" -#line 87 "inform7/Chapter 27/Rulebooks.w" +#line 86 "inform7/Chapter 27/Rulebooks.w" -#line 99 "inform7/Chapter 27/Rulebooks.w" +#line 98 "inform7/Chapter 27/Rulebooks.w" -#line 107 "inform7/Chapter 27/Rulebooks.w" +#line 106 "inform7/Chapter 27/Rulebooks.w" rulebook *built_in_rulebooks[MAX_BUILT_IN_RULEBOOKS]; struct stacked_variable_owner_list *all_action_processing_vars = NULL; @@ -14092,25 +14189,25 @@ struct stacked_variable_owner_list *all_action_processing_vars = NULL; #line 48 "inform7/Chapter 27/Stacked Variables.w" int max_frame_size_needed = 0; -#line 90 "inform7/Chapter 28/Phrases.w" +#line 72 "inform7/Chapter 28/Phrases.w" -#line 94 "inform7/Chapter 28/Phrases.w" +#line 76 "inform7/Chapter 28/Phrases.w" struct phrase *first_in_logical_order = NULL; -#line 39 "inform7/Chapter 28/Phrase Usage.w" +#line 38 "inform7/Chapter 28/Phrase Usage.w" -#line 43 "inform7/Chapter 28/Phrase Usage.w" +#line 42 "inform7/Chapter 28/Phrase Usage.w" rulebook_match parsed_rm; -#line 40 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 39 "inform7/Chapter 28/Phrase Runtime Context Data.w" -#line 64 "inform7/Chapter 28/Phrase Type Data.w" +#line 60 "inform7/Chapter 28/Phrase Type Data.w" -#line 75 "inform7/Chapter 28/Phrase Type Data.w" +#line 71 "inform7/Chapter 28/Phrase Type Data.w" -#line 110 "inform7/Chapter 28/Phrase Type Data.w" +#line 106 "inform7/Chapter 28/Phrase Type Data.w" -#line 147 "inform7/Chapter 28/Phrase Type Data.w" +#line 143 "inform7/Chapter 28/Phrase Type Data.w" #line 33 "inform7/Chapter 28/Phrase Options.w" @@ -14128,9 +14225,9 @@ rulebook_match parsed_rm; #line 69 "inform7/Chapter 30/Local Variables.w" -#line 35 "inform7/Chapter 30/Phrase Blocks.w" +#line 34 "inform7/Chapter 30/Phrase Blocks.w" -#line 44 "inform7/Chapter 30/Phrase Blocks.w" +#line 43 "inform7/Chapter 30/Phrase Blocks.w" #line 34 "inform7/Chapter 30/Stack Frames.w" @@ -14142,15 +14239,15 @@ rulebook_match parsed_rm; #line 33 "inform7/Chapter 30/Chronology.w" -#line 75 "inform7/Chapter 31/Invocations.w" +#line 69 "inform7/Chapter 31/Invocations.w" -#line 80 "inform7/Chapter 31/Invocations.w" +#line 74 "inform7/Chapter 31/Invocations.w" -#line 101 "inform7/Chapter 31/Invocations.w" +#line 95 "inform7/Chapter 31/Invocations.w" -#line 134 "inform7/Chapter 31/Invocations.w" +#line 128 "inform7/Chapter 31/Invocations.w" -#line 153 "inform7/Chapter 31/Invocations.w" +#line 147 "inform7/Chapter 31/Invocations.w" #line 28 "inform7/Chapter 31/Compile Invocations.w" @@ -14222,9 +14319,8 @@ property *P_printed_name = NULL; property *P_printed_plural_name = NULL; property *P_cap_short_name = NULL; property *P_adaptive_text_viewpoint = NULL; -property *P_list_together = NULL; /* I6 only: workspace for listing groups */ -#line 30 "inform7/Chapter 34/The Naming Thicket.w" +#line 29 "inform7/Chapter 34/The Naming Thicket.w" STREAM SNAMES_struct; STREAM *SNAMES = NULL; int sn_r_counter = 0; @@ -14306,15 +14402,15 @@ property *P_regional_found_in = NULL; /* an I6-only property used for implementa #line 37 "inform7/Chapter 34/Regions.w" -#line 58 "inform7/Chapter 34/The Map.w" +#line 54 "inform7/Chapter 34/The Map.w" -#line 66 "inform7/Chapter 34/The Map.w" +#line 62 "inform7/Chapter 34/The Map.w" kind *K_direction = NULL; kind *K_door = NULL; instance *I_up = NULL; instance *I_down = NULL; -#line 78 "inform7/Chapter 34/The Map.w" +#line 74 "inform7/Chapter 34/The Map.w" property *P_door_dir = NULL; /* I6 only */ property *P_door_to = NULL; /* I6 only */ property *P_other_side = NULL; /* a value property for the other side of a door */ @@ -14325,9 +14421,9 @@ property *P_found_in = NULL; /* I6 only: needed for multiply-present objects */ #line 17 "inform7/Chapter 34/Map Connection Relations.w" binary_predicate *R_adjacency = NULL; -#line 25 "inform7/Chapter 34/Spatial Geometry.w" +#line 19 "inform7/Chapter 34/Spatial Geometry.w" -#line 31 "inform7/Chapter 34/Spatial Geometry.w" +#line 25 "inform7/Chapter 34/Spatial Geometry.w" vector Zero_vector = {0, 0, 0}; vector N_vector = {0, 1, 0}; @@ -14341,7 +14437,7 @@ vector W_vector = {-1, 0, 0}; vector U_vector = {0, 0, 1}; vector D_vector = {0, 0, -1}; -#line 55 "inform7/Chapter 34/Spatial Geometry.w" +#line 49 "inform7/Chapter 34/Spatial Geometry.w" #line 83 "inform7/Chapter 34/Spatial Map.w" @@ -14425,27 +14521,27 @@ vector OUT_vector_EPS = {-3, -2, 0}; int index_map_with_pass = 0; parse_node *index_map_with_p = NULL; -#line 36 "inform7/Chapter 34/Scenes.w" +#line 34 "inform7/Chapter 34/Scenes.w" -#line 53 "inform7/Chapter 34/Scenes.w" +#line 51 "inform7/Chapter 34/Scenes.w" -#line 57 "inform7/Chapter 34/Scenes.w" +#line 55 "inform7/Chapter 34/Scenes.w" property *P_recurring = NULL; -#line 62 "inform7/Chapter 34/Scenes.w" +#line 60 "inform7/Chapter 34/Scenes.w" scene *SC_entire_game = NULL; -#line 68 "inform7/Chapter 34/Scenes.w" +#line 66 "inform7/Chapter 34/Scenes.w" kind *K_scene = NULL; -#line 70 "inform7/Chapter 35/Actions.w" +#line 69 "inform7/Chapter 35/Actions.w" stacked_variable_owner_list *all_nonempty_stacked_action_vars = NULL; -#line 76 "inform7/Chapter 35/Actions.w" +#line 75 "inform7/Chapter 35/Actions.w" action_name *going_action = NULL; -#line 98 "inform7/Chapter 35/Actions.w" +#line 97 "inform7/Chapter 35/Actions.w" kind *K_action_name = NULL; kind *K_description_of_action = NULL; kind *K_stored_action = NULL; @@ -14468,7 +14564,7 @@ command_index_entry *sorted_command_index = NULL; /* in alphabetical order of |t #line 44 "inform7/Chapter 36/Traverse for Grammar.w" -#line 17 "inform7/Chapter 36/Grammar Properties.w" +#line 15 "inform7/Chapter 36/Grammar Properties.w" property *P_name = NULL; property *P_parse_name = NULL; property *P_action_bitmap = NULL; @@ -14482,9 +14578,9 @@ nonlocal_variable *I6_noun_VAR = NULL; nonlocal_variable *I6_second_VAR = NULL; nonlocal_variable *I6_actor_VAR = NULL; -#line 38 "inform7/Chapter 36/Grammar Properties.w" +#line 36 "inform7/Chapter 36/Grammar Properties.w" -#line 48 "inform7/Chapter 36/Grammar Properties.w" +#line 46 "inform7/Chapter 36/Grammar Properties.w" #line 72 "inform7/Chapter 36/Grammar Verbs.w" @@ -14518,9 +14614,6 @@ kind *K_sound_name = NULL; #line 36 "inform7/Chapter 37/External Files.w" kind *K_external_file = NULL; -#line 14 "inform7/Chapter 38/Main Routine.w" -struct tm *the_present = NULL; - #line 35 "inform7/Chapter 38/I6 Template Interpreter.w" #line 39 "inform7/Chapter 38/I6 Template Interpreter.w" @@ -14542,47 +14635,35 @@ plugin *registered_plugins[MAX_PLUGINS]; plugin_call *plugins_stack[MAX_PLUGS]; -#line 54 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 68 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef PLATFORM_MACOSX #define FOLDER_SEPARATOR '/' -#define INFORM_FOLDER_RELATIVE_TO_HOME "Library/" -#define HOME_LIBRARY "/Library/Inform/Extensions" -#define HOME_LANGUAGES "/Library/Inform/Languages" -#define HOME_DOCS "/Library/Inform/Documentation" -#define HOME_TEMPLATES "/Library/Inform/Templates" -#define TELEMETRYFILE "/Library/Inform/Telemetry" -#define OPTIONSFILE "/Library/Inform/Options.txt" +#define INFORM_FOLDER_RELATIVE_TO_HOME "Library" #define ICON_EXT "tif" #define DEFAULT_HTML_FONT \ "face=\"lucida grande,geneva,arial,tahoma,verdana,helvetica,helv\" size=2" #define POSIX_DIRECTORY_HANDLING #define EXTENSIONS_MODEL_HTML "ExtensionsModel.html" #define EXTENSION_FILE_MODEL_HTML "ExtensionFileModel.html" -#define JAVASCRIPT_MODEL 1 +#define JAVASCRIPT_MODEL_1 typedef long int pointer_sized_int; #endif -#line 82 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 90 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef PLATFORM_WINDOWS #define LOCALE_IS_ISO #define FOLDER_SEPARATOR '\\' #define INFORM_FOLDER_RELATIVE_TO_HOME "" -#define HOME_LIBRARY "\\Inform\\Extensions" -#define HOME_LANGUAGES "\\Inform\\Languages" -#define HOME_DOCS "\\Inform\\Documentation" -#define HOME_TEMPLATES "\\Inform\\Templates" -#define TELEMETRYFILE "\\Inform\\Telemetry" -#define OPTIONSFILE "\\Inform\\Options.txt" #define DEFAULT_HTML_FONT "size=2" #define HTML_MAP_FONT_SIZE 11 #define WINDOWS_DIRECTORY_HANDLING #define EXTENSIONS_MODEL_HTML "WinExtensionsModel.html" #define EXTENSION_FILE_MODEL_HTML "WinExtensionFileModel.html" -#define JAVASCRIPT_MODEL 2 +#define JAVASCRIPT_MODEL_2 typedef long int pointer_sized_int; #endif -#line 116 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 118 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef PLATFORM_WINDOWS #define isdigit(x) Platform__Windows_isdigit(x) int Platform__Windows_isdigit(int c) { @@ -14590,36 +14671,45 @@ int Platform__Windows_isdigit(int c) { } #endif -#line 129 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 131 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef PLATFORM_UNIX #include -#line 132 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 134 "inform7/Chapter 1/Platform-Specific Definitions.w" #define FOLDER_SEPARATOR '/' #define INFORM_FOLDER_RELATIVE_TO_HOME "" -#define HOME_LIBRARY "/Inform/Extensions" -#define HOME_LANGUAGES "/Inform/Languages" -#define HOME_DOCS "/Inform/Documentation" -#define HOME_TEMPLATES "/Inform/Templates" -#define TELEMETRYFILE "/Inform/Telemetry" -#define OPTIONSFILE "/Inform/Options.txt" #define DEFAULT_HTML_FONT "size=2" #define POSIX_DIRECTORY_HANDLING #define EXTENSIONS_MODEL_HTML "ExtensionsModel.html" #define EXTENSION_FILE_MODEL_HTML "ExtensionFileModel.html" -#define JAVASCRIPT_MODEL 1 +#define JAVASCRIPT_MODEL_1 typedef long int pointer_sized_int; #endif -#line 154 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 147 "inform7/Chapter 1/Platform-Specific Definitions.w" +#ifdef PLATFORM_ANDROID +#include +#line 150 "inform7/Chapter 1/Platform-Specific Definitions.w" +#define SUPPRESS_MAIN +#define FOLDER_SEPARATOR '/' +#define INFORM_FOLDER_RELATIVE_TO_HOME "" +#define DEFAULT_HTML_FONT "size=2" +#define POSIX_DIRECTORY_HANDLING +#define EXTENSIONS_MODEL_HTML "ExtensionsModel.html" +#define EXTENSION_FILE_MODEL_HTML "ExtensionFileModel.html" +#define JAVASCRIPT_MODEL_1 +typedef long int pointer_sized_int; +#endif + +#line 168 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifndef ICON_EXT #define ICON_EXT "png" /* File extension of the icons in the HTML index */ #endif -#line 169 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 183 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef POSIX_DIRECTORY_HANDLING #include #include -#line 173 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 187 "inform7/Chapter 1/Platform-Specific Definitions.w" #include int Platform__mkdir(char *path_to_folder) { @@ -14665,12 +14755,12 @@ void Platform__closedir(void *folder) { #endif -#line 222 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 236 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef WINDOWS_DIRECTORY_HANDLING #include #include -#line 227 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 241 "inform7/Chapter 1/Platform-Specific Definitions.w" #include int Platform__mkdir(char *path_to_folder) { @@ -14717,27 +14807,31 @@ void Platform__closedir(void *folder) { #endif -#line 280 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 294 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifndef LOCALE_IS_ISO #ifndef LOCALE_IS_UTF8 #define LOCALE_IS_UTF8 1 #endif #endif -#line 298 "inform7/Chapter 1/Platform-Specific Definitions.w" -FILE *Platform__iso_fopen(char *pathname, char *usage) { +#line 312 "inform7/Chapter 1/Platform-Specific Definitions.w" +FILE *Platform__iso_fopen(filename *F, char *usage) { + char pathname[MAX_FILENAME_LENGTH]; + Filenames__to_string(pathname, F); char transcoded_pathname[2*MAX_FILENAME_LENGTH]; Platform__transcode_ISO_string_to_locale(pathname, transcoded_pathname); return fopen(transcoded_pathname, usage); } -FILE *Platform__iso_fopen_caseless(char *pathname, char *usage) { +FILE *Platform__iso_fopen_caseless(filename *F, char *usage) { + char pathname[MAX_FILENAME_LENGTH]; + Filenames__to_string(pathname, F); char transcoded_pathname[2*MAX_FILENAME_LENGTH]; Platform__transcode_ISO_string_to_locale(pathname, transcoded_pathname); return CIFilingSystem__fopen(transcoded_pathname, usage); } -#line 313 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 331 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef LOCALE_IS_ISO void Platform__transcode_ISO_string_to_locale(char *from, char *to) { strcpy(to, from); @@ -14750,7 +14844,7 @@ void Platform__transcode_ISO_string_to_locale(char *from, char *to) { } #endif -#line 340 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 358 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef LOCALE_IS_ISO int Platform__truncated_locale_fgets(FILE *F, char *buffer, int limit) { return Platform__truncated_iso_fgets(F, buffer, limit); @@ -14774,7 +14868,7 @@ int Platform__truncated_locale_fgets(FILE *F, char *buffer, int limit) { } #endif -#line 367 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 385 "inform7/Chapter 1/Platform-Specific Definitions.w" #ifdef LOCALE_IS_ISO void Platform__truncated_locale_arg(char *arg, char *buffer, int limit) { Extensions__IDs__truncated_strcpy(buffer, arg, limit); @@ -14795,7 +14889,7 @@ void Platform__truncated_locale_arg(char *arg, char *buffer, int limit) { } #endif -#line 391 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 409 "inform7/Chapter 1/Platform-Specific Definitions.w" char Platform__tolower(char c) { return (char) tolower((int) c); } @@ -14812,7 +14906,7 @@ int Platform__strlen(const char *p) { return (int) strlen(p); } -#line 414 "inform7/Chapter 1/Platform-Specific Definitions.w" +#line 432 "inform7/Chapter 1/Platform-Specific Definitions.w" int Platform__truncated_iso_fgets(FILE *F, char *buffer, int limit) { int len=0, c; if (buffer == NULL) return -1; @@ -15050,6 +15144,7 @@ ALLOCATE_INDIVIDUALLY(extension_census_datum) ALLOCATE_INDIVIDUALLY(extension_dictionary_entry) ALLOCATE_INDIVIDUALLY(extension_file) ALLOCATE_INDIVIDUALLY(external_file) +ALLOCATE_INDIVIDUALLY(filename) ALLOCATE_INDIVIDUALLY(generalisation) ALLOCATE_INDIVIDUALLY(grammar_line) ALLOCATE_INDIVIDUALLY(grammar_verb) @@ -15095,6 +15190,7 @@ ALLOCATE_INDIVIDUALLY(parsing_data) ALLOCATE_INDIVIDUALLY(parsing_pp_data) ALLOCATE_INDIVIDUALLY(past_tense_action_record) ALLOCATE_INDIVIDUALLY(past_tense_condition_record) +ALLOCATE_INDIVIDUALLY(pathname) ALLOCATE_INDIVIDUALLY(pcalc_prop_deferral) ALLOCATE_INDIVIDUALLY(ph_stack_frame_box) ALLOCATE_INDIVIDUALLY(phrase) @@ -15134,7 +15230,7 @@ ALLOCATE_INDIVIDUALLY(verb_conjugation) ALLOCATE_INDIVIDUALLY(verb_usage) ALLOCATE_INDIVIDUALLY(VM_usage_note) -#line 812 "inform7/Chapter 2/Memory.w" +#line 814 "inform7/Chapter 2/Memory.w" ALLOCATE_IN_ARRAYS(action_name_list, 1000) ALLOCATE_IN_ARRAYS(action_pattern, 100) ALLOCATE_IN_ARRAYS(activity_crossref, 100) @@ -15181,7 +15277,7 @@ ALLOCATE_IN_ARRAYS(vocabulary_entry, 100) ALLOCATE_IN_ARRAYS(instance_usage, 200) ALLOCATE_IN_ARRAYS(STREAM, 50) -#line 879 "inform7/Chapter 2/Memory.w" +#line 882 "inform7/Chapter 2/Memory.w" char *memory_needs[NUMBER_OF_MREASONS] = { "extension dictionary", "index sorting", @@ -15195,16 +15291,17 @@ char *memory_needs[NUMBER_OF_MREASONS] = { "lists for type-checking invocations", "size estimates for compiled objects", "compilation workspace for objects", - "documentation fragments" + "documentation fragments", + "filename/pathname storage" }; -#line 903 "inform7/Chapter 2/Memory.w" +#line 907 "inform7/Chapter 2/Memory.w" int max_memory_at_once_for_each_need[NUMBER_OF_MREASONS], memory_claimed_for_each_need[NUMBER_OF_MREASONS], number_of_claims_for_each_need[NUMBER_OF_MREASONS]; int total_claimed_simply = 0; -#line 915 "inform7/Chapter 2/Memory.w" +#line 919 "inform7/Chapter 2/Memory.w" void *Memory__I7_calloc(int how_many, int size_in_bytes, int reason) { return Memory__I7_alloc(how_many, size_in_bytes, reason); } @@ -15212,14 +15309,14 @@ void *Memory__I7_malloc(int size_in_bytes, int reason) { return Memory__I7_alloc(-1, size_in_bytes, reason); } -#line 925 "inform7/Chapter 2/Memory.w" +#line 929 "inform7/Chapter 2/Memory.w" void *Memory__I7_alloc(int N, int S, int R) { void *pointer; int bytes_needed; if ((R < 0) || (R >= NUMBER_OF_MREASONS)) internal_error("no such memory reason"); if (total_claimed_simply == 0) { -#line 959 "inform7/Chapter 2/Memory.w" +#line 963 "inform7/Chapter 2/Memory.w" int i; for (i=0; i 0) { pointer = calloc((size_t) N, (size_t) S); bytes_needed = N*S; @@ -15245,11 +15342,11 @@ void *Memory__I7_alloc(int N, int S, int R) { memory_needs[R]); } -#line 930 "inform7/Chapter 2/Memory.w" +#line 934 "inform7/Chapter 2/Memory.w" ; { -#line 969 "inform7/Chapter 2/Memory.w" +#line 973 "inform7/Chapter 2/Memory.w" memory_claimed_for_each_need[R] += bytes_needed; total_claimed_simply += bytes_needed; number_of_claims_for_each_need[R]++; @@ -15257,7 +15354,7 @@ void *Memory__I7_alloc(int N, int S, int R) { max_memory_at_once_for_each_need[R] = memory_claimed_for_each_need[R]; } -#line 931 "inform7/Chapter 2/Memory.w" +#line 935 "inform7/Chapter 2/Memory.w" ; simple_memory_claim *smc = CREATE(simple_memory_claim); smc->memory_claimed = pointer; @@ -15265,7 +15362,7 @@ void *Memory__I7_alloc(int N, int S, int R) { return pointer; } -#line 982 "inform7/Chapter 2/Memory.w" +#line 986 "inform7/Chapter 2/Memory.w" void Memory__I7_free(void *pointer, int R) { if ((R < 0) || (R >= NUMBER_OF_MREASONS)) internal_error("no such memory reason"); if (pointer == NULL) internal_error("can't free NULL memory"); @@ -15281,7 +15378,7 @@ void Memory__I7_free(void *pointer, int R) { internal_error("can't free this memory, which is not now allocated"); } -#line 1004 "inform7/Chapter 2/Memory.w" +#line 1008 "inform7/Chapter 2/Memory.w" void Memory__I7_free_remaining(void) { simple_memory_claim *smc; LOOP_OVER(smc, simple_memory_claim) { @@ -15292,7 +15389,7 @@ void Memory__I7_free_remaining(void) { internal_error("memory not freed exactly correctly"); } -#line 1018 "inform7/Chapter 2/Memory.w" +#line 1022 "inform7/Chapter 2/Memory.w" int Memory__log_usage(int total) { if (total_claimed_simply == 0) return 0; int i, t = 0; @@ -15308,7 +15405,7 @@ int Memory__log_usage(int total) { return t; } -#line 1037 "inform7/Chapter 2/Memory.w" +#line 1041 "inform7/Chapter 2/Memory.w" void Memory__log_statistics(void) { int total_for_objects = MEMORY_GRANULARITY*no_blocks_allocated; /* usage in bytes */ int total_for_SMAs = Memory__log_usage(0); /* usage in bytes */ @@ -15317,20 +15414,20 @@ void Memory__log_statistics(void) { { -#line 1072 "inform7/Chapter 2/Memory.w" +#line 1076 "inform7/Chapter 2/Memory.w" int i; for (i=0; iwrite_to_file = Platform__iso_fopen(filename, "w"); + stream->write_to_file = Platform__iso_fopen(name, "w"); if (stream->write_to_file == NULL) return FALSE; stream->encoding_to_write_to_file = encoding; total_file_writes++; @@ -15496,11 +15593,11 @@ int Streams__open_to_file(STREAM *stream, char *filename, int encoding) { } #line 328 "inform7/Chapter 2/Streams.w" -int Streams__open_to_file_append(STREAM *stream, char *filename, int encoding) { +int Streams__open_to_file_append(STREAM *stream, filename *name, int encoding) { if (stream == NULL) internal_error("tried to open NULL stream"); - if (filename == NULL) internal_error("stream_open_to_file on null filename"); + if (name == NULL) internal_error("stream_open_to_file on null filename"); Streams__initialise(stream); - stream->write_to_file = Platform__iso_fopen(filename, "a"); + stream->write_to_file = Platform__iso_fopen(name, "a"); if (stream->write_to_file == NULL) return FALSE; stream->encoding_to_write_to_file = encoding; total_file_writes++; @@ -15620,6 +15717,22 @@ void Streams__printf(STREAM *stream, char *fmt, ...) { case 's': for (sval = va_arg(ap, char *); *sval; sval++) Streams__putc(*sval, stream); break; + case 'f': { + filename *F = va_arg(ap, filename *); + char fn[MAX_FILENAME_LENGTH]; + Filenames__to_string(fn, F); + int j; + for (j = 0; fn[j]; j++) Streams__putc(fn[j], stream); + break; + } + case 'p': { + pathname *P = va_arg(ap, pathname *); + char pn[MAX_FILENAME_LENGTH]; + Pathnames__to_string(pn, P); + int j; + for (j = 0; pn[j]; j++) Streams__putc(pn[j], stream); + break; + } case '%': Streams__putc('%', stream); break; default: fprintf(stderr, "*** Bad escape: <%s> ***\n", format_string); @@ -15636,7 +15749,7 @@ void Streams__printf(STREAM *stream, char *fmt, ...) { va_end(ap); /* macro to end variable argument processing */ } -#line 509 "inform7/Chapter 2/Streams.w" +#line 525 "inform7/Chapter 2/Streams.w" void Streams__putc(int c_int, STREAM *stream) { unsigned int c; if (c_int >= 0) c = (unsigned int) c_int; else c = (unsigned int) (c_int + 256); @@ -15659,7 +15772,7 @@ void Streams__putc(int c_int, STREAM *stream) { } if (c != '\n') { -#line 578 "inform7/Chapter 2/Streams.w" +#line 594 "inform7/Chapter 2/Streams.w" if (first_stream->indentation_pending) { first_stream->indentation_pending = FALSE; int i; @@ -15670,7 +15783,7 @@ void Streams__putc(int c_int, STREAM *stream) { } } -#line 529 "inform7/Chapter 2/Streams.w" +#line 545 "inform7/Chapter 2/Streams.w" ; if (stream->use_xml_escapes) { switch(c) { @@ -15683,7 +15796,7 @@ void Streams__putc(int c_int, STREAM *stream) { while (stream->stream_continues) stream = stream->stream_continues; { -#line 605 "inform7/Chapter 2/Streams.w" +#line 621 "inform7/Chapter 2/Streams.w" if (stream->chars_written + SPACE_AT_END_OF_STREAM >= stream->chars_capacity) { if (stream->write_to_file) return; /* write nothing further */ if (stream->write_to_memory) { @@ -15702,13 +15815,13 @@ void Streams__putc(int c_int, STREAM *stream) { } } -#line 539 "inform7/Chapter 2/Streams.w" +#line 555 "inform7/Chapter 2/Streams.w" ; if (stream->write_to_file) { switch(stream->encoding_to_write_to_file) { case UTF8_ENC: { -#line 566 "inform7/Chapter 2/Streams.w" +#line 582 "inform7/Chapter 2/Streams.w" if (c >= 0x800) { fputc(0xE0 + (c >> 12), stream->write_to_file); fputc(0x80 + ((c >> 6) & 0x3f), stream->write_to_file); @@ -15719,7 +15832,7 @@ void Streams__putc(int c_int, STREAM *stream) { } else fputc((int) c, stream->write_to_file); } -#line 542 "inform7/Chapter 2/Streams.w" +#line 558 "inform7/Chapter 2/Streams.w" ; break; case ISO_ENC: fputc((int) c, stream->write_to_file); break; default: internal_error("stream has unknown text encoding"); @@ -15741,7 +15854,7 @@ void Streams__putc(int c_int, STREAM *stream) { stream->chars_written++; } -#line 625 "inform7/Chapter 2/Streams.w" +#line 641 "inform7/Chapter 2/Streams.w" void Streams__literal(STREAM *stream, char *p) { if (stream == NULL) return; int i, x = stream->use_xml_escapes; @@ -15750,7 +15863,7 @@ void Streams__literal(STREAM *stream, char *p) { stream->use_xml_escapes = x; } -#line 640 "inform7/Chapter 2/Streams.w" +#line 656 "inform7/Chapter 2/Streams.w" void Streams__indent(STREAM *stream) { if (stream == NULL) return; stream->indentation_level++; @@ -15768,7 +15881,7 @@ void Streams__set_indentation(STREAM *stream, int N) { stream->indentation_level = N; } -#line 664 "inform7/Chapter 2/Streams.w" +#line 680 "inform7/Chapter 2/Streams.w" int Streams__get_position(STREAM *stream) { int t = 0; while (stream) { @@ -15778,7 +15891,7 @@ int Streams__get_position(STREAM *stream) { return t; } -#line 678 "inform7/Chapter 2/Streams.w" +#line 694 "inform7/Chapter 2/Streams.w" int Streams__latest(STREAM *stream) { if (stream == NULL) return 0; if (stream->write_to_file) internal_error("stream_latest on file stream"); @@ -15791,7 +15904,7 @@ int Streams__latest(STREAM *stream) { return 0; } -#line 697 "inform7/Chapter 2/Streams.w" +#line 713 "inform7/Chapter 2/Streams.w" void Streams__set_position(STREAM *stream, int position) { if (stream == NULL) return; if (position < 0) position = 0; /* to simplify the implementation of backspacing */ @@ -15811,14 +15924,14 @@ void Streams__set_position(STREAM *stream, int position) { } } -#line 724 "inform7/Chapter 2/Streams.w" +#line 740 "inform7/Chapter 2/Streams.w" char *Streams__get_text(STREAM *stream) { if (stream == NULL) return NULL; if (stream->write_to_file) internal_error("stream_get_text on file stream"); return stream->write_to_memory; } -#line 734 "inform7/Chapter 2/Streams.w" +#line 750 "inform7/Chapter 2/Streams.w" void Streams__copy(STREAM *to, STREAM *from) { if ((from == NULL) || (to == NULL)) return; if (from->write_to_file) internal_error("stream_copy from file stream"); @@ -15834,9 +15947,8 @@ void Streams__copy(STREAM *to, STREAM *from) { #line 272 "inform7/Chapter 2/Debugging Log.w" void Log__open(void) { - char *fn = Filenames__build(DEBUG_LOG_LEAFNAME); - if (STREAM_OPEN_TO_FILE(debug_log_file, fn, ISO_ENC) == FALSE) - Problems__Fatal__issue2("Can't open debug log", fn); + if (STREAM_OPEN_TO_FILE(debug_log_file, filename_of_debugging_log, ISO_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open debug log", filename_of_debugging_log); dl = debug_log_file; LOG("Debugging log of %s\n", NI_VERSION); @@ -15854,13 +15966,13 @@ void Log__close(void) { HTML__html_footer(problems_file); STREAM_CLOSE(problems_file); } -#line 299 "inform7/Chapter 2/Debugging Log.w" +#line 298 "inform7/Chapter 2/Debugging Log.w" int attempts_to_open_telemetry = 0; void Log__ensure_telemetry_file(void) { if (telmy) return; if (attempts_to_open_telemetry++ > 0) return; if (STREAM_OPEN_TO_FILE_APPEND(telemetry_file, filename_of_telemetry, ISO_ENC) == FALSE) - Problems__Fatal__issue2("Can't open telemetry file", filename_of_telemetry); + Problems__Fatal__filename_related("Can't open telemetry file", filename_of_telemetry); telmy = telemetry_file; STREAM_WRITE(telmy, "\n-- -- -- -- -- -- -- --\n%s build %s: telemetry.\n", NI_VERSION, NI_BUILD); @@ -15877,7 +15989,7 @@ void Log__write_to_telemetry_file(char *m) { STREAM_WRITE(telmy, "The user says:\n\n%s\n\n", m); } -#line 325 "inform7/Chapter 2/Debugging Log.w" +#line 324 "inform7/Chapter 2/Debugging Log.w" int options_file_w1 = -1, options_file_w2 = -1; void Log__read_further_mandatory_text(void) { FILE *FMAN = Platform__iso_fopen(filename_of_options, "r"); @@ -15898,7 +16010,7 @@ void Log__read_further_mandatory_text(void) { fclose(FMAN); } -#line 351 "inform7/Chapter 2/Debugging Log.w" +#line 350 "inform7/Chapter 2/Debugging Log.w" char debug_log_phase[32]; int debug_log_subheading = 1; void Log__new_phase_of_Informs_run(char *p, char *q) { @@ -15916,7 +16028,7 @@ void Log__new_stage_of_Informs_run(char *p) { STREAM_FLUSH(dl); } -#line 377 "inform7/Chapter 2/Debugging Log.w" +#line 375 "inform7/Chapter 2/Debugging Log.w" int Log__get_aspect(int aspect) { int decision = the_debugging_aspects[aspect].on_or_off; if (aspect == DEBUGGING_LOG_INCLUSIONS_DA) decision = TRUE; @@ -15928,7 +16040,7 @@ void Log__set_aspect(int aspect, int state) { the_debugging_aspects[aspect].on_or_off = state; } -#line 391 "inform7/Chapter 2/Debugging Log.w" +#line 389 "inform7/Chapter 2/Debugging Log.w" void Log__set_all_aspects(int new_state) { int i; if (dl) LOGIF(DEBUGGING_LOG_INCLUSIONS, "Set debugging aspect: everything -> %s\n", @@ -15940,7 +16052,7 @@ void Log__set_all_aspects(int new_state) { } } -#line 421 "inform7/Chapter 2/Debugging Log.w" +#line 419 "inform7/Chapter 2/Debugging Log.w" int include_in_debugging_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1] | ONLY_DLR; *XP = RP[1]; @@ -15957,7 +16069,7 @@ break; } return TRUE; } -#line 424 "inform7/Chapter 2/Debugging Log.w" +#line 422 "inform7/Chapter 2/Debugging Log.w" int debugging_log_request_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -15985,16 +16097,16 @@ break; } return TRUE; } -#line 430 "inform7/Chapter 2/Debugging Log.w" +#line 428 "inform7/Chapter 2/Debugging Log.w" -#line 434 "inform7/Chapter 2/Debugging Log.w" +#line 432 "inform7/Chapter 2/Debugging Log.w" void Log__set_aspect_from_text(int w1, int w2, int new_state) { LOGIF(DEBUGGING_LOG_INCLUSIONS, "Set contents of debugging log: $W -> %s\n", w1, w2, new_state?"TRUE":"FALSE"); { -#line 459 "inform7/Chapter 2/Debugging Log.w" +#line 457 "inform7/Chapter 2/Debugging Log.w" Preform__parse_nt_against_word_range(include_in_debugging_sentence_subject_NTM, w1, w2, NULL, NULL); if (most_recent_result & ONLY_DLR) Log__set_all_aspects(1-new_state); if (most_recent_result & EVERYTHING_DLR) { Log__set_all_aspects(new_state); return; } @@ -16003,7 +16115,7 @@ void Log__set_aspect_from_text(int w1, int w2, int new_state) { GET_RW(debugging_log_request_NTM, 1, w1, w2); { -#line 472 "inform7/Chapter 2/Debugging Log.w" +#line 470 "inform7/Chapter 2/Debugging Log.w" int i; debugging_aspect *da; for (i=0; ; i++) { @@ -16024,13 +16136,13 @@ void Log__set_aspect_from_text(int w1, int w2, int new_state) { } } -#line 465 "inform7/Chapter 2/Debugging Log.w" +#line 463 "inform7/Chapter 2/Debugging Log.w" ; } if (most_recent_result & PREFORM_DLR) { Preform__watch(most_recent_result_p, new_state); return; } } -#line 438 "inform7/Chapter 2/Debugging Log.w" +#line 436 "inform7/Chapter 2/Debugging Log.w" ; Problems__quote_source(1, current_sentence); @@ -16042,7 +16154,7 @@ void Log__set_aspect_from_text(int w1, int w2, int new_state) { Problems__issue_problem_end(); } -#line 509 "inform7/Chapter 2/Debugging Log.w" +#line 507 "inform7/Chapter 2/Debugging Log.w" void Log__set_aspect_from_command_line(char *text) { int i, parity = TRUE, list_mode = FALSE; debugging_aspect *da; @@ -16077,7 +16189,7 @@ void Log__set_aspect_from_command_line(char *text) { Problems__Fatal__issue("No such debugging log aspect."); } -#line 550 "inform7/Chapter 2/Debugging Log.w" +#line 548 "inform7/Chapter 2/Debugging Log.w" void Log__tracing_on(int starred, char *heading) { int i, j; if (starred) { @@ -16094,7 +16206,7 @@ void Log__tracing_on(int starred, char *heading) { } } -#line 569 "inform7/Chapter 2/Debugging Log.w" +#line 567 "inform7/Chapter 2/Debugging Log.w" int verbose_checking_state = FALSE; void Log__tracing_phrases(char *text) { @@ -16126,7 +16238,7 @@ void Log__tracing_phrases(char *text) { } } -#line 606 "inform7/Chapter 2/Debugging Log.w" +#line 604 "inform7/Chapter 2/Debugging Log.w" void Log__show_debugging_settings_with_state(int state) { int i, c; debugging_aspect *da; @@ -16152,7 +16264,7 @@ void Log__show_debugging_contents(void) { LOG("Omitted:\n"); Log__show_debugging_settings_with_state(FALSE); } -#line 634 "inform7/Chapter 2/Debugging Log.w" +#line 632 "inform7/Chapter 2/Debugging Log.w" void Log__paste_icons(void) { debugging_aspect *da; int i; @@ -16170,7 +16282,7 @@ void Log__paste_icons(void) { } } -#line 668 "inform7/Chapter 2/Debugging Log.w" +#line 666 "inform7/Chapter 2/Debugging Log.w" int mlc_backtrace_sp = 0; meaning_list *mlc_backtrace[MAXIMUM_MLC_BACKTRACE]; char *mlc_backtrace_at[MAXIMUM_MLC_BACKTRACE]; @@ -16185,7 +16297,7 @@ void Log__mlc_backtrace(void) { LOG("End of MLC backtrace\n"); } -#line 690 "inform7/Chapter 2/Debugging Log.w" +#line 688 "inform7/Chapter 2/Debugging Log.w" void Log__dlprintf(char *fmt, ...) { va_list ap; /* the variable argument list signified by the dots */ char *p; @@ -16196,7 +16308,7 @@ void Log__dlprintf(char *fmt, ...) { switch (*p) { case '%': { -#line 718 "inform7/Chapter 2/Debugging Log.w" +#line 716 "inform7/Chapter 2/Debugging Log.w" int ival; double dval; char *sval; char format_string[8], category = ' '; int i = 1; @@ -16217,17 +16329,33 @@ void Log__dlprintf(char *fmt, ...) { case 's': for (sval = va_arg(ap, char *); *sval; sval++) STREAM_PUT(dl, *sval); break; case '%': STREAM_PUT(dl, '%'); break; + case 'f': { + filename *F = va_arg(ap, filename *); + char fn[MAX_FILENAME_LENGTH]; + Filenames__to_string(fn, F); + int j; + for (j = 0; fn[j]; j++) STREAM_PUT(dl, fn[j]); + break; + } + case 'p': { + pathname *P = va_arg(ap, pathname *); + char pn[MAX_FILENAME_LENGTH]; + Pathnames__to_string(pn, P); + int j; + for (j = 0; pn[j]; j++) STREAM_PUT(dl, pn[j]); + break; + } default: STREAM_WRITE(dl, "*** Bad escape: <%s> ***\n", format_string); internal_error("Unknown % string escape in Log__dlprintf"); } } -#line 698 "inform7/Chapter 2/Debugging Log.w" +#line 696 "inform7/Chapter 2/Debugging Log.w" ; break; case '$': { -#line 748 "inform7/Chapter 2/Debugging Log.w" +#line 762 "inform7/Chapter 2/Debugging Log.w" p++; switch (*p) { case 0: STREAM_PUT(dl, '$'); p--; break; /* a literal dollar was last character */ @@ -16247,7 +16375,6 @@ void Log__dlprintf(char *fmt, ...) { SINGLE_ESCAPE('E', invocation_list *, Invocations__log_list) SINGLE_ESCAPE('e', invocation *, Invocations__log) DOUBLE_ESCAPE('F', int, int, Text__log_with_whitespace) - /* escape |$f| is vacant */ SINGLE_ESCAPE('G', grammar_verb *, PL__Parsing__Verbs__log) SINGLE_ESCAPE('g', grammar_line *, PL__Parsing__Lines__log) SINGLE_ESCAPE('H', heading *, Sentences__Headings__log) @@ -16295,7 +16422,7 @@ void Log__dlprintf(char *fmt, ...) { } } -#line 699 "inform7/Chapter 2/Debugging Log.w" +#line 697 "inform7/Chapter 2/Debugging Log.w" ; break; case '"': if (logging_to_I6_text) STREAM_PUT(dl, '~'); else STREAM_PUT(dl, '"'); break; case '\n': if (logging_to_I6_text) STREAM_PUT(dl, '^'); else STREAM_PUT(dl, '\n'); break; @@ -16345,165 +16472,499 @@ void ProgressBar__end_outcome(void) { STREAM_FLUSH(STDERR); } -#line 65 "inform7/Chapter 3/Filenames.w" -char *bundle_name = NULL; -char *source_text_file = NULL; - -#line 147 "inform7/Chapter 3/Filenames.w" -void Filenames__make_pathname_of_extensions(void) { - char *home = (char *) (getenv("HOME")); - if (home == NULL) home = ""; - - strcpy(pathname_of_extensions, home); strcat(pathname_of_extensions, HOME_LIBRARY); - - strcpy(pathname_of_languages, home); strcat(pathname_of_languages, HOME_LANGUAGES); - - strcpy(pathname_of_extension_docs, home); strcat(pathname_of_extension_docs, HOME_DOCS); - - strcpy(pathname_of_built_in_extensions, pathname_of_extensions); - - strcpy(pathname_of_templates, home); strcat(pathname_of_templates, HOME_TEMPLATES); - - strcpy(filename_of_options, home); strcat(filename_of_options, OPTIONSFILE); - - strcpy(filename_of_telemetry, home); strcat(filename_of_telemetry, TELEMETRYFILE); - int this_month = the_present->tm_mon + 1; - int this_day = the_present->tm_mday; - int this_year = the_present->tm_year + 1900; - sprintf(filename_of_telemetry + Platform__strlen(filename_of_telemetry), - " %04d-%02d-%02d.txt", this_year, this_month, this_day); +#line 63 "inform7/Chapter 3/Pathnames.w" +pathname *Pathnames__subfolder(pathname *P, char *folder_name) { + return Pathnames__primitive(folder_name, 0, Platform__strlen(folder_name), P); } -#line 172 "inform7/Chapter 3/Filenames.w" - -#line 176 "inform7/Chapter 3/Filenames.w" -void Filenames__make_pathname_of_materials_folder(void) { - if (bundle_name) strcpy(materials_folder, bundle_name); - else materials_folder[0] = 0; - int i = Platform__strlen(materials_folder)-1; - while ((i>0) && (materials_folder[i] != '.')) i--; - if (i>0) strcpy(materials_folder+i, ".materials"); - - sprintf(pathname_of_materials_extensions, "%s%cExtensions", - materials_folder, FOLDER_SEPARATOR); - - sprintf(filename_of_epsfile, "%s%cInform Map.eps", - materials_folder, FOLDER_SEPARATOR); +pathname *Pathnames__primitive(char *c_string, int from, int to, pathname *par) { + pathname *P = CREATE(pathname); + P->pathname_of_parent = par; + P->known_to_exist = FALSE; + if (to-from > MAX_FILENAME_LENGTH-1) + Problems__Fatal__issue_t("a filename grew too long", c_string); + if (to-from <= 0) + internal_error("empty intermediate pathname"); + P->intermediate = Memory__I7_malloc(to-from+1, FILENAME_STORAGE_MREASON); + for (int i = from; i < to; i++) P->intermediate[i-from] = c_string[i]; + P->intermediate[to-from] = 0; + return P; } -#line 196 "inform7/Chapter 3/Filenames.w" -char local_filename_buffer[MAX_FILENAME_LENGTH]; - -char *Filenames__top_level(char *leafname) { - if (bundle_name == NULL) return leafname; /* outside bundle mode, use current directory */ - sprintf(local_filename_buffer, "%s%c%s", - bundle_name, FOLDER_SEPARATOR, leafname); - return local_filename_buffer; +#line 89 "inform7/Chapter 3/Pathnames.w" +pathname *Pathnames__from_string(char *path) { + return Pathnames__from_string_relative(NULL, path); } -#line 213 "inform7/Chapter 3/Filenames.w" -char *Filenames__build(char *leafname) { - if (census_mode) { - if (Folders__verify_installed_extensions_tree() == FALSE) return leafname; - sprintf(local_filename_buffer, "%s%c%s", - pathname_of_extension_docs, FOLDER_SEPARATOR, leafname); - return local_filename_buffer; - } - if (bundle_name == NULL) return leafname; - sprintf(local_filename_buffer, "%s%cBuild%c%s", - bundle_name, FOLDER_SEPARATOR, FOLDER_SEPARATOR, leafname); - return local_filename_buffer; -} - -#line 229 "inform7/Chapter 3/Filenames.w" -char *Filenames__source_filename_relative_to_bundle(char *leafname) { - if (bundle_name == NULL) return leafname; - sprintf(local_filename_buffer, "Source%c%s", FOLDER_SEPARATOR, leafname); - return local_filename_buffer; -} - -#line 242 "inform7/Chapter 3/Filenames.w" -int index_subfolder_made = FALSE; -int details_subfolder_made = FALSE; -char *Filenames__index(char *leafname, int sub) { - if (bundle_name == NULL) return leafname; - if (index_subfolder_made == FALSE) { - sprintf(local_filename_buffer, "%s%cIndex", - bundle_name, FOLDER_SEPARATOR); - Platform__mkdir(local_filename_buffer); - index_subfolder_made = TRUE; - } - sprintf(local_filename_buffer, "%s%cIndex%c", - bundle_name, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - if (sub >= 0) { - strcat(local_filename_buffer, "Details"); - if (details_subfolder_made == FALSE) { - Platform__mkdir(local_filename_buffer); - details_subfolder_made = TRUE; +pathname *Pathnames__from_string_relative(pathname *P, char *path) { + pathname *at = P; + int i = 0, pos = 0; + if ((path[0]) && (P == NULL)) i++; + for (; path[i]; i++) + if (path[i] == FOLDER_SEPARATOR) { + if (i > pos) at = Pathnames__primitive(path, pos, i, at); + pos = i+1; } - sprintf(local_filename_buffer + Platform__strlen(local_filename_buffer), - "%c%d_", FOLDER_SEPARATOR, sub); + if (i > pos) at = Pathnames__primitive(path, pos, i, at); + return at; +} + +#line 110 "inform7/Chapter 3/Pathnames.w" +void Pathnames__to_string(char *to, pathname *P) { + to[0] = 0; + Pathnames__to_string_r(to, P, MAX_FILENAME_LENGTH-1); +} + +int Pathnames__to_string_r(char *to, pathname *P, int room_left) { + if (P->pathname_of_parent) + room_left = Pathnames__to_string_r(to, P->pathname_of_parent, room_left); + room_left = room_left - 1 - Platform__strlen(P->intermediate); + if (room_left < 0) + Problems__Fatal__issue_t("a filename grew too long", to); + int pos = Platform__strlen(to); + if (pos > 0) to[pos++] = FOLDER_SEPARATOR; + strcpy(to+pos, P->intermediate); + return room_left; +} + +#line 142 "inform7/Chapter 3/Pathnames.w" +void Pathnames__to_string_relative(char *to, pathname *P, pathname *R) { + char rt[MAX_FILENAME_LENGTH], pt[MAX_FILENAME_LENGTH]; + Pathnames__to_string(rt, R); + Pathnames__to_string(pt, P); + int n = Platform__strlen(rt); + if ((strncmp(pt, rt, (size_t) n)==0) && (pt[n]==FOLDER_SEPARATOR)) + strcpy(to, pt+n+1); + else { + LOG("Pathname: %s\nRelative to: %s\n", pt, rt); + internal_error("pathname not relative to pathname"); } - sprintf(local_filename_buffer + Platform__strlen(local_filename_buffer), "%s", leafname); - return local_filename_buffer; } -#line 24 "inform7/Chapter 3/Folders.w" -int Folders__verify_library_folder(char *p1, char *p2, char *p3, char *new) { - char path[MAX_FILENAME_LENGTH]; +#line 160 "inform7/Chapter 3/Pathnames.w" +void Pathnames__start(void) { char *home = (char *) (getenv("HOME")); - int rv; - path[0] = 0; - if (home) sprintf(path, "%s%c", home, FOLDER_SEPARATOR); - sprintf(path + Platform__strlen(path), "%s", INFORM_FOLDER_RELATIVE_TO_HOME); - if (p1) sprintf(path + Platform__strlen(path), "%s%c", p1, FOLDER_SEPARATOR); - if (p2) sprintf(path + Platform__strlen(path), "%s%c", p2, FOLDER_SEPARATOR); - if (p3) sprintf(path + Platform__strlen(path), "%s%c", p3, FOLDER_SEPARATOR); - if (new) sprintf(path + Platform__strlen(path), "%s", new); - rv = Platform__mkdir(path); - if (rv == FALSE) LOG("Folders__verify_library_folder failed on path %s\n", path); - return rv; + if (home) { + home_path = Pathnames__from_string(home); + home_path->known_to_exist = TRUE; + } } -#line 51 "inform7/Chapter 3/Folders.w" -int Folders__verify_installed_extensions_tree(void) { - if (Folders__verify_library_folder(NULL, NULL, NULL, "Inform") == 0) return FALSE; - if (Folders__verify_library_folder("Inform", NULL, NULL, "Documentation") == 0) return FALSE; - if (Folders__verify_library_folder("Inform", "Documentation", NULL, "Extensions") == 0) return FALSE; - if (Folders__verify_library_folder("Inform", NULL, NULL, "Extensions") == 0) return FALSE; - if (Folders__verify_library_folder("Inform", "Extensions", NULL, "Reserved") == 0) return FALSE; - return TRUE; +#line 173 "inform7/Chapter 3/Pathnames.w" +int Pathnames__create_in_file_system(pathname *P) { + if (P->known_to_exist) return TRUE; + char path[MAX_FILENAME_LENGTH]; + Pathnames__to_string(path, P); + P->known_to_exist = Platform__mkdir(path); + if (P->known_to_exist == FALSE) LOG("Unable to force existence of path: %s\n", path); + return P->known_to_exist; } -#line 74 "inform7/Chapter 3/Folders.w" -int Folders__write_contents_to_file(char *pathname, char *writeto) { +#line 197 "inform7/Chapter 3/Pathnames.w" +int Pathnames__write_contents_to_file(filename *writeto, pathname *P) { + char path[MAX_FILENAME_LENGTH]; + Pathnames__to_string(path, P); + char transcoded_pathname[2*MAX_FILENAME_LENGTH]; + Platform__transcode_ISO_string_to_locale(path, transcoded_pathname); + STREAM CONTS_struct; STREAM *CONTS = &CONTS_struct; - void *FOLDER = Platform__opendir(pathname); - char leafname[MAX_FILENAME_LENGTH+1]; + void *FOLDER = Platform__opendir(transcoded_pathname); + char leaf[MAX_FILENAME_LENGTH+1]; if (FOLDER == NULL) return FALSE; if (STREAM_OPEN_TO_FILE(CONTS, writeto, ISO_ENC) == FALSE) return FALSE; - while (Platform__readdir(FOLDER, pathname, leafname)) { - if (leafname[0] == '.') continue; - STREAM_WRITE(CONTS, "%s\n", leafname); + while (Platform__readdir(FOLDER, transcoded_pathname, leaf)) { + if (leaf[0] == '.') continue; + STREAM_WRITE(CONTS, "%s\n", leaf); } STREAM_CLOSE(CONTS); Platform__closedir(FOLDER); return TRUE; } -#line 92 "inform7/Chapter 3/Folders.w" -int Folders__write_contents_to_stream(OUTPUT_STREAM, char *pathname) { - void *FOLDER = Platform__opendir(pathname); +#line 220 "inform7/Chapter 3/Pathnames.w" +int Pathnames__write_contents_to_stream(OUTPUT_STREAM, pathname *P) { + char path[MAX_FILENAME_LENGTH]; + Pathnames__to_string(path, P); + void *FOLDER = Platform__opendir(path); if (FOLDER == NULL) return FALSE; - char leafname[MAX_FILENAME_LENGTH+1]; - while (Platform__readdir(FOLDER, pathname, leafname)) { - if (leafname[0] == '.') continue; - WRITE("%s\n", leafname); + char leaf[MAX_FILENAME_LENGTH+1]; + while (Platform__readdir(FOLDER, path, leaf)) { + if (leaf[0] == '.') continue; + WRITE("%s\n", leaf); } Platform__closedir(FOLDER); return TRUE; } +#line 30 "inform7/Chapter 3/Filenames.w" +filename *Filenames__in_folder(pathname *P, char *file_name) { + return Filenames__primitive(file_name, 0, Platform__strlen(file_name), P); +} + +filename *Filenames__primitive(char *c_string, int from, int to, pathname *par) { + filename *F = CREATE(filename); + F->pathname_of_location = par; + if (to-from > MAX_FILENAME_LENGTH-1) + Problems__Fatal__issue_t("a filename grew too long", c_string); + if (to-from <= 0) + internal_error("empty intermediate pathname"); + F->leafname = Memory__I7_malloc(to-from+1, FILENAME_STORAGE_MREASON); + for (int i = from; i < to; i++) F->leafname[i-from] = c_string[i]; + F->leafname[to-from] = 0; + return F; +} + +#line 51 "inform7/Chapter 3/Filenames.w" +filename *Filenames__from_string(pathname *F, char *path) { + int i = 0, pos = 0; + for (; path[i]; i++) + if (path[i] == FOLDER_SEPARATOR) + pos = i; + pathname *at = NULL; + if (pos > 0) at = Pathnames__primitive(path, 0, pos, NULL); + if (pos+1 < i) return Filenames__in_folder(at, path+pos+1); + internal_error("empty leafname"); + return NULL; +} + +#line 67 "inform7/Chapter 3/Filenames.w" +void Filenames__to_string(char *to, filename *F) { + to[0] = 0; + Pathnames__to_string(to, F->pathname_of_location); + int pos = Platform__strlen(to); + if (pos + 1 + Platform__strlen(F->leafname) + 1 > MAX_FILENAME_LENGTH) + Problems__Fatal__issue_t("a filename grew too long", to); + to[pos] = FOLDER_SEPARATOR; + strcpy(to+pos+1, F->leafname); +} + +#line 80 "inform7/Chapter 3/Filenames.w" +void Filenames__to_string_relative(char *to, filename *F, pathname *P) { + char ft[MAX_FILENAME_LENGTH], pt[MAX_FILENAME_LENGTH]; + Filenames__to_string(ft, F); + Pathnames__to_string(pt, P); + int n = Platform__strlen(pt); + if ((strncmp(ft, pt, (size_t) n)==0) && (ft[n]==FOLDER_SEPARATOR)) + strcpy(to, ft+n+1); + else { + LOG("Filename: %s\nPathname: %s\n", ft, pt); + internal_error("filename not relative to pathname"); + } +} + +#line 96 "inform7/Chapter 3/Filenames.w" +char *Filenames__get_leafname(filename *F) { + if (F == NULL) return ""; + return F->leafname; +} + +#line 85 "inform7/Chapter 3/Where Everything Lives.w" +int Locations__command_line_setting(char *option, char *arg) { + if (option == NULL) { + if (filename_of_i7_source) return FALSE; + char temp[MAX_FILENAME_LENGTH]; + Platform__truncated_locale_arg(arg, temp, MAX_FILENAME_LENGTH); + filename_of_i7_source = Filenames__in_folder(NULL, temp); + return TRUE; + } + + pathname **PP = NULL; + if (strcmp("-project", option) == 0) PP = &pathname_of_project; + if (strcmp("-internal", option) == 0) PP = &(pathname_of_area[INTERNAL_FS_AREA]); + if (strcmp("-external", option) == 0) PP = &(pathname_of_area[EXTERNAL_FS_AREA]); + if (strcmp("-transient", option) == 0) PP = &pathname_of_transient_external_resources; + if (PP) { + char temp[MAX_FILENAME_LENGTH]; + Platform__truncated_locale_arg(arg, temp, MAX_FILENAME_LENGTH); + *PP = Pathnames__from_string(temp); + return TRUE; + } + + return FALSE; +} + +#line 120 "inform7/Chapter 3/Where Everything Lives.w" +int Locations__set_defaults(int census_mode) { + +{ +#line 151 "inform7/Chapter 3/Where Everything Lives.w" + if (pathname_of_area[INTERNAL_FS_AREA] == NULL) + Problems__Fatal__issue("Did not set -internal when calling"); + + Locations__EILT_at(INTERNAL_FS_AREA, pathname_of_area[INTERNAL_FS_AREA]); + + +{ +#line 168 "inform7/Chapter 3/Where Everything Lives.w" + pathname *misc = Pathnames__subfolder(pathname_of_area[INTERNAL_FS_AREA], "Miscellany"); + + filename_of_cblorb_report_model = Filenames__in_folder(misc, "CblorbModel.html"); + filename_of_large_default_cover_art = Filenames__in_folder(misc, "Cover.jpg"); + filename_of_small_default_cover_art = Filenames__in_folder(misc, "Small Cover.jpg"); + filename_of_intro_postcard = Filenames__in_folder(misc, "Postcard.pdf"); + filename_of_intro_booklet = Filenames__in_folder(misc, "IntroductionToIF.pdf"); + + filename_of_extensions_documentation_model = Filenames__in_folder(misc, EXTENSIONS_MODEL_HTML); + filename_of_extension_file_documentation_model = Filenames__in_folder(misc, EXTENSION_FILE_MODEL_HTML); + filename_of_documentation_snippets = Filenames__in_folder(misc, "definitions.html"); + +} +#line 156 "inform7/Chapter 3/Where Everything Lives.w" +; + +} +#line 121 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 201 "inform7/Chapter 3/Where Everything Lives.w" + if (pathname_of_area[EXTERNAL_FS_AREA] == NULL) { + pathname_of_area[EXTERNAL_FS_AREA] = home_path; + char *subfolder_within = INFORM_FOLDER_RELATIVE_TO_HOME; + if (subfolder_within[0]) + pathname_of_area[EXTERNAL_FS_AREA] = + Pathnames__subfolder(home_path, INFORM_FOLDER_RELATIVE_TO_HOME); + pathname_of_area[EXTERNAL_FS_AREA] = + Pathnames__subfolder(pathname_of_area[EXTERNAL_FS_AREA], "Inform"); + } + if (Pathnames__create_in_file_system(pathname_of_area[EXTERNAL_FS_AREA]) == 0) return FALSE; + +{ +#line 228 "inform7/Chapter 3/Where Everything Lives.w" + Locations__EILT_at(EXTERNAL_FS_AREA, pathname_of_area[EXTERNAL_FS_AREA]); + filename_of_options = + Filenames__in_folder(pathname_of_area[EXTERNAL_FS_AREA], "Options.txt"); + +} +#line 211 "inform7/Chapter 3/Where Everything Lives.w" +; + + if (pathname_of_transient_external_resources == NULL) + pathname_of_transient_external_resources = + pathname_of_area[EXTERNAL_FS_AREA]; + if (Pathnames__create_in_file_system(pathname_of_transient_external_resources) == 0) return FALSE; + +{ +#line 235 "inform7/Chapter 3/Where Everything Lives.w" + +{ +#line 245 "inform7/Chapter 3/Where Everything Lives.w" + pathname_of_extension_docs = + Pathnames__subfolder(pathname_of_transient_external_resources, "Documentation"); + if (Pathnames__create_in_file_system(pathname_of_extension_docs) == 0) return FALSE; + + pathname_of_transient_census_data = + Pathnames__subfolder(pathname_of_extension_docs, "Census"); + if (Pathnames__create_in_file_system(pathname_of_transient_census_data) == 0) return FALSE; + filename_of_extensions_census_errors = + Filenames__in_folder(pathname_of_transient_census_data, "CensusErrors.txt"); + filename_of_extensions_dictionary = + Filenames__in_folder(pathname_of_transient_census_data, "Dictionary.txt"); + + pathname_of_extension_docs_inner = + Pathnames__subfolder(pathname_of_extension_docs, "Extensions"); + if (Pathnames__create_in_file_system(pathname_of_extension_docs_inner) == 0) return FALSE; + +} +#line 235 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 267 "inform7/Chapter 3/Where Everything Lives.w" + pathname *pathname_of_telemetry_data = + Pathnames__subfolder(pathname_of_transient_external_resources, "Telemetry"); + if (Pathnames__create_in_file_system(pathname_of_telemetry_data) == 0) return FALSE; + char leafname_of_telemetry[MAX_FILENAME_LENGTH]; + int this_month = the_present->tm_mon + 1; + int this_day = the_present->tm_mday; + int this_year = the_present->tm_year + 1900; + sprintf(leafname_of_telemetry, + "Telemetry %04d-%02d-%02d.txt", this_year, this_month, this_day); + filename_of_telemetry = + Filenames__in_folder(pathname_of_telemetry_data, leafname_of_telemetry); + +} +#line 236 "inform7/Chapter 3/Where Everything Lives.w" +; + +} +#line 217 "inform7/Chapter 3/Where Everything Lives.w" +; + +} +#line 122 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 293 "inform7/Chapter 3/Where Everything Lives.w" + +{ +#line 308 "inform7/Chapter 3/Where Everything Lives.w" + if (filename_of_i7_source == NULL) + if (pathname_of_project) + filename_of_i7_source = + Filenames__in_folder( + Pathnames__subfolder(pathname_of_project, "Source"), + "story.ni"); + +} +#line 293 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 331 "inform7/Chapter 3/Where Everything Lives.w" + pathname *build_folder = pathname_of_transient_census_data; + + if (census_mode == FALSE) { + build_folder = Pathnames__subfolder(pathname_of_project, "Build"); + if (Pathnames__create_in_file_system(build_folder) == 0) return FALSE; + } + + filename_of_report = Filenames__in_folder(build_folder, "Problems.html"); + filename_of_debugging_log = Filenames__in_folder(build_folder, "Debug log.txt"); + + filename_of_compiled_i6_code = Filenames__in_folder(build_folder, "auto.inf"); + + char story_file_leafname[128]; + sprintf(story_file_leafname, "output.%s", story_filename_extension); + filename_of_story_file = Filenames__in_folder(build_folder, story_file_leafname); + + filename_of_cblorb_report = Filenames__in_folder(build_folder, "StatusCblorb.html"); + +} +#line 294 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 359 "inform7/Chapter 3/Where Everything Lives.w" + pathname_of_project_index_folder = + Pathnames__subfolder(pathname_of_project, "Index"); + pathname_of_project_index_details_folder = + Pathnames__subfolder(pathname_of_project_index_folder, "Details"); + + if (census_mode == FALSE) + if ((Pathnames__create_in_file_system(pathname_of_project_index_folder) == 0) || + (Pathnames__create_in_file_system(pathname_of_project_index_details_folder) == 0)) + return FALSE; + + filename_of_headings = + Filenames__in_folder(pathname_of_project_index_folder, "Headings.xml"); + +} +#line 295 "inform7/Chapter 3/Where Everything Lives.w" +; + + filename_of_uuid = Filenames__in_folder(pathname_of_project, "uuid.txt"); + + filename_of_ifiction_record = Filenames__in_folder(pathname_of_project, "Metadata.iFiction"); + filename_of_manifest = Filenames__in_folder(pathname_of_project, "manifest.plist"); + filename_of_blurb = Filenames__in_folder(pathname_of_project, "Release.blurb"); + +} +#line 123 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 379 "inform7/Chapter 3/Where Everything Lives.w" + if (pathname_of_project) { + char mf[MAX_FILENAME_LENGTH + 10]; + strcpy(mf, pathname_of_project->intermediate); + int i = Platform__strlen(mf)-1; + while ((i>0) && (mf[i] != '.')) i--; + if (i>0) strcpy(mf+i, ".materials"); + pathname_of_area[MATERIALS_FS_AREA] = + Pathnames__subfolder(pathname_of_project->pathname_of_parent, mf); + if (Pathnames__create_in_file_system(pathname_of_area[MATERIALS_FS_AREA]) == 0) return FALSE; + } else { + pathname_of_area[MATERIALS_FS_AREA] = Pathnames__from_string("inform.materials"); + } + + Locations__EILT_at(MATERIALS_FS_AREA, pathname_of_area[MATERIALS_FS_AREA]); + + +{ +#line 408 "inform7/Chapter 3/Where Everything Lives.w" + pathname_of_materials_figures = Pathnames__subfolder(pathname_of_area[MATERIALS_FS_AREA], "Figures"); + pathname_of_materials_sounds = Pathnames__subfolder(pathname_of_area[MATERIALS_FS_AREA], "Sounds"); + + filename_of_large_cover_art_jpeg = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], "Cover.jpg"); + filename_of_large_cover_art_png = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], "Cover.png"); + filename_of_small_cover_art_jpeg = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], "Small Cover.jpg"); + filename_of_small_cover_art_png = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], "Small Cover.png"); + + filename_of_epsfile = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], "Inform Map.eps"); + +} +#line 394 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 424 "inform7/Chapter 3/Where Everything Lives.w" + pathname_of_materials_release = Pathnames__subfolder(pathname_of_area[MATERIALS_FS_AREA], "Release"); + pathname_of_released_interpreter = Pathnames__subfolder(pathname_of_materials_release, "interpreter"); + pathname_of_released_figures = Pathnames__subfolder(pathname_of_materials_release, "Figures"); + pathname_of_released_sounds = Pathnames__subfolder(pathname_of_materials_release, "Sounds"); + +} +#line 395 "inform7/Chapter 3/Where Everything Lives.w" +; + +{ +#line 435 "inform7/Chapter 3/Where Everything Lives.w" + char leaf[MAX_FILENAME_LENGTH]; + sprintf(leaf, "story.%s", story_filename_extension); + filename_of_existing_story_file = Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], leaf); + +} +#line 396 "inform7/Chapter 3/Where Everything Lives.w" +; + +} +#line 124 "inform7/Chapter 3/Where Everything Lives.w" +; + if ((census_mode == FALSE) && (filename_of_i7_source == NULL)) + Problems__Fatal__issue("Except in census mode, source text must be supplied"); + if ((census_mode) && (filename_of_i7_source)) + Problems__Fatal__issue("In census mode, no source text may be supplied"); + return TRUE; +} + +#line 445 "inform7/Chapter 3/Where Everything Lives.w" +void Locations__EILT_at(int area, pathname *P) { + pathname_of_extensions[area] = Pathnames__subfolder(P, "Extensions"); + pathname_of_i6t_files[area] = Pathnames__subfolder(P, "I6T"); + pathname_of_languages[area] = Pathnames__subfolder(P, "Languages"); + pathname_of_website_templates[area] = Pathnames__subfolder(P, "Templates"); +} + +#line 469 "inform7/Chapter 3/Where Everything Lives.w" +filename *Locations__of_extension(pathname *E, char *title, char *author, int i7x_flag) { + char leaf[MAX_FILENAME_LENGTH + 4]; + if (i7x_flag) sprintf(leaf, "%s.i7x", title); + else sprintf(leaf, "%s", title); + return Filenames__in_folder(Pathnames__subfolder(E, author), leaf); +} + +#line 479 "inform7/Chapter 3/Where Everything Lives.w" +filename *Locations__of_extension_documentation(char *title, char *author) { + char leaf[MAX_FILENAME_LENGTH + 5]; + sprintf(leaf, "%s.html", title); + return Filenames__in_folder( + Pathnames__subfolder(pathname_of_extension_docs_inner, author), leaf); +} + +#line 493 "inform7/Chapter 3/Where Everything Lives.w" +filename *Locations__in_index(char *leafname, int sub) { + if (pathname_of_project == NULL) return Filenames__in_folder(NULL, leafname); + if (sub >= 0) { + char full_leafname[MAX_FILENAME_LENGTH+16]; + sprintf(full_leafname, "%d_%s", sub, leafname); + return Filenames__in_folder(pathname_of_project_index_details_folder, full_leafname); + } else { + return Filenames__in_folder(pathname_of_project_index_folder, leafname); + } +} + #line 49 "inform7/Chapter 3/Case-Insensitive Filenames.w" #ifdef POSIX_DIRECTORY_HANDLING @@ -17547,20 +18008,26 @@ int SoundFiles__get_MIDI_information(FILE *pFile, unsigned int *pType, #line 104 "inform7/Chapter 4/HTML Files.w" void HTML__html_source_link(OUTPUT_STREAM, source_location sl, int nonbreaking_space) { if (sl.file_of_origin) { - char *filename = SourceFiles__get_filename(sl.file_of_origin); - if (bundle_name && (strncmp(filename, bundle_name, (size_t) Platform__strlen(bundle_name)) == 0)) - filename += Platform__strlen(bundle_name) + 1; - if ((strncmp(filename, "Source", 6)==0) && (filename[6]==FOLDER_SEPARATOR)) - filename += 7; + char filename_buffer[MAX_FILENAME_LENGTH]; + Filenames__to_string(filename_buffer, SourceFiles__get_filename(sl.file_of_origin)); + char *fn = filename_buffer; + if (pathname_of_project) { + char bundle_name[MAX_FILENAME_LENGTH]; + Pathnames__to_string(bundle_name, pathname_of_project); + if (strncmp(fn, bundle_name, (size_t) Platform__strlen(bundle_name)) == 0) + fn += Platform__strlen(bundle_name) + 1; + } + if ((strncmp(fn, "Source", 6)==0) && (fn[6]==FOLDER_SEPARATOR)) + fn += 7; if (nonbreaking_space) WRITE(" "); else WRITE(" "); WRITE("", - filename, sl.line_number, ICON_EXT); + fn, sl.line_number, ICON_EXT); } } -#line 118 "inform7/Chapter 4/HTML Files.w" +#line 124 "inform7/Chapter 4/HTML Files.w" -#line 125 "inform7/Chapter 4/HTML Files.w" +#line 131 "inform7/Chapter 4/HTML Files.w" void HTML__html_icon_with_tooltip(OUTPUT_STREAM, char *icon_name, char *tip, char *tip2) { WRITE(""); } -#line 180 "inform7/Chapter 4/HTML Files.w" +#line 185 "inform7/Chapter 4/HTML Files.w" int outcome_image_style = SIDE_OUTCOME_IMAGE_STYLE; void HTML__html_outcome_image(OUTPUT_STREAM, char *image, char *verdict) { @@ -17630,7 +18097,7 @@ void HTML__outcome_image_tail(OUTPUT_STREAM) { } } -#line 250 "inform7/Chapter 4/HTML Files.w" +#line 255 "inform7/Chapter 4/HTML Files.w" void HTML__html_header(OUTPUT_STREAM, char *title, char *thumbnail, char *caption) { WRITE("\n"); @@ -17738,6 +18205,10 @@ void HTML__html_header(OUTPUT_STREAM, char *title, char *thumbnail, char *captio OUTDENT; WRITE("-->\n"); OUTDENT; WRITE("\n"); WRITE("\n"); - } + #endif WRITE("\n", DEFAULT_HTML_FONT); WRITE("\n"); if (thumbnail) { @@ -17815,7 +18286,7 @@ void HTML__html_footer(OUTPUT_STREAM) { WRITE(""); } -#line 437 "inform7/Chapter 4/HTML Files.w" +#line 446 "inform7/Chapter 4/HTML Files.w" void HTML__open_para(OUTPUT_STREAM, int depth, char *class) { int margin = depth; if (margin < 1) internal_error("minimal HTML indentation is 1"); @@ -17824,7 +18295,7 @@ void HTML__open_para(OUTPUT_STREAM, int depth, char *class) { while (depth > 9) { depth--; WRITE("    "); } } -#line 448 "inform7/Chapter 4/HTML Files.w" +#line 457 "inform7/Chapter 4/HTML Files.w" void HTML__test_html_paragraphs(void) { int k; char *text = "Jackdaws love my big sphinx of quartz, " @@ -17840,7 +18311,7 @@ void HTML__test_html_paragraphs(void) { } } -#line 492 "inform7/Chapter 4/HTML Files.w" +#line 501 "inform7/Chapter 4/HTML Files.w" char source_ref_paraphrase[MAX_SOURCE_REF_LENGTH]; /* field 1 */ char source_ref_filename[MAX_SOURCE_REF_LENGTH]; /* field 2 */ char source_ref_line[MAX_SOURCE_REF_LENGTH]; /* field 3 */ @@ -17891,7 +18362,7 @@ void HTML__html_char_out(OUTPUT_STREAM, char c) { } } -#line 546 "inform7/Chapter 4/HTML Files.w" +#line 555 "inform7/Chapter 4/HTML Files.w" void HTML__begin_plain_html_table(OUTPUT_STREAM) { HTML__begin_html_table(OUT, NULL, FALSE, 0, 0, 0, 0, 0); } @@ -17900,7 +18371,7 @@ void HTML__begin_wide_html_table(OUTPUT_STREAM) { HTML__begin_html_table(OUT, NULL, TRUE, 0, 0, 0, 0, 0); } -#line 559 "inform7/Chapter 4/HTML Files.w" +#line 568 "inform7/Chapter 4/HTML Files.w" void HTML__begin_html_table(OUTPUT_STREAM, char *colour, int full_width, int border, int cellspacing, int cellpadding, int height, int width) { WRITE(""); } -#line 667 "inform7/Chapter 4/HTML Files.w" +#line 676 "inform7/Chapter 4/HTML Files.w" void HTML__open_coloured_box(OUTPUT_STREAM, char *html_colour, int rounding) { WRITE("
", html_colour); @@ -18033,7 +18504,7 @@ void HTML__box_corner(OUTPUT_STREAM, char *html_colour, char *corner) { CORNER_SIZE, CORNER_SIZE); } -#line 702 "inform7/Chapter 4/HTML Files.w" +#line 711 "inform7/Chapter 4/HTML Files.w" void HTML__write_xml_safe_text(OUTPUT_STREAM, char *txt) { int i, charcode; for (i=0; txt[i]; i++) { @@ -18049,13 +18520,13 @@ void HTML__write_xml_safe_text(OUTPUT_STREAM, char *txt) { } } -#line 726 "inform7/Chapter 4/HTML Files.w" +#line 735 "inform7/Chapter 4/HTML Files.w" void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { if (p == NULL) return; if (TEST_COMPILATION_MODE(COMPILE_TEXT_TO_XML_CMODE)) { -#line 743 "inform7/Chapter 4/HTML Files.w" +#line 752 "inform7/Chapter 4/HTML Files.w" int i = 0, i2 = Platform__strlen(p)-1, snl, wsc, charcode; if ((p[0] == '"') && (p[i2] == '"')) { i++; i2--; } /* omit surrounding double-quotes */ while (HTML__is_babel_whitespace(p[i])) i++; /* omit leading whitespace */ @@ -18099,12 +18570,12 @@ void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { return; } -#line 729 "inform7/Chapter 4/HTML Files.w" +#line 738 "inform7/Chapter 4/HTML Files.w" ; if (TEST_COMPILATION_MODE(TRUNCATE_TEXT_CMODE)) { -#line 871 "inform7/Chapter 4/HTML Files.w" +#line 880 "inform7/Chapter 4/HTML Files.w" int i, pos = STREAM_EXTENT(OUT), whitespace_count=0, black_chars_written = 0, charcode; if (p[0] == '"') p++; for (i=0; p[i]; i++) { @@ -18122,11 +18593,11 @@ void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { charcode = (int) (((unsigned char *)p)[i]); { -#line 904 "inform7/Chapter 4/HTML Files.w" +#line 913 "inform7/Chapter 4/HTML Files.w" charcode = HTML__iso_remove_accents(charcode); } -#line 886 "inform7/Chapter 4/HTML Files.w" +#line 895 "inform7/Chapter 4/HTML Files.w" ; whitespace_count = 0; if (charcode < 128) { @@ -18139,12 +18610,12 @@ void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { return; } -#line 731 "inform7/Chapter 4/HTML Files.w" +#line 740 "inform7/Chapter 4/HTML Files.w" ; if (TEST_COMPILATION_MODE(COMPILE_TEXT_TO_I6_CMODE)) { -#line 826 "inform7/Chapter 4/HTML Files.w" +#line 835 "inform7/Chapter 4/HTML Files.w" int i, whitespace_count=0, charcode; if (p[0] == '"') p++; for (i=0; p[i]; i++) { @@ -18169,11 +18640,11 @@ void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { return; } -#line 733 "inform7/Chapter 4/HTML Files.w" +#line 742 "inform7/Chapter 4/HTML Files.w" { -#line 789 "inform7/Chapter 4/HTML Files.w" +#line 798 "inform7/Chapter 4/HTML Files.w" int i, whitespace_count=0, charcode; if (p[0] == '"') p++; for (i=0; p[i]; i++) { @@ -18208,11 +18679,11 @@ void HTML__compile_bibliographic_text(OUTPUT_STREAM, char *p) { return; } -#line 734 "inform7/Chapter 4/HTML Files.w" +#line 743 "inform7/Chapter 4/HTML Files.w" ; } -#line 910 "inform7/Chapter 4/HTML Files.w" +#line 919 "inform7/Chapter 4/HTML Files.w" int HTML__iso_remove_accents(int charcode) { if (charcode<0) charcode += 256; /* in case |char| is signed */ switch (charcode) { @@ -18243,7 +18714,7 @@ int HTML__iso_remove_accents(int charcode) { return charcode; } -#line 945 "inform7/Chapter 4/HTML Files.w" +#line 954 "inform7/Chapter 4/HTML Files.w" int HTML__combining_accent(int accent, int letter) { switch(accent) { case 0x0300: /* Unicode combining grave */ @@ -18293,7 +18764,7 @@ int HTML__combining_accent(int accent, int letter) { return '?'; } -#line 998 "inform7/Chapter 4/HTML Files.w" +#line 1007 "inform7/Chapter 4/HTML Files.w" int HTML__without_accent(int letter) { switch(letter) { case 0xE0: return 'a'; case 0xE8: return 'e'; case 0xEC: return 'i'; @@ -18317,14 +18788,14 @@ int HTML__without_accent(int letter) { return letter; } -#line 1026 "inform7/Chapter 4/HTML Files.w" +#line 1035 "inform7/Chapter 4/HTML Files.w" int HTML__is_babel_whitespace(char c) { if ((c == ' ') || (c == '\t') || (c == '\x0a') || (c == '\x0d') || (c == NEWLINE_IN_STRING)) return TRUE; return FALSE; } -#line 1040 "inform7/Chapter 4/HTML Files.w" +#line 1049 "inform7/Chapter 4/HTML Files.w" colour_translation table_of_translations[] = { { "Alice Blue", "F0F8FF" }, @@ -18473,7 +18944,7 @@ colour_translation table_of_translations[] = { { "", "" } }; -#line 1192 "inform7/Chapter 4/HTML Files.w" +#line 1201 "inform7/Chapter 4/HTML Files.w" char *HTML__translate_colour_name(char *original) { int j; for (j=0; strcmp(table_of_translations[j].chip_name, ""); j++) @@ -18482,75 +18953,63 @@ char *HTML__translate_colour_name(char *original) { return NULL; } -#line 96 "inform7/Chapter 4/Javascript Pastes.w" +#line 92 "inform7/Chapter 4/Javascript Pastes.w" int javascript_fn_counter = 1000; void HTML__Javascript__paste(OUTPUT_STREAM, int from, int to, char *alt_text) { - switch(JAVASCRIPT_MODEL) { - case 1: /* OS X style, with long function arguments allowed in links */ - WRITE(""); - break; - case 2: /* Windows style, with long function arguments in links unreliable */ - WRITE("\n"); - WRITE("" - "", - javascript_fn_counter++); - break; - } + #ifdef JAVASCRIPT_MODEL_1 /* OS X style, with long function arguments allowed in links */ + WRITE(""); + #endif + + #ifdef JAVASCRIPT_MODEL_2 /* Windows style, with long function arguments in links unreliable */ + WRITE("\n"); + WRITE("" + "", + javascript_fn_counter++); + #endif } -#line 124 "inform7/Chapter 4/Javascript Pastes.w" -void HTML__Javascript__open_file(OUTPUT_STREAM, - char *path1, char *path2, char *contents) { - int i; - switch(JAVASCRIPT_MODEL) { - case 1: - if (path2) - WRITE("" - "%s", path1, FOLDER_SEPARATOR, path2, contents); - else - WRITE("" - "%s", path1, contents); - break; - case 2: - WRITE("%s", contents); - break; - } +#line 120 "inform7/Chapter 4/Javascript Pastes.w" +void HTML__Javascript__open_file(OUTPUT_STREAM, pathname *P, char *leaf, char *contents) { + char fn[MAX_FILENAME_LENGTH]; + if (leaf) Filenames__to_string(fn, Filenames__in_folder(P, leaf)); + else Pathnames__to_string(fn, P); + + #ifdef JAVASCRIPT_MODEL_2 + for (int i=0; fn[i]; i++) + if (fn[i] == '\\') + fn[i] = '/'; + #endif + + WRITE("%s", + fn, contents); } -#line 157 "inform7/Chapter 4/Javascript Pastes.w" +#line 142 "inform7/Chapter 4/Javascript Pastes.w" void HTML__Javascript__javascript_string_out(OUTPUT_STREAM, int from, int to, char *C_string) { WRITE("'"); if (C_string) { -#line 167 "inform7/Chapter 4/Javascript Pastes.w" +#line 152 "inform7/Chapter 4/Javascript Pastes.w" int i; for (i=0; C_string[i]; i++) HTML__Javascript__javascript_char_out(OUT, C_string[i]); } -#line 159 "inform7/Chapter 4/Javascript Pastes.w" +#line 144 "inform7/Chapter 4/Javascript Pastes.w" ; if (from >= 0) { -#line 194 "inform7/Chapter 4/Javascript Pastes.w" +#line 179 "inform7/Chapter 4/Javascript Pastes.w" int i, suppress_space = FALSE, follows_paragraph_break = FALSE; int close_I6_position = -1; for (i=from; i<=to; i++) { @@ -18578,7 +19037,7 @@ void HTML__Javascript__javascript_string_out(OUTPUT_STREAM, int from, int to, ch if (suppress_space==FALSE) { -#line 232 "inform7/Chapter 4/Javascript Pastes.w" +#line 217 "inform7/Chapter 4/Javascript Pastes.w" if ((i>from) && ((p[1] != 0) || (Lexer__is_punctuation(p[0]) == FALSE) || (p[0] == '(') || (p[0] == '{') || (p[0] == '}')) @@ -18586,13 +19045,13 @@ void HTML__Javascript__javascript_string_out(OUTPUT_STREAM, int from, int to, ch HTML__Javascript__javascript_char_out(OUT, ' '); } -#line 219 "inform7/Chapter 4/Javascript Pastes.w" +#line 204 "inform7/Chapter 4/Javascript Pastes.w" ; suppress_space = FALSE; for (j=0; p[j]; j++) HTML__Javascript__javascript_char_out(OUT, p[j]); { -#line 247 "inform7/Chapter 4/Javascript Pastes.w" +#line 232 "inform7/Chapter 4/Javascript Pastes.w" if (Lexer__word(i) == OPENI6_V) close_I6_position = i+1; if (close_I6_position == i) { HTML__Javascript__javascript_char_out(OUT, '-'); @@ -18601,19 +19060,19 @@ void HTML__Javascript__javascript_string_out(OUTPUT_STREAM, int from, int to, ch } } -#line 222 "inform7/Chapter 4/Javascript Pastes.w" +#line 207 "inform7/Chapter 4/Javascript Pastes.w" ; } HTML__Javascript__javascript_char_out(OUT, '\n'); HTML__Javascript__javascript_char_out(OUT, '\n'); } -#line 160 "inform7/Chapter 4/Javascript Pastes.w" +#line 145 "inform7/Chapter 4/Javascript Pastes.w" ; WRITE("'"); } -#line 262 "inform7/Chapter 4/Javascript Pastes.w" +#line 247 "inform7/Chapter 4/Javascript Pastes.w" void HTML__Javascript__javascript_char_out(OUTPUT_STREAM, char c) { switch(c) { case '\t': WRITE("[=0x0009=]"); return; @@ -18927,7 +19386,7 @@ int HTML__Documentation__set_body_text(int w1, int w2, OUTPUT_STREAM, #line 461 "inform7/Chapter 4/HTML Documentation.w" ; WRITE("
%c
", 'A' + example_count - 1); WRITE(""); @@ -19202,10 +19661,10 @@ void Index__new_segment(char *abb, char *title, char *explanation) { int index_file_counter = 0; void Index__open_file(char *index_leaf, char *title, int sub, char *explanation) { - char *fn = Filenames__index(index_leaf, sub); + filename *F = Locations__in_index(index_leaf, sub); if (ifl) Index__close_index_file(); - if (STREAM_OPEN_TO_FILE(&index_file_struct, fn, UTF8_ENC) == FALSE) - Problems__Fatal__issue2("Can't open index file", fn); + if (STREAM_OPEN_TO_FILE(&index_file_struct, F, UTF8_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open index file", F); ifl = &index_file_struct; @@ -20106,16 +20565,12 @@ void Index__DocReferences__doc_fragment_to(OUTPUT_STREAM, char *fn) { { #line 247 "inform7/Chapter 5/Documentation References.w" - char path_to_fragments[MAX_FILENAME_LENGTH]; - sprintf(path_to_fragments, "%s%cReserved%cdefinitions.html", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - if (Folders__verify_library_folder("Inform", "Extensions", NULL, "Reserved")) { - FILE *FRAGMENTS = Platform__iso_fopen(path_to_fragments, "r"); - if (FRAGMENTS) { - char *p = Memory__I7_malloc(MAX_EXTENT_OF_FRAGMENTS, DOC_FRAGMENT_MREASON); - + FILE *FRAGMENTS = Platform__iso_fopen(filename_of_documentation_snippets, "r"); + if (FRAGMENTS) { + char *p = Memory__I7_malloc(MAX_EXTENT_OF_FRAGMENTS, DOC_FRAGMENT_MREASON); + { -#line 263 "inform7/Chapter 5/Documentation References.w" +#line 258 "inform7/Chapter 5/Documentation References.w" int i = 0; p[0] = 0; while (TRUE) { @@ -20128,11 +20583,11 @@ void Index__DocReferences__doc_fragment_to(OUTPUT_STREAM, char *fn) { } } -#line 254 "inform7/Chapter 5/Documentation References.w" +#line 250 "inform7/Chapter 5/Documentation References.w" ; - + { -#line 277 "inform7/Chapter 5/Documentation References.w" +#line 272 "inform7/Chapter 5/Documentation References.w" int i = 0; documentation_ref *tracking = NULL; for (i=0; p[i]; i++) { @@ -20155,10 +20610,9 @@ void Index__DocReferences__doc_fragment_to(OUTPUT_STREAM, char *fn) { } } -#line 255 "inform7/Chapter 5/Documentation References.w" +#line 251 "inform7/Chapter 5/Documentation References.w" ; - fclose(FRAGMENTS); - } + fclose(FRAGMENTS); } } @@ -20174,7 +20628,7 @@ void Index__DocReferences__doc_fragment_to(OUTPUT_STREAM, char *fn) { } } -#line 302 "inform7/Chapter 5/Documentation References.w" +#line 297 "inform7/Chapter 5/Documentation References.w" documentation_ref *Index__DocReferences__name_to_dr(char *fn) { documentation_ref *dr; LOOP_OVER(dr, documentation_ref) @@ -20182,7 +20636,7 @@ documentation_ref *Index__DocReferences__name_to_dr(char *fn) { return dr; { -#line 314 "inform7/Chapter 5/Documentation References.w" +#line 309 "inform7/Chapter 5/Documentation References.w" if (problem_count == 0) { LOG("Bad ref was <%s>. Known references are:\n", fn); LOOP_OVER(dr, documentation_ref) { @@ -20192,7 +20646,7 @@ documentation_ref *Index__DocReferences__name_to_dr(char *fn) { } } -#line 307 "inform7/Chapter 5/Documentation References.w" +#line 302 "inform7/Chapter 5/Documentation References.w" ; return NULL; } @@ -20900,14 +21354,20 @@ void Problems__Fatal__issue(char *message) { exit(2); } -void Problems__Fatal__issue2(char *message, char *fn) { +void Problems__Fatal__issue_t(char *message, char *fn) { STREAM_WRITE(STDERR, message); STREAM_WRITE(STDERR, "\nOffending filename: <%s>\n", fn); STREAM_FLUSH(STDERR); exit(2); } -#line 33 "inform7/Chapter 6/Problems, Level 0.w" +void Problems__Fatal__filename_related(char *message, filename *F) { + char fn[MAX_FILENAME_LENGTH]; + Filenames__to_string(fn, F); + Problems__Fatal__issue_t(message, fn); +} + +#line 39 "inform7/Chapter 6/Problems, Level 0.w" int crash_on_all_errors = FALSE; int crash_on_internal_errors = FALSE; @@ -20939,29 +21399,35 @@ void Problems__Buffer__redirect_problem_sentence(parse_node *from, parse_node *A #line 53 "inform7/Chapter 6/Problems, Level 1.w" void Problems__Buffer__copy_source_reference_into_problem_buffer(int w1, int w2) { - char *filename, *paraphrase; + char *paraphrase; if (w1 < 0) { sprintf(PBUFF, ""); return; } source_file *referred = Lexer__file_of_origin(w1); + char *fn = "(no file)"; + char filename_buffer[MAX_FILENAME_LENGTH]; if (referred) { - filename = SourceFiles__get_filename(referred); - if (bundle_name && - (strncmp(filename, bundle_name, (size_t) Platform__strlen(bundle_name)) == 0)) - filename += Platform__strlen(bundle_name) + 1; - } else filename = "(no file)"; + Filenames__to_string(filename_buffer, SourceFiles__get_filename(referred)); + fn = filename_buffer; + if (pathname_of_project) { + char bundle_name[MAX_FILENAME_LENGTH]; + Pathnames__to_string(bundle_name, pathname_of_project); + if (strncmp(fn, bundle_name, (size_t) Platform__strlen(bundle_name)) == 0) + fn += Platform__strlen(bundle_name) + 1; + } + } else fn = "(no file)"; sprintf(PBUFF, "'"); Problems__Buffer__copy_text_into_problem_buffer(w1, w2); paraphrase = "source text"; extension_file *ef = SourceFiles__get_extension_corresponding(referred); if (ef) { extension_identifier *eid = Extensions__Files__get_eid(ef); - paraphrase = filename; + paraphrase = fn; if (eid) { if (Extensions__IDs__is_standard_rules(eid)) paraphrase = "the Standard Rules"; } } sprintf(PBUFF, "' %c%s%c%s%c%d%c", SOURCE_REF_CHAR, paraphrase, - SOURCE_REF_CHAR, filename, + SOURCE_REF_CHAR, fn, SOURCE_REF_CHAR, Lexer__word_location(w1).line_number, SOURCE_REF_CHAR); if ((redirected_sentence) && @@ -20979,13 +21445,13 @@ void Problems__Buffer__copy_source_reference_into_problem_buffer(int w1, int w2) } } -#line 99 "inform7/Chapter 6/Problems, Level 1.w" +#line 105 "inform7/Chapter 6/Problems, Level 1.w" int Problems__Buffer__is_problem_buffer_whitespace(char c) { if ((c == ' ') || (c == '\t') || (c == '\n')) return TRUE; return FALSE; } -#line 113 "inform7/Chapter 6/Problems, Level 1.w" +#line 119 "inform7/Chapter 6/Problems, Level 1.w" int problem_count_at_last_in = 1; void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) { @@ -20996,7 +21462,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) char c = problem_buffer[i]; { -#line 140 "inform7/Chapter 6/Problems, Level 1.w" +#line 146 "inform7/Chapter 6/Problems, Level 1.w" if ((html_flag) && (problem_buffer[i] == '>') && (problem_buffer[i+1] == '-') && @@ -21041,11 +21507,11 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 121 "inform7/Chapter 6/Problems, Level 1.w" +#line 127 "inform7/Chapter 6/Problems, Level 1.w" ; { -#line 189 "inform7/Chapter 6/Problems, Level 1.w" +#line 195 "inform7/Chapter 6/Problems, Level 1.w" if (problem_buffer[i] == '<') { int j = i+1, ch = 0; char tag_identity[32]; while ((problem_buffer[j]) && (problem_buffer[j] != '>')) { @@ -21069,16 +21535,16 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 122 "inform7/Chapter 6/Problems, Level 1.w" +#line 128 "inform7/Chapter 6/Problems, Level 1.w" ; if ((html_flag == FALSE) && (c == SOURCE_REF_CHAR)) { -#line 228 "inform7/Chapter 6/Problems, Level 1.w" +#line 234 "inform7/Chapter 6/Problems, Level 1.w" WRITE("("); line_width++; while (problem_buffer[++i] != SOURCE_REF_CHAR) { -#line 238 "inform7/Chapter 6/Problems, Level 1.w" +#line 244 "inform7/Chapter 6/Problems, Level 1.w" c = problem_buffer[i]; if (Problems__Buffer__is_problem_buffer_whitespace(c)) { /* this starts a run of whitespace */ int l = i; while (Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) l++; @@ -21087,7 +21553,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) if (html_flag) HTML__html_char_out(OUT, ' '); else { -#line 257 "inform7/Chapter 6/Problems, Level 1.w" +#line 263 "inform7/Chapter 6/Problems, Level 1.w" int word_width = 0; while ((!Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) && (problem_buffer[l] != 0) && (problem_buffer[l] != SOURCE_REF_CHAR)) @@ -21100,7 +21566,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 244 "inform7/Chapter 6/Problems, Level 1.w" +#line 250 "inform7/Chapter 6/Problems, Level 1.w" ; } else { line_width++; @@ -21109,13 +21575,13 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 229 "inform7/Chapter 6/Problems, Level 1.w" +#line 235 "inform7/Chapter 6/Problems, Level 1.w" ; while (problem_buffer[++i] != SOURCE_REF_CHAR) ; WRITE(", line "); line_width += 7; while (problem_buffer[++i] != SOURCE_REF_CHAR) { -#line 238 "inform7/Chapter 6/Problems, Level 1.w" +#line 244 "inform7/Chapter 6/Problems, Level 1.w" c = problem_buffer[i]; if (Problems__Buffer__is_problem_buffer_whitespace(c)) { /* this starts a run of whitespace */ int l = i; while (Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) l++; @@ -21124,7 +21590,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) if (html_flag) HTML__html_char_out(OUT, ' '); else { -#line 257 "inform7/Chapter 6/Problems, Level 1.w" +#line 263 "inform7/Chapter 6/Problems, Level 1.w" int word_width = 0; while ((!Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) && (problem_buffer[l] != 0) && (problem_buffer[l] != SOURCE_REF_CHAR)) @@ -21137,7 +21603,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 244 "inform7/Chapter 6/Problems, Level 1.w" +#line 250 "inform7/Chapter 6/Problems, Level 1.w" ; } else { line_width++; @@ -21146,16 +21612,16 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 232 "inform7/Chapter 6/Problems, Level 1.w" +#line 238 "inform7/Chapter 6/Problems, Level 1.w" ; WRITE(")"); line_width++; } -#line 124 "inform7/Chapter 6/Problems, Level 1.w" +#line 130 "inform7/Chapter 6/Problems, Level 1.w" else { -#line 238 "inform7/Chapter 6/Problems, Level 1.w" +#line 244 "inform7/Chapter 6/Problems, Level 1.w" c = problem_buffer[i]; if (Problems__Buffer__is_problem_buffer_whitespace(c)) { /* this starts a run of whitespace */ int l = i; while (Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) l++; @@ -21164,7 +21630,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) if (html_flag) HTML__html_char_out(OUT, ' '); else { -#line 257 "inform7/Chapter 6/Problems, Level 1.w" +#line 263 "inform7/Chapter 6/Problems, Level 1.w" int word_width = 0; while ((!Problems__Buffer__is_problem_buffer_whitespace(problem_buffer[l])) && (problem_buffer[l] != 0) && (problem_buffer[l] != SOURCE_REF_CHAR)) @@ -21177,7 +21643,7 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 244 "inform7/Chapter 6/Problems, Level 1.w" +#line 250 "inform7/Chapter 6/Problems, Level 1.w" ; } else { line_width++; @@ -21186,14 +21652,14 @@ void Problems__Buffer__output_problem_buffer_to(OUTPUT_STREAM, int indentation) } } -#line 125 "inform7/Chapter 6/Problems, Level 1.w" +#line 131 "inform7/Chapter 6/Problems, Level 1.w" ; } if (html_flag) WRITE("

"); WRITE("\n"); } -#line 274 "inform7/Chapter 6/Problems, Level 1.w" +#line 280 "inform7/Chapter 6/Problems, Level 1.w" int telemetry_recording = FALSE; void Problems__Buffer__output_problem_buffer(int indentation) { @@ -22326,20 +22792,36 @@ void Problems__Issue__extension_problem(SIGIL_ARGUMENTS, extension_file *ef, cha } #line 748 "inform7/Chapter 6/Problems, Level 3.w" -void Problems__Issue__release_problem(SIGIL_ARGUMENTS, char *message, char *filename) { +void Problems__Issue__release_problem(SIGIL_ARGUMENTS, char *message, filename *name) { ACT_ON_SIGIL Problems__quote_text(1, message); - Problems__quote_text(2, filename); + char fn[MAX_FILENAME_LENGTH]; + Filenames__to_string(fn, name); + Problems__quote_text(2, fn); Problems__issue_problem_begin(message); Problems__issue_problem_segment("A problem occurred with the 'Release along with...': " "instructions: %1 (with the file '%2')"); Problems__issue_problem_end(); } -void Problems__Issue__release_problem_at_sentence(SIGIL_ARGUMENTS, char *message, char *filename) { +void Problems__Issue__release_problem_path(SIGIL_ARGUMENTS, char *message, pathname *path) { ACT_ON_SIGIL Problems__quote_text(1, message); - Problems__quote_text(2, filename); + char pn[MAX_FILENAME_LENGTH]; + Pathnames__to_string(pn, path); + Problems__quote_text(2, pn); + Problems__issue_problem_begin(message); + Problems__issue_problem_segment("A problem occurred with the 'Release along with...': " + "instructions: %1 (with the file '%2')"); + Problems__issue_problem_end(); +} + +void Problems__Issue__release_problem_at_sentence(SIGIL_ARGUMENTS, char *message, filename *name) { + ACT_ON_SIGIL + Problems__quote_text(1, message); + char fn[MAX_FILENAME_LENGTH]; + Filenames__to_string(fn, name); + Problems__quote_text(2, fn); Problems__quote_source(3, current_sentence); Problems__issue_problem_begin(message); Problems__issue_problem_segment("A problem occurred with the 'Release along with...': " @@ -22347,7 +22829,7 @@ void Problems__Issue__release_problem_at_sentence(SIGIL_ARGUMENTS, char *message Problems__issue_problem_end(); } -#line 774 "inform7/Chapter 6/Problems, Level 3.w" +#line 790 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__map_problem(SIGIL_ARGUMENTS, parse_node *q, char *message) { ACT_ON_SIGIL Problems__quote_source(1, q); @@ -22369,11 +22851,10 @@ void Problems__Issue__map_problem_wanted_but(SIGIL_ARGUMENTS, parse_node *q, cha Problems__issue_problem_end(); } -#line 800 "inform7/Chapter 6/Problems, Level 3.w" +#line 816 "inform7/Chapter 6/Problems, Level 3.w" void Problems__Issue__start_problems_report(void) { - char *fn = Filenames__build(PROBLEM_LOG_LEAFNAME); - if (STREAM_OPEN_TO_FILE(problems_file, fn, UTF8_ENC) == FALSE) - Problems__Fatal__issue2("Can't open problem log", fn); + if (STREAM_OPEN_TO_FILE(problems_file, filename_of_report, UTF8_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open problem log", filename_of_report); HTML__html_header(problems_file, "Translating the Source", NULL, NULL); } @@ -22389,7 +22870,7 @@ void Problems__Issue__issue_problems_banner(OUTPUT_STREAM, char *verdict) { WRITE("
"); } -#line 79 "inform7/Chapter 7/Vocabulary.w" +#line 76 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__identify_word(int wn) { vocabulary_entry *ve = Vocabulary__entry_for_text(Lexer__word_text(wn)); ve->raw_exemplar = Lexer__word_raw_text(wn); @@ -22401,14 +22882,14 @@ void Vocabulary__identify_word_range(int w1, int w2) { for (i=w1; i<=w2; i++) Vocabulary__identify_word(i); } -#line 94 "inform7/Chapter 7/Vocabulary.w" +#line 91 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__change_text_of_word(int wn, char *new) { Lexer__set_word_text(wn, new); Lexer__set_word_raw_text(wn, new); Vocabulary__identify_word(wn); } -#line 104 "inform7/Chapter 7/Vocabulary.w" +#line 101 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry *Vocabulary__vocab_entry_new(char *text, int hash_code, unsigned int flags, int val) { vocabulary_entry *ve; int l = Platform__strlen(text); @@ -22444,18 +22925,18 @@ void Vocabulary__log(vocabulary_entry *ve) { LOG("%08x-%s-%08x", ve->hash, ve->raw_exemplar, ve->flags); } -#line 157 "inform7/Chapter 7/Vocabulary.w" +#line 154 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_raw_exemplar_to_text(int wn) { Lexer__word(wn)->raw_exemplar = Lexer__word_text(wn); } -#line 165 "inform7/Chapter 7/Vocabulary.w" +#line 162 "inform7/Chapter 7/Vocabulary.w" char *Vocabulary__get_exemplar(vocabulary_entry *ve, int raw) { if (raw) return ve->raw_exemplar; else return ve->exemplar; } -#line 174 "inform7/Chapter 7/Vocabulary.w" +#line 171 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__get_literal_number_value(vocabulary_entry *ve) { return ve->literal_number_value; } @@ -22463,7 +22944,7 @@ void Vocabulary__set_literal_number_value(vocabulary_entry *ve, int val) { ve->literal_number_value = val; } -#line 184 "inform7/Chapter 7/Vocabulary.w" +#line 181 "inform7/Chapter 7/Vocabulary.w" kind *Vocabulary__get_kind(vocabulary_entry *ve) { return ve->one_word_kind; } @@ -22473,7 +22954,7 @@ void Vocabulary__set_kind(vocabulary_entry *ve, kind *K) { Preform__mark_vocabulary(ve, k_kind_NTM); } -#line 201 "inform7/Chapter 7/Vocabulary.w" +#line 198 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__used_case_sensitively(vocabulary_entry *ve) { if ((ve->upper_case_form) || (ve->lower_case_form)) return TRUE; return FALSE; @@ -22489,7 +22970,7 @@ vocabulary_entry *Vocabulary__make_case_sensitive(vocabulary_entry *ve) { return ve->upper_case_form; } -#line 220 "inform7/Chapter 7/Vocabulary.w" +#line 217 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_flags(vocabulary_entry *ve, unsigned int t) { ve->flags |= t; } @@ -22500,7 +22981,7 @@ unsigned int Vocabulary__test_flags(int wn, unsigned int t) { return (Lexer__word(wn)->flags) & t; } -#line 236 "inform7/Chapter 7/Vocabulary.w" +#line 233 "inform7/Chapter 7/Vocabulary.w" unsigned int Vocabulary__disjunction_of_flags(int w1, int w2) { int i; unsigned int d = 0; @@ -22508,7 +22989,7 @@ unsigned int Vocabulary__disjunction_of_flags(int w1, int w2) { return d; } -#line 246 "inform7/Chapter 7/Vocabulary.w" +#line 243 "inform7/Chapter 7/Vocabulary.w" void Vocabulary__set_ntb(vocabulary_entry *ve, int R) { ve->nt_incidence = R; } @@ -22516,7 +22997,7 @@ int Vocabulary__get_ntb(vocabulary_entry *ve) { return ve->nt_incidence; } -#line 298 "inform7/Chapter 7/Vocabulary.w" +#line 295 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__hash_code_from_word(char *text) { unsigned int hash_code = 0; char *p = text; @@ -22541,14 +23022,14 @@ int Vocabulary__hash_code_from_word(char *text) { return (int) (3+(hash_code % (HASH_TAB_SIZE-3))); /* result of X 30011, plus 3 */ } -#line 328 "inform7/Chapter 7/Vocabulary.w" +#line 325 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry *list_of_vocab_with_hash[HASH_TAB_SIZE]; void Vocabulary__start_hash_table(void) { int i; for (i=0; i is first vocabulary with hash %d\n", @@ -22581,7 +23062,7 @@ vocabulary_entry *Vocabulary__entry_for_text(char *text) { return new_entry; } -#line 365 "inform7/Chapter 7/Vocabulary.w" +#line 362 "inform7/Chapter 7/Vocabulary.w" ; } else { vocabulary_entry *old_entry = NULL; @@ -22595,7 +23076,7 @@ vocabulary_entry *Vocabulary__entry_for_text(char *text) { /* and if we do not find |text| in there, then... */ { -#line 398 "inform7/Chapter 7/Vocabulary.w" +#line 395 "inform7/Chapter 7/Vocabulary.w" new_entry = Vocabulary__vocab_entry_new(text, hash_code, f, val); old_entry->next_in_vocab_hash = new_entry; LOGIF(VOCABULARY, "Word %d <%s> is vocabulary entry no. %d with hash %d\n", @@ -22603,12 +23084,12 @@ vocabulary_entry *Vocabulary__entry_for_text(char *text) { return new_entry; } -#line 376 "inform7/Chapter 7/Vocabulary.w" +#line 373 "inform7/Chapter 7/Vocabulary.w" ; } } -#line 409 "inform7/Chapter 7/Vocabulary.w" +#line 406 "inform7/Chapter 7/Vocabulary.w" vocabulary_entry *Vocabulary__entry_for_partial_text(char *str, int from, int to) { TEMPORARY_STREAM; int i; @@ -22622,7 +23103,7 @@ vocabulary_entry *Vocabulary__entry_for_partial_text(char *str, int from, int to return Lexer__word(w1); } -#line 429 "inform7/Chapter 7/Vocabulary.w" +#line 426 "inform7/Chapter 7/Vocabulary.w" int Vocabulary__an_ordinal_number(char *fw) { int i; for (i=0; fw[i] != 0; i++) @@ -23614,38 +24095,25 @@ void NaturalLanguages__scan(void) { { #line 112 "inform7/Chapter 7/Natural Languages.w" - /* lowest priority: folder built into Inform application */ - char built_in_bundles[MAX_FILENAME_LENGTH]; - sprintf(built_in_bundles, "%s%cReserved%cLanguages", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - NaturalLanguages__scan_bundles_from(built_in_bundles, "built in"); - - /* middle priority: the user's folder for installed extensions */ - NaturalLanguages__scan_bundles_from(pathname_of_languages, "installed"); - - /* highest priority: the Materials folder for the current project */ - char materials_folder_bundles[MAX_FILENAME_LENGTH]; - sprintf(materials_folder_bundles, "%s%cLanguages", - materials_folder, FOLDER_SEPARATOR); - NaturalLanguages__scan_bundles_from(materials_folder_bundles, "from .materials"); + for (int area=0; areanl_bundle_path, FOLDER_SEPARATOR); - FILE *ABOUT = Platform__iso_fopen(info_file, "r"); +#line 194 "inform7/Chapter 7/Natural Languages.w" + filename *about_file = Filenames__in_folder(nl->nl_bundle_path, "about.txt"); + FILE *ABOUT = Platform__iso_fopen(about_file, "r"); if (ABOUT == NULL) { - LOG("Can't find %s\n", info_file); + LOG("Can't find about file: %f\n", about_file); } else { char line_buffer[MAX_BUNDLE_ABOUT_LINE_LENGTH+1]; w1 = lexer_wordcount; @@ -23661,11 +24129,11 @@ void NaturalLanguages__scan(void) { } } -#line 196 "inform7/Chapter 7/Natural Languages.w" +#line 184 "inform7/Chapter 7/Natural Languages.w" ; if (w1 >= 0) { -#line 230 "inform7/Chapter 7/Natural Languages.w" +#line 217 "inform7/Chapter 7/Natural Languages.w" int n, rn = -1; for (n = w1; n <= w2; n++) { vocabulary_entry *ve = Lexer__word(n); @@ -23681,7 +24149,7 @@ void NaturalLanguages__scan(void) { if (rn >= 0) nl->language_field_w2[rn] = n-1; } -#line 197 "inform7/Chapter 7/Natural Languages.w" +#line 185 "inform7/Chapter 7/Natural Languages.w" ; } @@ -23691,10 +24159,10 @@ void NaturalLanguages__scan(void) { } } -#line 131 "inform7/Chapter 7/Natural Languages.w" -void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { +#line 119 "inform7/Chapter 7/Natural Languages.w" +void NaturalLanguages__scan_bundles_from(pathname *P, char *origin) { TEMPORARY_STREAM; - int s = Folders__write_contents_to_stream(TEMP, pathname); + int s = Pathnames__write_contents_to_stream(TEMP, P); if (s) { char directory_text[2048]; Extensions__IDs__truncated_strcpy(directory_text, STREAM_TEXT(TEMP), 2048); @@ -23704,7 +24172,7 @@ void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { directory_text[i] = 0; { -#line 154 "inform7/Chapter 7/Natural Languages.w" +#line 142 "inform7/Chapter 7/Natural Languages.w" char *entry = directory_text + entry_start; int i, acceptable = TRUE; for (i=0; entry[i]; i++) { @@ -23716,7 +24184,7 @@ void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { natural_language *nl = NaturalLanguages__get_nl(entry); if (nl == NULL) { -#line 171 "inform7/Chapter 7/Natural Languages.w" +#line 159 "inform7/Chapter 7/Natural Languages.w" nl = CREATE(natural_language); char sentence_format[MAX_FILENAME_LENGTH + 20]; @@ -23736,21 +24204,21 @@ void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { } } -#line 163 "inform7/Chapter 7/Natural Languages.w" +#line 151 "inform7/Chapter 7/Natural Languages.w" ; - sprintf(nl->nl_bundle_path, "%s%c%s", pathname, FOLDER_SEPARATOR, entry); + nl->nl_bundle_path = Pathnames__subfolder(P, entry); LOG("Found language bundle '%s' (%s)\n", entry, origin); } } -#line 141 "inform7/Chapter 7/Natural Languages.w" +#line 129 "inform7/Chapter 7/Natural Languages.w" ; entry_start = i+1; } } { -#line 154 "inform7/Chapter 7/Natural Languages.w" +#line 142 "inform7/Chapter 7/Natural Languages.w" char *entry = directory_text + entry_start; int i, acceptable = TRUE; for (i=0; entry[i]; i++) { @@ -23762,7 +24230,7 @@ void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { natural_language *nl = NaturalLanguages__get_nl(entry); if (nl == NULL) { -#line 171 "inform7/Chapter 7/Natural Languages.w" +#line 159 "inform7/Chapter 7/Natural Languages.w" nl = CREATE(natural_language); char sentence_format[MAX_FILENAME_LENGTH + 20]; @@ -23782,20 +24250,20 @@ void NaturalLanguages__scan_bundles_from(char *pathname, char *origin) { } } -#line 163 "inform7/Chapter 7/Natural Languages.w" +#line 151 "inform7/Chapter 7/Natural Languages.w" ; - sprintf(nl->nl_bundle_path, "%s%c%s", pathname, FOLDER_SEPARATOR, entry); + nl->nl_bundle_path = Pathnames__subfolder(P, entry); LOG("Found language bundle '%s' (%s)\n", entry, origin); } } -#line 145 "inform7/Chapter 7/Natural Languages.w" +#line 133 "inform7/Chapter 7/Natural Languages.w" ; } CLOSE_TEMPORARY_STREAM; } -#line 250 "inform7/Chapter 7/Natural Languages.w" +#line 237 "inform7/Chapter 7/Natural Languages.w" natural_language *NaturalLanguages__get_nl(char *name) { NaturalLanguages__scan(); natural_language *nl; @@ -23810,21 +24278,21 @@ natural_language *NaturalLanguages__get_nl(char *name) { return NULL; } -#line 267 "inform7/Chapter 7/Natural Languages.w" +#line 254 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__log(natural_language *nl) { if (nl == NULL) { LOG(""); } else { LOG("%s", NaturalLanguages__get_name(nl)); } } -#line 275 "inform7/Chapter 7/Natural Languages.w" +#line 262 "inform7/Chapter 7/Natural Languages.w" char *NaturalLanguages__get_name(natural_language *nl) { if (nl == NULL) nl = English_language; return Lexer__word_raw_text(nl->word_ref1); } -#line 286 "inform7/Chapter 7/Natural Languages.w" +#line 273 "inform7/Chapter 7/Natural Languages.w" int natural_language_NTMR(int w1, int w2, int *X, void **XP) { -#line 287 "inform7/Chapter 7/Natural Languages.w" +#line 274 "inform7/Chapter 7/Natural Languages.w" natural_language *nl; LOOP_OVER(nl, natural_language) { if ((w1 == w2) && (Lexer__word(nl->word_ref1) == Lexer__word(w1))) { @@ -23834,7 +24302,7 @@ int natural_language_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 307 "inform7/Chapter 7/Natural Languages.w" +#line 294 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__stock_nl_kind(kind *K) { natural_language *nl; LOOP_OVER(nl, natural_language) { @@ -23845,7 +24313,7 @@ void NaturalLanguages__stock_nl_kind(kind *K) { } } -#line 328 "inform7/Chapter 7/Natural Languages.w" +#line 315 "inform7/Chapter 7/Natural Languages.w" int NaturalLanguages__adaptive_person(natural_language *nl) { if ((nl->adaptive_person == -1) && (P_adaptive_text_viewpoint)) { instance *I = nl->nl_instance; @@ -23861,7 +24329,7 @@ int NaturalLanguages__adaptive_person(natural_language *nl) { return nl->adaptive_person; } -#line 346 "inform7/Chapter 7/Natural Languages.w" +#line 333 "inform7/Chapter 7/Natural Languages.w" natural_language *NaturalLanguages__English(void) { natural_language *nl = NaturalLanguages__get_nl("english"); if (nl == NULL) internal_error("unable to find English language bundle"); @@ -23875,7 +24343,7 @@ void NaturalLanguages__set_language_of_play(natural_language *nl) { if (nl) nl->extension_required = TRUE; } -#line 365 "inform7/Chapter 7/Natural Languages.w" +#line 352 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__write_language_code(OUTPUT_STREAM, natural_language *nl) { if (nl == NULL) nl = English_language; int t1 = nl->language_field_w1[ISO_639_CODE_LFIELD], @@ -23884,7 +24352,7 @@ void NaturalLanguages__write_language_code(OUTPUT_STREAM, natural_language *nl) else WRITE("en"); } -#line 385 "inform7/Chapter 7/Natural Languages.w" +#line 372 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__include_required(void) { natural_language *nl; int w1 = lexer_wordcount; @@ -23905,16 +24373,14 @@ void NaturalLanguages__include_required(void) { Sentences__break(w1, lexer_wordcount-1, NULL, first_extension_inclusion); } -#line 411 "inform7/Chapter 7/Natural Languages.w" +#line 398 "inform7/Chapter 7/Natural Languages.w" void NaturalLanguages__load_preform(natural_language *nl) { if (nl == NULL) internal_error("can't load preform from null language"); - char filename_of_preform[MAX_FILENAME_LENGTH]; - sprintf(filename_of_preform, "%s%cSyntax.preform", - nl->nl_bundle_path, FOLDER_SEPARATOR); - LOG("Reading language definition from <%s>\n", filename_of_preform); + filename *preform_file = Filenames__in_folder(nl->nl_bundle_path, "Syntax.preform"); + LOG("Reading language definition from <%f>\n", preform_file); - FILE *PREFORM = Platform__iso_fopen(filename_of_preform, "r"); + FILE *PREFORM = Platform__iso_fopen(preform_file, "r"); if (PREFORM == NULL) internal_error("Unable to open Preform definition"); char line_buffer[MAX_PREFORM_LINE_LENGTH+1]; while (TRUE) { @@ -23926,7 +24392,7 @@ void NaturalLanguages__load_preform(natural_language *nl) { fclose(PREFORM); } -#line 377 "inform7/Chapter 7/Preform.w" +#line 373 "inform7/Chapter 7/Preform.w" void Preform__log_language(void) { int detailed = FALSE; nonterminal *nt; @@ -23963,7 +24429,7 @@ void Preform__log_language(void) { LOG("%d req bits.\n", no_req_bits); } -#line 416 "inform7/Chapter 7/Preform.w" +#line 412 "inform7/Chapter 7/Preform.w" void Preform__log_production(production *pr, int detailed) { if (pr->first_ptoken == NULL) LOG(""); ptoken *pt; @@ -23973,7 +24439,7 @@ void Preform__log_production(production *pr, int detailed) { } } -#line 428 "inform7/Chapter 7/Preform.w" +#line 424 "inform7/Chapter 7/Preform.w" void Preform__log_ptoken(ptoken *pt, int detailed) { if ((detailed) && (pt->ptoken_position != 0)) LOG("(@%d)", pt->ptoken_position); if ((detailed) && (pt->strut_number >= 0)) LOG("(S%d)", pt->strut_number); @@ -23993,7 +24459,7 @@ void Preform__log_ptoken(ptoken *pt, int detailed) { if (pt->range_ends >= 0) { if (detailed) LOG(":%d", pt->range_ends); LOG("}"); } } -#line 450 "inform7/Chapter 7/Preform.w" +#line 446 "inform7/Chapter 7/Preform.w" void Preform__write_ptoken(OUTPUT_STREAM, ptoken *pt) { if (pt->disallow_unexpected_upper) WRITE("_"); if (pt->negated_ptoken) WRITE("^"); @@ -24010,20 +24476,20 @@ void Preform__write_ptoken(OUTPUT_STREAM, ptoken *pt) { if (pt->range_ends >= 0) WRITE("}"); } -#line 471 "inform7/Chapter 7/Preform.w" +#line 467 "inform7/Chapter 7/Preform.w" int preform_nonterminal_NTMR(int w1, int w2, int *X, void **XP) { -#line 472 "inform7/Chapter 7/Preform.w" +#line 468 "inform7/Chapter 7/Preform.w" nonterminal *nt = Preform__find_nonterminal(Lexer__word(w1)); if (nt) { *XP = nt; return TRUE; } return FALSE; } -#line 480 "inform7/Chapter 7/Preform.w" +#line 476 "inform7/Chapter 7/Preform.w" void Preform__watch(nonterminal *nt, int state) { nt->watched = state; } -#line 489 "inform7/Chapter 7/Preform.w" +#line 485 "inform7/Chapter 7/Preform.w" vocabulary_entry *AMPERSAND_V; vocabulary_entry *BACKSLASH_V; vocabulary_entry *CARET_V; @@ -24037,11 +24503,11 @@ vocabulary_entry *UNDERSCORE_V; vocabulary_entry *language_V; vocabulary_entry *internal_V; -#line 505 "inform7/Chapter 7/Preform.w" +#line 501 "inform7/Chapter 7/Preform.w" void Preform__read_definition(void) { { -#line 539 "inform7/Chapter 7/Preform.w" +#line 535 "inform7/Chapter 7/Preform.w" CAPITAL_K_V = Vocabulary__entry_for_text("k"); CAPITAL_L_V = Vocabulary__entry_for_text("l"); CLOSEBRACE_V = Vocabulary__entry_for_text("}"); @@ -24059,11 +24525,11 @@ void Preform__read_definition(void) { STROKE_V = Vocabulary__entry_for_text("|"); } -#line 506 "inform7/Chapter 7/Preform.w" +#line 502 "inform7/Chapter 7/Preform.w" ; { -#line 559 "inform7/Chapter 7/Preform.w" +#line 555 "inform7/Chapter 7/Preform.w" register_tangled_nonterminals(); ; nonterminal *nt; @@ -24072,11 +24538,11 @@ void Preform__read_definition(void) { internal_error("internal undefined"); } -#line 507 "inform7/Chapter 7/Preform.w" +#line 503 "inform7/Chapter 7/Preform.w" ; { -#line 586 "inform7/Chapter 7/Preform.w" +#line 582 "inform7/Chapter 7/Preform.w" cardinal_number_in_words_NTM->number_words_by_production = TRUE; cardinal_number_in_words_NTM->flag_words_in_production = NUMBER_MC; @@ -24086,7 +24552,7 @@ void Preform__read_definition(void) { relative_clause_marker_NTM->flag_words_in_production = PREPOSITION_MC; } -#line 508 "inform7/Chapter 7/Preform.w" +#line 504 "inform7/Chapter 7/Preform.w" ; AMPERSAND_V = Vocabulary__entry_for_text("&"); @@ -24114,7 +24580,7 @@ void Preform__read_definition(void) { LOG("%d declarations read (%d words)\n", nonterminals_declared, w2 - w1 + 1); } -#line 599 "inform7/Chapter 7/Preform.w" +#line 595 "inform7/Chapter 7/Preform.w" int Preform__parse_preform(int w1, int w2, int break_first) { if (break_first) { char *p = Lexer__word_raw_text(w1); @@ -24128,7 +24594,7 @@ int Preform__parse_preform(int w1, int w2, int break_first) { if ((w2 >= wn+1) && (Lexer__word(wn) == language_V)) { { -#line 634 "inform7/Chapter 7/Preform.w" +#line 630 "inform7/Chapter 7/Preform.w" natural_language *nl = NaturalLanguages__get_nl(Lexer__word_text(wn+1)); if (nl == NULL) { LOG("Missing: $W\n", wn+1, wn+1); @@ -24137,7 +24603,7 @@ int Preform__parse_preform(int w1, int w2, int break_first) { language_being_read_by_Preform = nl; } -#line 610 "inform7/Chapter 7/Preform.w" +#line 606 "inform7/Chapter 7/Preform.w" ; wn += 2; continue; @@ -24145,14 +24611,14 @@ int Preform__parse_preform(int w1, int w2, int break_first) { if ((w2 >= wn+1) && (Lexer__word(wn+1) == internal_V)) { { -#line 644 "inform7/Chapter 7/Preform.w" +#line 640 "inform7/Chapter 7/Preform.w" nonterminal *nt = Preform__find_nonterminal(Lexer__word(wn)); if (nt->first_production_list) internal_error("internal is defined"); nt->marked_internal = TRUE; wn += 2; } -#line 615 "inform7/Chapter 7/Preform.w" +#line 611 "inform7/Chapter 7/Preform.w" ; nonterminals_declared++; continue; @@ -24160,12 +24626,12 @@ int Preform__parse_preform(int w1, int w2, int break_first) { if ((w2 >= wn+2) && (Lexer__word(wn+1) == COLONCOLONEQUALS_V)) { { -#line 653 "inform7/Chapter 7/Preform.w" +#line 649 "inform7/Chapter 7/Preform.w" nonterminal *nt = Preform__find_nonterminal(Lexer__word(wn)); production_list *pl; { -#line 671 "inform7/Chapter 7/Preform.w" +#line 667 "inform7/Chapter 7/Preform.w" for (pl = nt->first_production_list; pl; pl = pl->next_production_list) if (pl->definition_language == language_being_read_by_Preform) break; @@ -24176,7 +24642,7 @@ int Preform__parse_preform(int w1, int w2, int break_first) { pl->as_avinue = NULL; { -#line 685 "inform7/Chapter 7/Preform.w" +#line 681 "inform7/Chapter 7/Preform.w" if (nt->first_production_list == NULL) nt->first_production_list = pl; else { production_list *p = nt->first_production_list; @@ -24185,12 +24651,12 @@ int Preform__parse_preform(int w1, int w2, int break_first) { } } -#line 679 "inform7/Chapter 7/Preform.w" +#line 675 "inform7/Chapter 7/Preform.w" ; } } -#line 655 "inform7/Chapter 7/Preform.w" +#line 651 "inform7/Chapter 7/Preform.w" ; wn += 2; int pc = 0; @@ -24201,7 +24667,7 @@ int Preform__parse_preform(int w1, int w2, int break_first) { wn = x; { -#line 695 "inform7/Chapter 7/Preform.w" +#line 691 "inform7/Chapter 7/Preform.w" if (pl->first_production == NULL) pl->first_production = pr; else { production *p = pl->first_production; @@ -24210,14 +24676,14 @@ int Preform__parse_preform(int w1, int w2, int break_first) { } } -#line 663 "inform7/Chapter 7/Preform.w" +#line 659 "inform7/Chapter 7/Preform.w" ; if ((wn > w2) || (Lexer__word(x) == PARBREAK_V)) break; /* reached end */ wn++; /* advance past the stroke and continue */ } } -#line 620 "inform7/Chapter 7/Preform.w" +#line 616 "inform7/Chapter 7/Preform.w" ; nonterminals_declared++; continue; @@ -24229,7 +24695,7 @@ int Preform__parse_preform(int w1, int w2, int break_first) { return nonterminals_declared; } -#line 705 "inform7/Chapter 7/Preform.w" +#line 701 "inform7/Chapter 7/Preform.w" nonterminal *Preform__find_nonterminal(vocabulary_entry *ve) { nonterminal *nt; LOOP_OVER(nt, nonterminal) @@ -24263,7 +24729,7 @@ nonterminal *Preform__find_nonterminal(vocabulary_entry *ve) { return nt; } -#line 741 "inform7/Chapter 7/Preform.w" +#line 737 "inform7/Chapter 7/Preform.w" production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { production *pr = CREATE(production); pr->match_number = pc; @@ -24281,7 +24747,7 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { ptoken *head = NULL, *tail = NULL; { -#line 768 "inform7/Chapter 7/Preform.w" +#line 764 "inform7/Chapter 7/Preform.w" int result_count = 1; int negation_modifier = FALSE, lower_case_modifier = FALSE; int unescaped = TRUE; @@ -24291,7 +24757,7 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { for (i = w1; i <= w2; i++) { if (unescaped) { -#line 793 "inform7/Chapter 7/Preform.w" +#line 789 "inform7/Chapter 7/Preform.w" if (Lexer__word(i) == CARET_V) { negation_modifier = TRUE; continue; } if (Lexer__word(i) == UNDERSCORE_V) { lower_case_modifier = TRUE; continue; } if (Lexer__word(i) == BACKSLASH_V) { unescaped = FALSE; continue; } @@ -24319,7 +24785,7 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { } } -#line 775 "inform7/Chapter 7/Preform.w" +#line 771 "inform7/Chapter 7/Preform.w" ; ptoken *pt = Preform__parse_slashed_chain(nt, pr, i, unescaped); @@ -24327,7 +24793,7 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { if (pt->ptoken_category == NONTERMINAL_PTC) { -#line 850 "inform7/Chapter 7/Preform.w" +#line 846 "inform7/Chapter 7/Preform.w" if (result_count < MAX_RESULTS_PER_PRODUCTION) { if ((i+2 <= w2) && (Lexer__word(i+1) == QUESTIONMARK_V) && (Vocabulary__test_flags(i+2, NUMBER_MC))) { @@ -24340,12 +24806,12 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { } } -#line 780 "inform7/Chapter 7/Preform.w" +#line 776 "inform7/Chapter 7/Preform.w" ; { -#line 822 "inform7/Chapter 7/Preform.w" +#line 818 "inform7/Chapter 7/Preform.w" if (negation_modifier) pt->negated_ptoken = TRUE; if (lower_case_modifier) pt->disallow_unexpected_upper = TRUE; @@ -24372,7 +24838,7 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { } } -#line 782 "inform7/Chapter 7/Preform.w" +#line 778 "inform7/Chapter 7/Preform.w" ; if (tc++ < MAX_PTOKENS_PER_PRODUCTION) { @@ -24382,18 +24848,18 @@ production *Preform__new_production(int w1, int w2, nonterminal *nt, int pc) { } } -#line 756 "inform7/Chapter 7/Preform.w" +#line 752 "inform7/Chapter 7/Preform.w" ; pr->first_ptoken = head; return pr; } -#line 864 "inform7/Chapter 7/Preform.w" +#line 860 "inform7/Chapter 7/Preform.w" ptoken *Preform__parse_slashed_chain(nonterminal *nt, production *pr, int wn, int unescaped) { int a1 = wn, a2 = wn; { -#line 875 "inform7/Chapter 7/Preform.w" +#line 871 "inform7/Chapter 7/Preform.w" char *p = Lexer__word_raw_text(wn); int k, breakme = FALSE; if (unescaped) { @@ -24416,12 +24882,12 @@ ptoken *Preform__parse_slashed_chain(nonterminal *nt, production *pr, int wn, in } } -#line 866 "inform7/Chapter 7/Preform.w" +#line 862 "inform7/Chapter 7/Preform.w" ; ptoken *pt = NULL; { -#line 899 "inform7/Chapter 7/Preform.w" +#line 895 "inform7/Chapter 7/Preform.w" ptoken *alt = NULL; for (; a1 <= a2; a1++) if (Lexer__word(a1) != FORWARDSLASH_V) { @@ -24434,12 +24900,12 @@ ptoken *Preform__parse_slashed_chain(nonterminal *nt, production *pr, int wn, in } } -#line 868 "inform7/Chapter 7/Preform.w" +#line 864 "inform7/Chapter 7/Preform.w" ; return pt; } -#line 918 "inform7/Chapter 7/Preform.w" +#line 914 "inform7/Chapter 7/Preform.w" ptoken *Preform__new_ptoken(vocabulary_entry *ve, int unescaped, nonterminal *nt, int pc) { ptoken *pt = CREATE(ptoken); pt->next_ptoken = NULL; @@ -24484,7 +24950,7 @@ ptoken *Preform__new_ptoken(vocabulary_entry *ve, int unescaped, nonterminal *nt return pt; } -#line 969 "inform7/Chapter 7/Preform.w" +#line 965 "inform7/Chapter 7/Preform.w" int first_round_of_nt_optimisation_made = FALSE; void Preform__optimise_counts(void) { @@ -24536,7 +25002,7 @@ void Preform__optimise_nt(nonterminal *nt) { nt->optimised_in_this_pass = TRUE; { -#line 1039 "inform7/Chapter 7/Preform.w" +#line 1035 "inform7/Chapter 7/Preform.w" int min = -1, max = -1; production_list *pl; for (pl = nt->first_production_list; pl; pl = pl->next_production_list) { @@ -24564,7 +25030,7 @@ void Preform__optimise_nt(nonterminal *nt) { } } -#line 1018 "inform7/Chapter 7/Preform.w" +#line 1014 "inform7/Chapter 7/Preform.w" ; production_list *pl; @@ -24574,7 +25040,7 @@ void Preform__optimise_nt(nonterminal *nt) { ptoken *last = NULL; /* this will point to the last ptoken in the production */ { -#line 1079 "inform7/Chapter 7/Preform.w" +#line 1075 "inform7/Chapter 7/Preform.w" int posn = 1; ptoken *pt; for (pt = pr->first_ptoken; pt; pt = pt->next_ptoken) { @@ -24590,11 +25056,11 @@ void Preform__optimise_nt(nonterminal *nt) { } } -#line 1025 "inform7/Chapter 7/Preform.w" +#line 1021 "inform7/Chapter 7/Preform.w" ; { -#line 1101 "inform7/Chapter 7/Preform.w" +#line 1097 "inform7/Chapter 7/Preform.w" int posn = -1; ptoken *pt; for (pt = last; pt; ) { @@ -24613,11 +25079,11 @@ void Preform__optimise_nt(nonterminal *nt) { } } -#line 1026 "inform7/Chapter 7/Preform.w" +#line 1022 "inform7/Chapter 7/Preform.w" ; { -#line 1123 "inform7/Chapter 7/Preform.w" +#line 1119 "inform7/Chapter 7/Preform.w" pr->no_struts = 0; ptoken *pt; for (pt = pr->first_ptoken; pt; pt = pt->next_ptoken) { @@ -24636,11 +25102,11 @@ void Preform__optimise_nt(nonterminal *nt) { } } -#line 1027 "inform7/Chapter 7/Preform.w" +#line 1023 "inform7/Chapter 7/Preform.w" ; { -#line 1143 "inform7/Chapter 7/Preform.w" +#line 1139 "inform7/Chapter 7/Preform.w" ptoken *pt; for (pt = pr->first_ptoken; pt; pt = pt->next_ptoken) if ((pt->ptoken_category == FIXED_WORD_PTC) && (pt->ptoken_position != 0) @@ -24648,13 +25114,13 @@ void Preform__optimise_nt(nonterminal *nt) { pt->ptoken_is_fast = TRUE; } -#line 1028 "inform7/Chapter 7/Preform.w" +#line 1024 "inform7/Chapter 7/Preform.w" ; } } { -#line 1153 "inform7/Chapter 7/Preform.w" +#line 1149 "inform7/Chapter 7/Preform.w" int first_production = TRUE; Preform__clear_rreq(&(nt->nonterminal_req)); if (nt == k_kind_NTM) Preform__mark_nt_as_requiring_itself_articled(nt); /* to break a horrible circularity */ @@ -24721,11 +25187,11 @@ void Preform__optimise_nt(nonterminal *nt) { if (nt == k_kind_of_kind_NTM) Preform__mark_nt_as_requiring_itself_articled(nt); /* to break a horrible circularity */ } -#line 1031 "inform7/Chapter 7/Preform.w" +#line 1027 "inform7/Chapter 7/Preform.w" ; } -#line 1225 "inform7/Chapter 7/Preform.w" +#line 1221 "inform7/Chapter 7/Preform.w" void Preform__optimise_nt_reqs(nonterminal *nt) { production_list *pl; for (pl = nt->first_production_list; pl; pl = pl->next_production_list) { @@ -24764,7 +25230,7 @@ void Preform__optimise_req(range_requirement *req, range_requirement *prev) { req->ditto_flag = TRUE; } -#line 1266 "inform7/Chapter 7/Preform.w" +#line 1262 "inform7/Chapter 7/Preform.w" void Preform__mark_as_preposition(vocabulary_entry *ve) { Vocabulary__set_flags(ve, PREPOSITION_MC); Preform__set_nt_incidence(ve, preposition_NTM); @@ -24826,7 +25292,7 @@ void Preform__set_nt_incidence(vocabulary_entry *ve, nonterminal *nt) { Vocabulary__set_ntb(ve, R); } -#line 1332 "inform7/Chapter 7/Preform.w" +#line 1328 "inform7/Chapter 7/Preform.w" int Preform__nt_bitmap_bit(nonterminal *nt) { if (nt->nt_req_bit == -1) { int b; @@ -24892,7 +25358,7 @@ int Preform__get_range_conjunction(int w1, int w2) { return R; } -#line 1400 "inform7/Chapter 7/Preform.w" +#line 1396 "inform7/Chapter 7/Preform.w" int Preform__nt_bitmap_violates(int w1, int w2, range_requirement *req) { if (req->no_requirements) return FALSE; if (w1 == w2) { @@ -24953,7 +25419,7 @@ int Preform__nt_bitmap_violates(int w1, int w2, range_requirement *req) { return FALSE; } -#line 1464 "inform7/Chapter 7/Preform.w" +#line 1460 "inform7/Chapter 7/Preform.w" void Preform__concatenate_rreq(range_requirement *req, range_requirement *with) { req->DS_req = Preform__concatenate_ds(req->DS_req, with->DS_req); req->DW_req = Preform__concatenate_dw(req->DW_req, with->DW_req); @@ -24963,31 +25429,31 @@ void Preform__concatenate_rreq(range_requirement *req, range_requirement *with) req->FW_req = Preform__concatenate_fw(req->FW_req, with->FW_req); } -#line 1479 "inform7/Chapter 7/Preform.w" +#line 1475 "inform7/Chapter 7/Preform.w" int Preform__concatenate_ds(int m1, int m2) { return m1 | m2; } -#line 1488 "inform7/Chapter 7/Preform.w" +#line 1484 "inform7/Chapter 7/Preform.w" int Preform__concatenate_cs(int m1, int m2) { return m1 & m2; } -#line 1499 "inform7/Chapter 7/Preform.w" +#line 1495 "inform7/Chapter 7/Preform.w" int Preform__concatenate_dw(int m1, int m2) { if (m1 == 0) return m2; /* the case where we have no information about X */ if (m2 == 0) return m1; /* and about Y */ return m1; /* the general case discussed above */ } -#line 1510 "inform7/Chapter 7/Preform.w" +#line 1506 "inform7/Chapter 7/Preform.w" int Preform__concatenate_cw(int m1, int m2) { if (m1 == 0) return 0; /* the case where we have no information about X */ if (m2 == 0) return 0; /* and about Y */ return m1 | m2; /* the general case discussed above */ } -#line 1519 "inform7/Chapter 7/Preform.w" +#line 1515 "inform7/Chapter 7/Preform.w" int Preform__concatenate_fs(int m1, int m2) { return m1; } @@ -24996,7 +25462,7 @@ int Preform__concatenate_fw(int m1, int m2) { return m1; } -#line 1532 "inform7/Chapter 7/Preform.w" +#line 1528 "inform7/Chapter 7/Preform.w" void Preform__disjoin_rreq(range_requirement *req, range_requirement *with) { req->DS_req = Preform__disjoin_ds(req->DS_req, with->DS_req); req->DW_req = Preform__disjoin_dw(req->DW_req, with->DW_req); @@ -25006,24 +25472,24 @@ void Preform__disjoin_rreq(range_requirement *req, range_requirement *with) { req->FW_req = Preform__disjoin_fw(req->FW_req, with->FW_req); } -#line 1547 "inform7/Chapter 7/Preform.w" +#line 1543 "inform7/Chapter 7/Preform.w" int Preform__disjoin_ds(int m1, int m2) { return m1 & m2; } -#line 1556 "inform7/Chapter 7/Preform.w" +#line 1552 "inform7/Chapter 7/Preform.w" int Preform__disjoin_cs(int m1, int m2) { return m1 & m2; } -#line 1565 "inform7/Chapter 7/Preform.w" +#line 1561 "inform7/Chapter 7/Preform.w" int Preform__disjoin_dw(int m1, int m2) { if (m1 == 0) return 0; /* the case where we have no information about X */ if (m2 == 0) return 0; /* and about Y */ return m1 | m2; /* the general case discussed above */ } -#line 1574 "inform7/Chapter 7/Preform.w" +#line 1570 "inform7/Chapter 7/Preform.w" int Preform__disjoin_cw(int m1, int m2) { if (m1 == 0) return 0; /* the case where we have no information about X */ if (m2 == 0) return 0; /* and about Y */ @@ -25060,7 +25526,7 @@ void Preform__log_range_requirement(range_requirement *req) { if (req->FS_req) { LOG(" FS: %08x", req->FS_req); } } -#line 1615 "inform7/Chapter 7/Preform.w" +#line 1611 "inform7/Chapter 7/Preform.w" int Preform__ptoken_width(ptoken *pt) { int min, max; Preform__ptoken_extrema(pt, &min, &max); @@ -25068,7 +25534,7 @@ int Preform__ptoken_width(ptoken *pt) { return min; } -#line 1629 "inform7/Chapter 7/Preform.w" +#line 1625 "inform7/Chapter 7/Preform.w" void Preform__ptoken_extrema(ptoken *pt, int *min_t, int *max_t) { *min_t = 1; *max_t = 1; if (pt->negated_ptoken) { @@ -25091,7 +25557,7 @@ void Preform__ptoken_extrema(ptoken *pt, int *min_t, int *max_t) { } } -#line 1686 "inform7/Chapter 7/Preform.w" +#line 1682 "inform7/Chapter 7/Preform.w" int ptraci = FALSE; /* in this mode, we trace parsing to the debugging log */ int preform_lookahead_mode = FALSE; /* in this mode, we are looking ahead */ int fail_nonterminal_quantum = 0; /* jump forward by this many words in lookahead */ @@ -25121,7 +25587,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r ((input_length >= nt->min_nt_words) && (input_length <= nt->max_nt_words))) { { -#line 1745 "inform7/Chapter 7/Preform.w" +#line 1741 "inform7/Chapter 7/Preform.w" int unoptimised = FALSE; if ((w1 > w2) || (w1 < 0) || (input_length >= RANGE_OPTIMISATION_LENGTH)) unoptimised = TRUE; @@ -25136,7 +25602,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (ptraci) LOG("Succeeded\n"); { -#line 1730 "inform7/Chapter 7/Preform.w" +#line 1726 "inform7/Chapter 7/Preform.w" if (result) *result = Q; if (result_p) *result_p = QP; most_recent_result = Q; most_recent_result_p = QP; #ifdef INSTRUMENTED_PREFORM @@ -25146,7 +25612,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r return success_rval; } -#line 1757 "inform7/Chapter 7/Preform.w" +#line 1753 "inform7/Chapter 7/Preform.w" ; } } else { @@ -25176,12 +25642,12 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (violates == FALSE) { { -#line 1813 "inform7/Chapter 7/Preform.w" +#line 1809 "inform7/Chapter 7/Preform.w" if (ptraci) { LOG_INDENT; { -#line 1857 "inform7/Chapter 7/Preform.w" +#line 1853 "inform7/Chapter 7/Preform.w" if (pr->match_number >= 26) { LOG("production /%c%c/: ", 'a'+pr->match_number-26, 'a'+pr->match_number-26); } else { @@ -25189,7 +25655,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1815 "inform7/Chapter 7/Preform.w" +#line 1811 "inform7/Chapter 7/Preform.w" ; Preform__log_production(pr, FALSE); LOG("\n"); } @@ -25202,7 +25668,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r int Q; void *QP = NULL; { -#line 1876 "inform7/Chapter 7/Preform.w" +#line 1872 "inform7/Chapter 7/Preform.w" int checked[MAX_PTOKENS_PER_PRODUCTION]; int intermediates[MAX_RESULTS_PER_PRODUCTION]; void *intermediate_ps[MAX_RESULTS_PER_PRODUCTION]; @@ -25210,7 +25676,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r { -#line 1920 "inform7/Chapter 7/Preform.w" +#line 1916 "inform7/Chapter 7/Preform.w" ptoken *pt; int wn = -1, tc; for (pt = pr->first_ptoken, tc = 0; pt; pt = pt->next_ptoken, tc++) { @@ -25233,16 +25699,16 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if ((slow_scan_needed == FALSE) && (wn != w2)) goto Fail; /* input text goes on further */ } -#line 1881 "inform7/Chapter 7/Preform.w" +#line 1877 "inform7/Chapter 7/Preform.w" ; if (slow_scan_needed) { -#line 1947 "inform7/Chapter 7/Preform.w" +#line 1943 "inform7/Chapter 7/Preform.w" int spos[MAX_STRUTS_PER_PRODUCTION]; /* word numbers for where we are trying the struts */ int NS = pr->no_struts; { -#line 1970 "inform7/Chapter 7/Preform.w" +#line 1966 "inform7/Chapter 7/Preform.w" if (NS == 1) { spos[0] = Preform__next_strut_posn_after(w1, w2, pr->struts[0], pr->strut_lengths[0], w1); if (spos[0] == -1) goto Fail; @@ -25256,14 +25722,14 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1949 "inform7/Chapter 7/Preform.w" +#line 1945 "inform7/Chapter 7/Preform.w" ; ptoken *backtrack_token = NULL; int backtrack_index = -1, backtrack_to = -1, backtrack_tc = -1; while (TRUE) { { -#line 2011 "inform7/Chapter 7/Preform.w" +#line 2007 "inform7/Chapter 7/Preform.w" int wn = w1, tc; ptoken *pt, *nextpt; if (backtrack_token) { @@ -25284,7 +25750,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r switch (pt->ptoken_category) { case FIXED_WORD_PTC: { -#line 2043 "inform7/Chapter 7/Preform.w" +#line 2039 "inform7/Chapter 7/Preform.w" int q = Preform__parse_fixed_word_ptoken(wn, pt); if (q == FALSE) goto FailThisStrutPosition; if (pt->ve_pt == OPENBRACKET_V) parsed_open_pos = wn; @@ -25292,24 +25758,24 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r wn++; } -#line 2029 "inform7/Chapter 7/Preform.w" +#line 2025 "inform7/Chapter 7/Preform.w" ; break; case SINGLE_WILDCARD_PTC: { -#line 2052 "inform7/Chapter 7/Preform.w" +#line 2048 "inform7/Chapter 7/Preform.w" wn++; } -#line 2030 "inform7/Chapter 7/Preform.w" +#line 2026 "inform7/Chapter 7/Preform.w" ; break; case MULTIPLE_WILDCARD_PTC: { -#line 2057 "inform7/Chapter 7/Preform.w" +#line 2053 "inform7/Chapter 7/Preform.w" if (wn > w2) goto FailThisStrutPosition; int wt; { -#line 2140 "inform7/Chapter 7/Preform.w" +#line 2136 "inform7/Chapter 7/Preform.w" ptoken *lookahead = nextpt; if (lookahead == NULL) wt = w2; else { @@ -25341,7 +25807,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 2059 "inform7/Chapter 7/Preform.w" +#line 2055 "inform7/Chapter 7/Preform.w" ; if (wn > wt) goto FailThisStrutPosition; /* zero length */ if (pt->balanced_wildcard) { @@ -25358,15 +25824,15 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r wn = wt+1; } -#line 2031 "inform7/Chapter 7/Preform.w" +#line 2027 "inform7/Chapter 7/Preform.w" ; break; case POSSIBLY_EMPTY_WILDCARD_PTC: { -#line 2077 "inform7/Chapter 7/Preform.w" +#line 2073 "inform7/Chapter 7/Preform.w" int wt; { -#line 2140 "inform7/Chapter 7/Preform.w" +#line 2136 "inform7/Chapter 7/Preform.w" ptoken *lookahead = nextpt; if (lookahead == NULL) wt = w2; else { @@ -25398,16 +25864,16 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 2078 "inform7/Chapter 7/Preform.w" +#line 2074 "inform7/Chapter 7/Preform.w" ; wn = wt+1; } -#line 2032 "inform7/Chapter 7/Preform.w" +#line 2028 "inform7/Chapter 7/Preform.w" ; break; case NONTERMINAL_PTC: { -#line 2088 "inform7/Chapter 7/Preform.w" +#line 2084 "inform7/Chapter 7/Preform.w" if ((wn > w2) && (pt->nt_pt->min_nt_words > 0)) goto FailThisStrutPosition; int wt; if (pt->nt_pt->voracious) wt = w2; @@ -25415,7 +25881,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r wt = wn + pt->nt_pt->min_nt_words - 1; else { -#line 2140 "inform7/Chapter 7/Preform.w" +#line 2136 "inform7/Chapter 7/Preform.w" ptoken *lookahead = nextpt; if (lookahead == NULL) wt = w2; else { @@ -25447,7 +25913,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 2093 "inform7/Chapter 7/Preform.w" +#line 2089 "inform7/Chapter 7/Preform.w" ; if (pt == backtrack_token) { @@ -25479,7 +25945,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (pt->nt_pt->max_nt_words > 0) wn = wt+1; } -#line 2033 "inform7/Chapter 7/Preform.w" +#line 2029 "inform7/Chapter 7/Preform.w" ; break; } if (pt->range_ends >= 0) nt->range_result_w2[pt->range_ends] = wn - 1; @@ -25488,14 +25954,14 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (wn != w2+1) goto FailThisStrutPosition; } -#line 1953 "inform7/Chapter 7/Preform.w" +#line 1949 "inform7/Chapter 7/Preform.w" ; break; FailThisStrutPosition: ; if (backtrack_token) continue; { -#line 1988 "inform7/Chapter 7/Preform.w" +#line 1984 "inform7/Chapter 7/Preform.w" if (NS == 0) goto Fail; else if (NS == 1) { spos[0] = Preform__next_strut_posn_after(w1, w2, pr->struts[0], pr->strut_lengths[0], spos[0]+1); @@ -25516,12 +25982,12 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1957 "inform7/Chapter 7/Preform.w" +#line 1953 "inform7/Chapter 7/Preform.w" ; } } -#line 1882 "inform7/Chapter 7/Preform.w" +#line 1878 "inform7/Chapter 7/Preform.w" ; if ((parsed_open_pos >= 0) && (parsed_close_pos >= 0)) @@ -25529,7 +25995,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r goto Fail; { -#line 1904 "inform7/Chapter 7/Preform.w" +#line 1900 "inform7/Chapter 7/Preform.w" if (nt->result_compositor) { intermediates[0] = pr->match_number; int f = (*(nt->result_compositor))(&Q, &QP, intermediates, intermediate_ps, w1, w2); @@ -25538,13 +26004,13 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r fail_nonterminal_quantum = f - FAIL_NONTERMINAL; { -#line 1722 "inform7/Chapter 7/Preform.w" +#line 1718 "inform7/Chapter 7/Preform.w" if (ptraci) LOG("Failed\n"); ptraci = teppic; return FALSE; } -#line 1910 "inform7/Chapter 7/Preform.w" +#line 1906 "inform7/Chapter 7/Preform.w" ; } } else { @@ -25552,11 +26018,11 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1887 "inform7/Chapter 7/Preform.w" +#line 1883 "inform7/Chapter 7/Preform.w" ; } -#line 1825 "inform7/Chapter 7/Preform.w" +#line 1821 "inform7/Chapter 7/Preform.w" ; #ifdef INSTRUMENTED_PREFORM /* record the sentence containing the longest example */ @@ -25574,7 +26040,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (ptraci) { { -#line 1857 "inform7/Chapter 7/Preform.w" +#line 1853 "inform7/Chapter 7/Preform.w" if (pr->match_number >= 26) { LOG("production /%c%c/: ", 'a'+pr->match_number-26, 'a'+pr->match_number-26); } else { @@ -25582,14 +26048,14 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1840 "inform7/Chapter 7/Preform.w" +#line 1836 "inform7/Chapter 7/Preform.w" ; LOG("succeeded (%s): ", (slow_scan_needed)?"slowly":"quickly"); LOG("result: %d\n", Q); LOG_OUTDENT; } { -#line 1730 "inform7/Chapter 7/Preform.w" +#line 1726 "inform7/Chapter 7/Preform.w" if (result) *result = Q; if (result_p) *result_p = QP; most_recent_result = Q; most_recent_result_p = QP; #ifdef INSTRUMENTED_PREFORM @@ -25599,7 +26065,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r return success_rval; } -#line 1844 "inform7/Chapter 7/Preform.w" +#line 1840 "inform7/Chapter 7/Preform.w" ; } @@ -25607,7 +26073,7 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r if (ptraci) { { -#line 1857 "inform7/Chapter 7/Preform.w" +#line 1853 "inform7/Chapter 7/Preform.w" if (pr->match_number >= 26) { LOG("production /%c%c/: ", 'a'+pr->match_number-26, 'a'+pr->match_number-26); } else { @@ -25615,14 +26081,14 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1849 "inform7/Chapter 7/Preform.w" +#line 1845 "inform7/Chapter 7/Preform.w" ; LOG("failed (%s)\n", (slow_scan_needed)?"slowly":"quickly"); LOG_OUTDENT; } } -#line 1784 "inform7/Chapter 7/Preform.w" +#line 1780 "inform7/Chapter 7/Preform.w" ; } else { if (ptraci) { @@ -25649,23 +26115,23 @@ int Preform__parse_nt_against_word_range(nonterminal *nt, int w1, int w2, int *r } } -#line 1713 "inform7/Chapter 7/Preform.w" +#line 1709 "inform7/Chapter 7/Preform.w" ; } { -#line 1722 "inform7/Chapter 7/Preform.w" +#line 1718 "inform7/Chapter 7/Preform.w" if (ptraci) LOG("Failed\n"); ptraci = teppic; return FALSE; } -#line 1716 "inform7/Chapter 7/Preform.w" +#line 1712 "inform7/Chapter 7/Preform.w" ; } -#line 2181 "inform7/Chapter 7/Preform.w" +#line 2177 "inform7/Chapter 7/Preform.w" int Preform__next_strut_posn_after(int w1, int w2, ptoken *start, int len, int from) { int last_legal_position = w2-len+1; while (from <= last_legal_position) { @@ -25689,7 +26155,7 @@ int Preform__next_strut_posn_after(int w1, int w2, ptoken *start, int len, int f return -1; } -#line 2207 "inform7/Chapter 7/Preform.w" +#line 2203 "inform7/Chapter 7/Preform.w" int Preform__parse_fixed_word_ptoken(int wn, ptoken *pt) { vocabulary_entry *ve = Lexer__word(wn); int m = pt->disallow_unexpected_upper; @@ -25701,7 +26167,7 @@ int Preform__parse_fixed_word_ptoken(int wn, ptoken *pt) { return (pt->negated_ptoken)?TRUE:FALSE; } -#line 84 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 82 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__merge(nonterminal *nt, int pnum, word_assemblage ingredient) { production_list *pl; for (pl = nt->first_production_list; pl; pl = pl->next_production_list) { @@ -25726,12 +26192,12 @@ word_assemblage Preform__Nonparsing__merge(nonterminal *nt, int pnum, word_assem return WordAssemblages__lit_0(); /* give up, in other words */ } -#line 112 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 110 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__wording(nonterminal *nt, int pnum) { return Preform__Nonparsing__merge(nt, pnum, WordAssemblages__lit_0()); } -#line 119 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 117 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry *Preform__Nonparsing__word(nonterminal *nt, int pnum) { word_assemblage wa = Preform__Nonparsing__merge(nt, pnum, WordAssemblages__lit_0()); vocabulary_entry **words; @@ -25741,7 +26207,7 @@ vocabulary_entry *Preform__Nonparsing__word(nonterminal *nt, int pnum) { return NULL; } -#line 133 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 131 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry *Preform__Nonparsing__replace_word(vocabulary_entry *ve, nonterminal *nt_from, nonterminal *nt_to) { production_list *pl_from, *pl_to; @@ -25772,7 +26238,7 @@ vocabulary_entry *Preform__Nonparsing__replace_word(vocabulary_entry *ve, return ve; /* no change, in other words */ } -#line 167 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 165 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__enter_lexicon(nonterminal *nt_from, int pos, char *category, char *gloss) { production_list *pl; for (pl = nt_from->first_production_list; pl; pl = pl->next_production_list) { @@ -25793,7 +26259,7 @@ void Preform__Nonparsing__enter_lexicon(nonterminal *nt_from, int pos, char *cat } } -#line 195 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 193 "inform7/Chapter 7/Non-Parsing Preform.w" match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural_language *nl) { if (nl == NULL) nl = English_language; match_avinue *ave = NULL; @@ -25803,7 +26269,7 @@ match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural if (pl->as_avinue) return pl->as_avinue; { -#line 215 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 213 "inform7/Chapter 7/Non-Parsing Preform.w" int list_grammar = NOT_APPLICABLE; /* i.e., we don't know yet */ production *pr; for (pr = pl->first_production; pr; pr = pr->next_production) { @@ -25816,7 +26282,7 @@ match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural } { -#line 242 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 240 "inform7/Chapter 7/Non-Parsing Preform.w" int this_end = end; ptoken *entry = NULL; if ((first->ptoken_category == MULTIPLE_WILDCARD_PTC) && @@ -25834,17 +26300,17 @@ match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural if (entry) { if (list_grammar == FALSE) { -#line 272 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 270 "inform7/Chapter 7/Non-Parsing Preform.w" Preform__Nonparsing__trie_definition_error(nt, pr, "this should either be a list of other nonterminals, or a list of patterns " "and instructions, but not a mixture"); } -#line 257 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 255 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 279 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 277 "inform7/Chapter 7/Non-Parsing Preform.w" match_avinue *next_mt = Inflections__fresh_avinue(Preform__Nonparsing__define_trie(entry->nt_pt, this_end, nl)); if (ave == NULL) ave = next_mt; @@ -25855,44 +26321,44 @@ match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural } } -#line 258 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 256 "inform7/Chapter 7/Non-Parsing Preform.w" ; list_grammar = TRUE; } else { if (list_grammar == TRUE) { -#line 272 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 270 "inform7/Chapter 7/Non-Parsing Preform.w" Preform__Nonparsing__trie_definition_error(nt, pr, "this should either be a list of other nonterminals, or a list of patterns " "and instructions, but not a mixture"); } -#line 261 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 259 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (second == NULL) Preform__Nonparsing__trie_definition_error(nt, pr, "there should be two words here, a pattern and an instruction"); { -#line 291 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 289 "inform7/Chapter 7/Non-Parsing Preform.w" if (ave == NULL) ave = Inflections__new_avinue(end); Inflections__add_to_avinue(ave, Vocabulary__get_exemplar(first->ve_pt, FALSE), Vocabulary__get_exemplar(second->ve_pt, FALSE)); } -#line 265 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 263 "inform7/Chapter 7/Non-Parsing Preform.w" ; list_grammar = FALSE; } } -#line 225 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 223 "inform7/Chapter 7/Non-Parsing Preform.w" ; } } -#line 202 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 200 "inform7/Chapter 7/Non-Parsing Preform.w" ; pl->as_avinue = ave; } @@ -25900,7 +26366,7 @@ match_avinue *Preform__Nonparsing__define_trie(nonterminal *nt, int end, natural return ave; } -#line 299 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 297 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__log_avinues(void) { nonterminal *nt; LOOP_OVER(nt, nonterminal) { @@ -25916,7 +26382,7 @@ void Preform__Nonparsing__log_avinues(void) { } } -#line 328 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 326 "inform7/Chapter 7/Non-Parsing Preform.w" verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, word_assemblage *overrides, int no_overrides, natural_language *nl) { if (nl == NULL) nl = English_language; @@ -25927,12 +26393,12 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, word_assemblage verb_forms[MAX_FORM_TYPES+1]; { -#line 349 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 347 "inform7/Chapter 7/Non-Parsing Preform.w" int k; for (k=0; k<=MAX_FORM_TYPES; k++) verb_forms[k] = base_text; } -#line 336 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 334 "inform7/Chapter 7/Non-Parsing Preform.w" ; int n = 1, aux_len = 0, avo_flag = FALSE, niv_flag = FALSE; @@ -25941,18 +26407,18 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, { -#line 366 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 364 "inform7/Chapter 7/Non-Parsing Preform.w" int k; for (k=1; kvc_meaning = NULL; vc->infinitive = verb_forms[INFINITIVE_FORM_TYPE]; @@ -25964,7 +26430,7 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, { -#line 394 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 392 "inform7/Chapter 7/Non-Parsing Preform.w" vc->active_tabulation.to_be_auxiliary = WordAssemblages__lit_0(); vc->passive_tabulation.to_be_auxiliary = WordAssemblages__lit_0(); int i, tense, sense; @@ -25976,11 +26442,11 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, } } -#line 383 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 381 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 414 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 412 "inform7/Chapter 7/Non-Parsing Preform.w" production_list *pl; for (pl = tabulation->first_production_list; pl; pl = pl->next_production_list) { if (nl == pl->definition_language) { @@ -25991,11 +26457,11 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, if ((selector) && (selector->ptoken_category == FIXED_WORD_PTC) && (line)) { { -#line 432 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 430 "inform7/Chapter 7/Non-Parsing Preform.w" int active_set = NOT_APPLICABLE, tense_set = -1, sense_set = -1, set_tba = FALSE; { -#line 460 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 458 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry *ve = selector->ve_pt; char *p = Vocabulary__get_exemplar(ve, FALSE); if (p[0] == 'a') active_set = TRUE; @@ -26017,7 +26483,7 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, } } -#line 433 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 431 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (set_tba) @@ -26041,7 +26507,7 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, } } -#line 422 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 420 "inform7/Chapter 7/Non-Parsing Preform.w" ; } else Preform__Nonparsing__conjugation_error(base_text, tabulation, pr, "tabulation row doesn't consist of a selector and then text"); @@ -26050,7 +26516,7 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, } } -#line 384 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 382 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (tabulation == to_be_tabulation_NTM) to_be_conjugation = vc; @@ -26059,11 +26525,11 @@ verb_conjugation *Preform__Nonparsing__conjugate_verb(word_assemblage base_text, return vc; } -#line 343 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 341 "inform7/Chapter 7/Non-Parsing Preform.w" ; } -#line 494 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 492 "inform7/Chapter 7/Non-Parsing Preform.w" nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblage *verb_forms, int *highest_form_written, int *aux_len, int *avo_flag, int *niv_flag, natural_language *nl) { nonterminal *instructions_nt = verb_conjugation_instructions_NTM; @@ -26072,7 +26538,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag *aux_len = 0; *avo_flag = FALSE; *niv_flag = FALSE; { -#line 514 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 512 "inform7/Chapter 7/Non-Parsing Preform.w" vocabulary_entry **base_text_words; int base_text_word_count; WordAssemblages__as_array(&(verb_forms[BASE_FORM_TYPE]), &base_text_words, &base_text_word_count); @@ -26084,7 +26550,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag for (pr = pl->first_production; pr; pr = pr->next_production) { { -#line 545 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 543 "inform7/Chapter 7/Non-Parsing Preform.w" ptoken *pt, *last = NULL; int len = 0, malformed = FALSE; for (pt = pr->first_ptoken; pt; pt = pt->next_ptoken) { last = pt; len++; } @@ -26093,7 +26559,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag int failed_to_match = FALSE, wildcard_from = -1; { -#line 568 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 566 "inform7/Chapter 7/Non-Parsing Preform.w" int word_count = 0; for (pt = pr->first_ptoken; ((pt) && (pt != last)); pt = pt->next_ptoken) { if (pt->ptoken_category == FIXED_WORD_PTC) { @@ -26113,7 +26579,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag } } -#line 551 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 549 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (failed_to_match == FALSE) { conjugation_nt = last->nt_pt; @@ -26129,21 +26595,21 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag "malformed line"); } -#line 523 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 521 "inform7/Chapter 7/Non-Parsing Preform.w" ; } } } } -#line 500 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 498 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (conjugation_nt == NULL) Preform__Nonparsing__conjugation_error(verb_forms[0], instructions_nt, NULL, "the instructions here failed to choose a conjugation"); { -#line 591 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 589 "inform7/Chapter 7/Non-Parsing Preform.w" production_list *pl; for (pl = conjugation_nt->first_production_list; pl; pl = pl->next_production_list) { if (nl == pl->definition_language) { @@ -26166,7 +26632,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag case 2: { -#line 630 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 628 "inform7/Chapter 7/Non-Parsing Preform.w" ptoken *number_token = pr->first_ptoken; ptoken *content_token = number_token->next_ptoken; int n = Preform__Nonparsing__ptoken_to_verb_form_number(number_token); @@ -26184,7 +26650,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag } else malformed = TRUE; } -#line 611 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 609 "inform7/Chapter 7/Non-Parsing Preform.w" ; break; default: malformed = TRUE; break; @@ -26197,7 +26663,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag } } -#line 504 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 502 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (tabulation_nt == NULL) Preform__Nonparsing__conjugation_error(verb_forms[0], conjugation_nt, NULL, @@ -26205,7 +26671,7 @@ nonterminal *Preform__Nonparsing__follow_conjugation_instructions(word_assemblag return tabulation_nt; } -#line 669 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 667 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, int sense, int tense, int person, int num_ingredients, word_assemblage *ingredients, natural_language *nl, int *modal_following) { @@ -26216,7 +26682,7 @@ word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, for (chunk = row; chunk; chunk = chunk->next_ptoken) { { -#line 786 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 784 "inform7/Chapter 7/Non-Parsing Preform.w" if (chunk->ptoken_category == FIXED_WORD_PTC) { char *p = Vocabulary__get_exemplar(chunk->ve_pt, TRUE); if ((p[0] == '+') && (p[1] == '+') && (isdigit(p[2])) && (p[3] == 0)) { @@ -26228,11 +26694,11 @@ word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, } } -#line 677 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 675 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 731 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 729 "inform7/Chapter 7/Non-Parsing Preform.w" int X = Preform__Nonparsing__ptoken_to_verb_form_number(chunk); if ((X >= 0) && (Preform__Nonparsing__ptoken_as_bracket(chunk->next_ptoken))) { verb_form_to_lift = X; @@ -26240,11 +26706,11 @@ word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, } } -#line 678 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 676 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 752 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 750 "inform7/Chapter 7/Non-Parsing Preform.w" if (Preform__Nonparsing__ptoken_as_bracket(chunk) == 1) { chunk = chunk->next_ptoken; /* move past open bracket */ @@ -26277,22 +26743,22 @@ word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, } } -#line 679 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 677 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 692 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 690 "inform7/Chapter 7/Non-Parsing Preform.w" if (chunk->ptoken_category == FIXED_WORD_PTC) { wa = WordAssemblages__join(wa, Preform__Nonparsing__expand_wa_with_endings(chunk->ve_pt, ingredients)); continue; } } -#line 680 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 678 "inform7/Chapter 7/Non-Parsing Preform.w" ; { -#line 705 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 703 "inform7/Chapter 7/Non-Parsing Preform.w" if (chunk->ptoken_category == NONTERMINAL_PTC) { production_list *pl; for (pl = chunk->nt_pt->first_production_list; pl; pl = pl->next_production_list) { @@ -26310,14 +26776,14 @@ word_assemblage Preform__Nonparsing__merge_verb_material(ptoken *row, } } -#line 681 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 679 "inform7/Chapter 7/Non-Parsing Preform.w" ; internal_error("Error in merge material line"); } return Preform__Nonparsing__shorten_wa_with_contractions(wa); } -#line 803 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 801 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__expand_wa_with_endings(vocabulary_entry *ve, word_assemblage *verb_forms) { if (ve == NULL) return WordAssemblages__lit_0(); @@ -26348,7 +26814,7 @@ word_assemblage Preform__Nonparsing__expand_wa_with_endings(vocabulary_entry *ve return WordAssemblages__lit_1(ve); } -#line 856 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 854 "inform7/Chapter 7/Non-Parsing Preform.w" word_assemblage Preform__Nonparsing__shorten_wa_with_contractions(word_assemblage wa) { vocabulary_entry **words; int word_count; @@ -26363,7 +26829,7 @@ word_assemblage Preform__Nonparsing__shorten_wa_with_contractions(word_assemblag int contract_this = FALSE; { -#line 898 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 896 "inform7/Chapter 7/Non-Parsing Preform.w" int incipit = ((unsigned char) q[0]); int first = tolower(HTML__without_accent(incipit)); if ((first == 'a') || (first == 'e') || (first == 'i') || @@ -26371,7 +26837,7 @@ word_assemblage Preform__Nonparsing__shorten_wa_with_contractions(word_assemblag contract_this = TRUE; } -#line 868 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 866 "inform7/Chapter 7/Non-Parsing Preform.w" ; if (contract_this) { int k; @@ -26396,7 +26862,7 @@ word_assemblage Preform__Nonparsing__shorten_wa_with_contractions(word_assemblag return wa; } -#line 908 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 906 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_to_verb_form_number(ptoken *pt) { if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC)) return Preform__Nonparsing__ve_to_verb_form_number(pt->ve_pt); @@ -26411,7 +26877,7 @@ int Preform__Nonparsing__ve_to_verb_form_number(vocabulary_entry *ve) { return -1; } -#line 926 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 924 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_to_tense_indicator(ptoken *pt, int *set_sense) { if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC)) { vocabulary_entry *ve = pt->ve_pt; @@ -26436,7 +26902,7 @@ int Preform__Nonparsing__ptoken_to_tense_indicator(ptoken *pt, int *set_sense) { return -1; } -#line 953 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 951 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__ptoken_as_bracket(ptoken *pt) { if ((pt) && (pt->ptoken_category == FIXED_WORD_PTC)) { vocabulary_entry *ve = pt->ve_pt; @@ -26446,7 +26912,7 @@ int Preform__Nonparsing__ptoken_as_bracket(ptoken *pt) { return 0; } -#line 966 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 964 "inform7/Chapter 7/Non-Parsing Preform.w" int Preform__Nonparsing__compare_ve_with_tails(vocabulary_entry *ve, vocabulary_entry *pattern) { if (ve == pattern) return TRUE; char *p = Vocabulary__get_exemplar(pattern, FALSE); @@ -26461,19 +26927,19 @@ int Preform__Nonparsing__compare_ve_with_tails(vocabulary_entry *ve, vocabulary_ return FALSE; } -#line 987 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 985 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__trie_definition_error(nonterminal *nt, production *pr, char *message) { Preform__Nonparsing__general_npp_error(WordAssemblages__lit_0(), nt, pr, message); } -#line 994 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 992 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__conjugation_error(word_assemblage base_text, nonterminal *nt, production *pr, char *message) { Preform__Nonparsing__general_npp_error(base_text, nt, pr, message); exit(1); } -#line 1003 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1001 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__general_npp_error(word_assemblage base_text, nonterminal *nt, production *pr, char *message) { if (pr) { @@ -26515,7 +26981,7 @@ void Preform__Nonparsing__general_npp_error(word_assemblage base_text, nontermin CLOSE_TEMPORARY_STREAM; } -#line 1051 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1049 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__test_conjugation(OUTPUT_STREAM, int w1, int w2) { verb_conjugation *vc = Preform__Nonparsing__conjugate_verb( WordAssemblages__from_range(w1, w2), NULL, 0, language_of_play); @@ -26563,7 +27029,7 @@ void Preform__Nonparsing__write_conjugation(OUTPUT_STREAM, verb_conjugation *vc) } } -#line 1102 "inform7/Chapter 7/Non-Parsing Preform.w" +#line 1100 "inform7/Chapter 7/Non-Parsing Preform.w" void Preform__Nonparsing__test_participle(OUTPUT_STREAM, int w1, int w2) { verb_conjugation *vc = Preform__Nonparsing__conjugate_verb( WordAssemblages__from_range(w1, w2), NULL, 0, English_language); @@ -27877,9 +28343,9 @@ time_period TimePeriods__parse(int w1, int w2) { return tp; } -#line 61 "inform7/Chapter 9/Adjectives.w" +#line 63 "inform7/Chapter 9/Adjectives.w" int adjective_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 62 "inform7/Chapter 9/Adjectives.w" +#line 64 "inform7/Chapter 9/Adjectives.w" meaning_list *ml = Parser__SP__parse_excerpt(ADJECTIVE_MC, w1, w2); if (ml) { *XP = RETRIEVE_POINTER_adjectival_phrase( @@ -27889,13 +28355,13 @@ int adjective_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 77 "inform7/Chapter 9/Adjectives.w" +#line 79 "inform7/Chapter 9/Adjectives.w" adjectival_phrase *Adjectives__Phrases__parse(int w1, int w2) { if (Preform__parse_nt_against_word_range(adjective_name_NTM, w1, w2, NULL, NULL)) return most_recent_result_p; return NULL; } -#line 86 "inform7/Chapter 9/Adjectives.w" +#line 88 "inform7/Chapter 9/Adjectives.w" adjectival_phrase *Adjectives__Phrases__from_word_range(int w1, int w2, natural_language *nl) { adjectival_phrase *aph = NULL; if (w1 >= 0) aph = Adjectives__Phrases__parse(w1, w2); @@ -27922,16 +28388,16 @@ adjectival_phrase *Adjectives__Phrases__from_word_range(int w1, int w2, natural_ return aph; } -#line 115 "inform7/Chapter 9/Adjectives.w" +#line 117 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__get_text(adjectival_phrase *aph, int *w1, int *w2, int plural) { Clusters__get_name(aph->adjective_names, w1, w2, plural); } -#line 122 "inform7/Chapter 9/Adjectives.w" +#line 124 "inform7/Chapter 9/Adjectives.w" sentence_handler NEW_ADJ_SH_handler = { SENTENCE_NT, NEW_ADJ_VB, 1, Adjectives__Phrases__declare_meaningless }; -#line 128 "inform7/Chapter 9/Adjectives.w" +#line 130 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__declare_meaningless(parse_node *p) { parse_node *adjname = p->down->next; parse_node *meaning = adjname->next; @@ -27973,7 +28439,7 @@ void Adjectives__Phrases__test_adjective(OUTPUT_STREAM, int w1, int w2) { } } -#line 175 "inform7/Chapter 9/Adjectives.w" +#line 177 "inform7/Chapter 9/Adjectives.w" adjectival_phrase *Adjectives__Phrases__declare(adjective_meaning *am, int w1, int w2) { adjectival_phrase *aph = Adjectives__Phrases__from_word_range(w1, w2, NULL); @@ -27988,28 +28454,28 @@ adjectival_phrase *Adjectives__Phrases__declare(adjective_meaning *am, return aph; } -#line 194 "inform7/Chapter 9/Adjectives.w" +#line 196 "inform7/Chapter 9/Adjectives.w" adjectival_phrase *Adjectives__Phrases__get_aph_from_am(adjective_meaning *am) { return am->owning_adjective; } -#line 203 "inform7/Chapter 9/Adjectives.w" +#line 205 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__sortrandom_meanings(adjectival_phrase *aph) { if (aph == NULL) internal_error("tried to sort meanings for null APH"); aph->sorted_meanings = Adjectives__Meanings__list_sort(aph->possible_meanings); } -#line 211 "inform7/Chapter 9/Adjectives.w" +#line 213 "inform7/Chapter 9/Adjectives.w" adjective_meaning *Adjectives__Phrases__get_sorted_definition_list(adjectival_phrase *aph) { return aph->sorted_meanings; } -#line 218 "inform7/Chapter 9/Adjectives.w" +#line 220 "inform7/Chapter 9/Adjectives.w" adjective_meaning *Adjectives__Phrases__first_meaning(adjectival_phrase *aph) { return aph->possible_meanings; } -#line 226 "inform7/Chapter 9/Adjectives.w" +#line 228 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__log(adjectival_phrase *aph) { if (aph == NULL) { LOG(""); return; } int w1, w2; @@ -28018,7 +28484,7 @@ void Adjectives__Phrases__log(adjectival_phrase *aph) { else LOG("A%d'$W'", aph->allocation_id, w1, w2); } -#line 237 "inform7/Chapter 9/Adjectives.w" +#line 239 "inform7/Chapter 9/Adjectives.w" void Adjectives__Phrases__log_meanings(adjectival_phrase *aph) { adjective_meaning *am; int n; @@ -28028,7 +28494,7 @@ void Adjectives__Phrases__log_meanings(adjectival_phrase *aph) { am->domain_infs, am->domain_kind); } -#line 276 "inform7/Chapter 9/Adjectives.w" +#line 278 "inform7/Chapter 9/Adjectives.w" int Adjectives__Phrases__applicable_to(adjectival_phrase *aph, kind *K) { if (aph) { @@ -28049,7 +28515,7 @@ int Adjectives__Phrases__applicable_to(adjectival_phrase *aph, return FALSE; } -#line 301 "inform7/Chapter 9/Adjectives.w" +#line 303 "inform7/Chapter 9/Adjectives.w" instance *Adjectives__Phrases__has_ENUMERATIVE_meaning(adjectival_phrase *aph) { adjective_meaning *am; for (am = aph->possible_meanings; am; am = am->next_meaning) @@ -28066,7 +28532,7 @@ property *Adjectives__Phrases__has_EORP_meaning(adjectival_phrase *aph) { return NULL; } -#line 347 "inform7/Chapter 9/Adjectives.w" +#line 349 "inform7/Chapter 9/Adjectives.w" int Adjectives__Phrases__assert(adjectival_phrase *aph, kind *kind_domain, inference_subject *infs_to_assert_on, specification *val_to_assert_on, int parity) { adjective_meaning *am; @@ -28837,7 +29303,7 @@ int Adjectives__Usages__get_parity(adjective_usage *au) { } #line 177 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern *Semantics__Nouns__LiteralPatterns__lp_new(kind *K, int spw1, int spw2) { +literal_pattern *LiteralPatterns__lp_new(kind *K, int spw1, int spw2) { literal_pattern *lp = CREATE(literal_pattern); lp->plural_form_only = FALSE; lp->singular_form_only = FALSE; @@ -28856,7 +29322,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__lp_new(kind *K, int spw1, in } #line 198 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_token Semantics__Nouns__LiteralPatterns__lpt_new(int t, int nw) { +literal_pattern_token LiteralPatterns__lpt_new(int t, int nw) { literal_pattern_token lpt; lpt.new_word_at = nw; lpt.lpt_type = t; @@ -28866,7 +29332,7 @@ literal_pattern_token Semantics__Nouns__LiteralPatterns__lpt_new(int t, int nw) } #line 210 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_element Semantics__Nouns__LiteralPatterns__lpe_new(int i, int r, int sgn) { +literal_pattern_element LiteralPatterns__lpe_new(int i, int r, int sgn) { literal_pattern_element lpe; if (i == 0) lpe.element_range = -1; else lpe.element_range = r; lpe.element_multiplier = 1; @@ -28881,7 +29347,7 @@ literal_pattern_element Semantics__Nouns__LiteralPatterns__lpe_new(int i, int r, #line 229 "inform7/Chapter 10/Literal Patterns.w" int PM_ZMachineOverflow2_issued = FALSE; -literal_pattern *Semantics__Nouns__LiteralPatterns__list_add(literal_pattern *list_head, +literal_pattern *LiteralPatterns__list_add(literal_pattern *list_head, literal_pattern *new_lp, int using_integer_scaling) { if (list_head == NULL) { @@ -28909,7 +29375,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__list_add(literal_pattern *li lp->scaling = Kinds__Scalings__enlarge(lp->scaling, rescale_factor); - list_head = Semantics__Nouns__LiteralPatterns__lp_list_add_inner(list_head, new_lp); + list_head = LiteralPatterns__lp_list_add_inner(list_head, new_lp); if ((VirtualMachines__is_16_bit()) && (PM_ZMachineOverflow2_issued == FALSE)) for (lp = list_head; lp; lp = lp->next_for_this_kind) @@ -28962,13 +29428,13 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__list_add(literal_pattern *li } #line 317 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern *Semantics__Nouns__LiteralPatterns__lp_list_add_inner(literal_pattern *list_head, literal_pattern *new_lp) { +literal_pattern *LiteralPatterns__lp_list_add_inner(literal_pattern *list_head, literal_pattern *new_lp) { literal_pattern *lp, *lp_prev; new_lp->next_for_this_kind = NULL; if (list_head == NULL) return new_lp; lp = list_head; lp_prev = NULL; while (lp) { - if (Semantics__Nouns__LiteralPatterns__lp_precedes(new_lp, lp)) { + if (LiteralPatterns__lp_precedes(new_lp, lp)) { new_lp->next_for_this_kind = lp; if (lp_prev) lp_prev->next_for_this_kind = new_lp; else list_head = new_lp; @@ -28982,7 +29448,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__lp_list_add_inner(literal_pa } #line 341 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__lp_precedes(literal_pattern *A, literal_pattern *B) { +int LiteralPatterns__lp_precedes(literal_pattern *A, literal_pattern *B) { int s = Kinds__Scalings__compare(A->scaling, B->scaling); if (s > 0) return TRUE; if (s < 0) return FALSE; @@ -28997,7 +29463,7 @@ int Semantics__Nouns__LiteralPatterns__lp_precedes(literal_pattern *A, literal_p } #line 358 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern *Semantics__Nouns__LiteralPatterns__get_benchmark(kind *K) { +literal_pattern *LiteralPatterns__get_benchmark(kind *K) { literal_pattern *lp; LITERAL_FORMS_LOOP(lp, K) if (lp->benchmark) @@ -29006,14 +29472,14 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__get_benchmark(kind *K) { } #line 370 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__scale_factor(kind *K) { - literal_pattern *benchmark_lp = Semantics__Nouns__LiteralPatterns__get_benchmark(K); +int LiteralPatterns__scale_factor(kind *K) { + literal_pattern *benchmark_lp = LiteralPatterns__get_benchmark(K); if (benchmark_lp) return Kinds__Scalings__get_integer_multiplier(benchmark_lp->scaling); return 1; } #line 381 "inform7/Chapter 10/Literal Patterns.w" -int Semantics__Nouns__LiteralPatterns__at_optional_break_point(literal_pattern *lp, int ec, int tc) { +int LiteralPatterns__at_optional_break_point(literal_pattern *lp, int ec, int tc) { if ((ecno_lp_elements) && /* i.e., if there are still numerical elements to supply */ (lp->lp_elements[ec].element_optional) && /* but which are optional */ ((lp->lp_elements[ec].preamble_optional) || /* and either the preamble tokens are also optional */ @@ -29027,7 +29493,7 @@ int waive_lp_overflows = FALSE; int last_LP_problem_at = -1; double latest_constructed_real = 0.0; -kind *Semantics__Nouns__LiteralPatterns__match(literal_pattern *lp, int w1, int w2, int *found) { +kind *LiteralPatterns__match(literal_pattern *lp, int w1, int w2, int *found) { int matched_number = 0, overflow_16_bit_flag = FALSE, overflow_32_bit_flag = FALSE; literal_pattern_element *sign_used_at = NULL, *element_overflow_at = NULL; @@ -29042,7 +29508,7 @@ kind *Semantics__Nouns__LiteralPatterns__match(literal_pattern *lp, int w1, int for (tc=0; tcno_lp_tokens; tc++) { if (wn > w2) { if ((wpos == -1) /* i.e., if we are cleanly at a word boundary */ - && (Semantics__Nouns__LiteralPatterns__at_optional_break_point(lp, ec, tc))) break; + && (LiteralPatterns__at_optional_break_point(lp, ec, tc))) break; return NULL; } switch (lp->lp_tokens[tc].lpt_type) { @@ -29297,7 +29763,7 @@ kind *Semantics__Nouns__LiteralPatterns__match(literal_pattern *lp, int w1, int #line 685 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__gpr_locals(void) { +void LiteralPatterns__gpr_locals(void) { LocalVariables__add_internal_local("wpos"); LocalVariables__add_internal_local("mid_word"); LocalVariables__add_internal_local("matched_number"); @@ -29311,10 +29777,10 @@ void Semantics__Nouns__LiteralPatterns__gpr_locals(void) { } #line 704 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) { +void LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) { int label = lp->allocation_id; int tc, ec; - Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUT, lp); + LiteralPatterns__comment_use_of_lp(OUT, lp); WRITE("wpos = 0; mid_word = false; matched_number = 0;\n"); for (tc=0, ec=0; tcno_lp_tokens; tc++) { @@ -29326,7 +29792,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("if (cur_word == -1) "); if ((lp->lp_elements[ec].preamble_optional) && (lp->lp_tokens[tc].lpt_type == ELEMENT_LPT)) WRITE("jump Failed_LP_%d;\n", label); - else if (Semantics__Nouns__LiteralPatterns__at_optional_break_point(lp, ec, tc)) + else if (LiteralPatterns__at_optional_break_point(lp, ec, tc)) WRITE("jump Succeeded_LP_%d;\n", label); else WRITE("jump Failed_LP_%d;\n", label); @@ -29350,7 +29816,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) #line 762 "inform7/Chapter 10/Literal Patterns.w" { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29361,17 +29827,19 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) } #line 762 "inform7/Chapter 10/Literal Patterns.w" ; - WRITE("if (cur_addr->wpos++ ~= '%c') jump Failed_LP_%d;\n", - Platform__tolower(lp->lp_tokens[tc].token_char), label); + WRITE("if (cur_addr->wpos++ ~= '%c' or '%c') jump Failed_LP_%d;\n", + Platform__tolower(lp->lp_tokens[tc].token_char), + Platform__toupper(lp->lp_tokens[tc].token_char), + label); { -#line 873 "inform7/Chapter 10/Literal Patterns.w" +#line 875 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (wpos == cur_len) {\n"); INDENT; WRITE("wn++; mid_word = false;\n"); OUTDENT; WRITE("}\n"); } -#line 765 "inform7/Chapter 10/Literal Patterns.w" +#line 767 "inform7/Chapter 10/Literal Patterns.w" ; } @@ -29379,11 +29847,11 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) ; break; case ELEMENT_LPT: { -#line 770 "inform7/Chapter 10/Literal Patterns.w" +#line 772 "inform7/Chapter 10/Literal Patterns.w" literal_pattern_element *lpe = &(lp->lp_elements[ec++]); { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29392,7 +29860,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) OUTDENT; WRITE("}\n"); } -#line 771 "inform7/Chapter 10/Literal Patterns.w" +#line 773 "inform7/Chapter 10/Literal Patterns.w" ; if (ec == 1) WRITE("sgn = 1;\n"); if ((lp->number_signed) && (ec == 1)) @@ -29402,7 +29870,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) if (Kinds__FloatingPoint__uses_floating_point(lp->kind_specified)) { -#line 786 "inform7/Chapter 10/Literal Patterns.w" +#line 788 "inform7/Chapter 10/Literal Patterns.w" WRITE("f = 0; x = cur_addr + wpos;\n"); WRITE("while ((wpos < cur_len) && (DigitToValue(cur_addr->wpos)>=0)) { f++, wpos++; }\n"); WRITE("if (f == 0) jump Failed_LP_%d;\n", label); @@ -29416,7 +29884,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("wpos++;\n"); { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29425,7 +29893,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) OUTDENT; WRITE("}\n"); } -#line 797 "inform7/Chapter 10/Literal Patterns.w" +#line 799 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("while ((wpos < cur_len) && (DigitToValue(cur_addr->wpos)>=0)) { f++, wpos++; }\n"); OUTDENT; WRITE("}\n"); @@ -29436,7 +29904,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("mid_word = false;\n"); { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29445,7 +29913,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) OUTDENT; WRITE("}\n"); } -#line 805 "inform7/Chapter 10/Literal Patterns.w" +#line 807 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("}"); WRITE("if ((wpos < cur_len) && (cur_addr->wpos == 'x')) { f = f + tot + 1, wpos++;\n"); @@ -29455,7 +29923,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("mid_word = false;\n"); { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29464,7 +29932,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) OUTDENT; WRITE("}\n"); } -#line 812 "inform7/Chapter 10/Literal Patterns.w" +#line 814 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("}"); WRITE("if ((wpos+3 < cur_len) && (cur_addr->wpos == '1') && " @@ -29479,12 +29947,12 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("matched_number = x;\n"); } -#line 778 "inform7/Chapter 10/Literal Patterns.w" +#line 780 "inform7/Chapter 10/Literal Patterns.w" else { -#line 828 "inform7/Chapter 10/Literal Patterns.w" +#line 830 "inform7/Chapter 10/Literal Patterns.w" WRITE("tot = 0; f = false;\n"); WRITE("while ((wpos < cur_len) && (DigitToValue(cur_addr->wpos)>=0)) {\n"); INDENT; WRITE("f = DigitToValue(cur_addr->wpos);\n"); @@ -29509,7 +29977,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE("mid_word = false;\n"); { -#line 863 "inform7/Chapter 10/Literal Patterns.w" +#line 865 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (mid_word == false) {\n"); INDENT; WRITE("mid_word = true;\n"); WRITE("wpos = 0;\n"); @@ -29518,7 +29986,7 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) OUTDENT; WRITE("}\n"); } -#line 850 "inform7/Chapter 10/Literal Patterns.w" +#line 852 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("for (x = 0, f = %d; (f>1) && (f%%10 == 0) && (DigitToValue(cur_addr->wpos) >= 0);" "f = f/10) {\n", M); INDENT; @@ -29530,17 +29998,17 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) } } -#line 780 "inform7/Chapter 10/Literal Patterns.w" +#line 782 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 873 "inform7/Chapter 10/Literal Patterns.w" +#line 875 "inform7/Chapter 10/Literal Patterns.w" WRITE("if (wpos == cur_len) {\n"); INDENT; WRITE("wn++; mid_word = false;\n"); OUTDENT; WRITE("}\n"); } -#line 781 "inform7/Chapter 10/Literal Patterns.w" +#line 783 "inform7/Chapter 10/Literal Patterns.w" ; } @@ -29567,9 +30035,9 @@ void Semantics__Nouns__LiteralPatterns__gpr(OUTPUT_STREAM, literal_pattern *lp) WRITE(".Failed_LP_%d;\n", label); } -#line 880 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_all(kind *K) { - literal_pattern *lp, *benchmark_lp = Semantics__Nouns__LiteralPatterns__get_benchmark(K); +#line 882 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_all(kind *K) { + literal_pattern *lp, *benchmark_lp = LiteralPatterns__get_benchmark(K); int B = 1, scalings_exist = FALSE; if (benchmark_lp) B = Kinds__Scalings__get_integer_multiplier(benchmark_lp->scaling); @@ -29579,14 +30047,14 @@ void Semantics__Nouns__LiteralPatterns__index_all(kind *K) { { -#line 900 "inform7/Chapter 10/Literal Patterns.w" +#line 902 "inform7/Chapter 10/Literal Patterns.w" int f = FALSE; LITERAL_FORMS_LOOP(lp, K) if ((lp->primary_alternative) && (lp->equivalent_unit == FALSE)) { if (f) INDEX("
"); else INDEX("Written as:
"); if ((scalings_exist) && (benchmark_lp)) { - Semantics__Nouns__LiteralPatterns__index_lp_possibilities(lp, benchmark_lp); + LiteralPatterns__index_lp_possibilities(lp, benchmark_lp); } else { Text__print_raw_text_to_stream(lp->prototype_w1, lp->prototype_w2, ifl); } @@ -29594,26 +30062,26 @@ void Semantics__Nouns__LiteralPatterns__index_all(kind *K) { } } -#line 889 "inform7/Chapter 10/Literal Patterns.w" +#line 891 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 916 "inform7/Chapter 10/Literal Patterns.w" +#line 918 "inform7/Chapter 10/Literal Patterns.w" int f = FALSE; LITERAL_FORMS_LOOP(lp, K) if ((lp->primary_alternative) && (lp->equivalent_unit)) { if (f) INDEX("
"); else INDEX("
With these equivalent units:
"); - Semantics__Nouns__LiteralPatterns__index_lp_possibilities(lp, benchmark_lp); + LiteralPatterns__index_lp_possibilities(lp, benchmark_lp); f = TRUE; } } -#line 890 "inform7/Chapter 10/Literal Patterns.w" +#line 892 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 928 "inform7/Chapter 10/Literal Patterns.w" +#line 930 "inform7/Chapter 10/Literal Patterns.w" int f = FALSE; literal_pattern_name *lpn; LOOP_OVER(lpn, literal_pattern_name) @@ -29636,58 +30104,58 @@ void Semantics__Nouns__LiteralPatterns__index_all(kind *K) { } } -#line 891 "inform7/Chapter 10/Literal Patterns.w" +#line 893 "inform7/Chapter 10/Literal Patterns.w" ; } -#line 953 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_lp_possibilities(literal_pattern *lp, literal_pattern *benchmark_lp) { +#line 955 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_lp_possibilities(literal_pattern *lp, literal_pattern *benchmark_lp) { INDEX("    "); - Semantics__Nouns__LiteralPatterns__index_lp_possibility(lp, benchmark_lp); + LiteralPatterns__index_lp_possibility(lp, benchmark_lp); if (lp->equivalent_unit) { INDEX(" where "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); INDEX(" = "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(benchmark_lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(benchmark_lp, lp->scaling); } else { if (Kinds__Scalings__compare(lp->scaling, benchmark_lp->scaling) < 0) { INDEX(" where "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, benchmark_lp->scaling); + LiteralPatterns__lp_index_quantum_value(lp, benchmark_lp->scaling); INDEX(" = "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(benchmark_lp, benchmark_lp->scaling); + LiteralPatterns__lp_index_quantum_value(benchmark_lp, benchmark_lp->scaling); } if (Kinds__Scalings__compare(lp->scaling, benchmark_lp->scaling) > 0) { INDEX(" where "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); INDEX(" = "); - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(benchmark_lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(benchmark_lp, lp->scaling); } } } -#line 981 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_lp_possibility(literal_pattern *lp, literal_pattern *benchmark_lp) { +#line 983 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_lp_possibility(literal_pattern *lp, literal_pattern *benchmark_lp) { if (lp == benchmark_lp) INDEX(""); if (lp->plural_form_only) - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, Kinds__Scalings__enlarge(lp->scaling, 2)); + LiteralPatterns__lp_index_quantum_value(lp, Kinds__Scalings__enlarge(lp->scaling, 2)); else - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); if (lp == benchmark_lp) INDEX(""); if (lp->next_alternative_lp) { INDEX(" or "); - Semantics__Nouns__LiteralPatterns__index_lp_possibility(lp->next_alternative_lp, benchmark_lp); + LiteralPatterns__index_lp_possibility(lp->next_alternative_lp, benchmark_lp); } } -#line 1000 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_value(literal_pattern *lp_list, int v) { +#line 1002 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_value(literal_pattern *lp_list, int v) { literal_pattern *lp; literal_pattern *lp_possibility = NULL; int k = 0; for (lp = lp_list; lp; lp = lp->next_for_this_kind) { if (v == 0) { if (lp->benchmark) { - Semantics__Nouns__LiteralPatterns__lp_index_value_specific(lp, v); return; + LiteralPatterns__lp_index_value_specific(lp, v); return; } } else { if ((lp->primary_alternative) && (lp->equivalent_unit == FALSE)) { @@ -29696,44 +30164,44 @@ void Semantics__Nouns__LiteralPatterns__index_value(literal_pattern *lp_list, in k = Kinds__Scalings__quantum(lp->scaling); } if (v >= Kinds__Scalings__quantum(lp->scaling)) { - Semantics__Nouns__LiteralPatterns__lp_index_value_specific(lp, v); return; + LiteralPatterns__lp_index_value_specific(lp, v); return; } } } } - if (lp_possibility) Semantics__Nouns__LiteralPatterns__lp_index_value_specific(lp_possibility, v); - else Semantics__Nouns__LiteralPatterns__lp_index_value_specific(lp_list, v); + if (lp_possibility) LiteralPatterns__lp_index_value_specific(lp_possibility, v); + else LiteralPatterns__lp_index_value_specific(lp_list, v); } -#line 1031 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__index_benchmark_value(kind *K) { +#line 1033 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__index_benchmark_value(kind *K) { literal_pattern *lp; LITERAL_FORMS_LOOP(lp, K) if (lp->benchmark) { - Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); + LiteralPatterns__lp_index_quantum_value(lp, lp->scaling); return; } INDEX("1"); } -#line 1045 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__lp_index_quantum_value(literal_pattern *lp, scaling_transformation sc) { +#line 1047 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__lp_index_quantum_value(literal_pattern *lp, scaling_transformation sc) { int v = 0; double real_v = 0.0; if (Kinds__FloatingPoint__uses_floating_point(lp->kind_specified)) real_v = Kinds__Scalings__real_quantum(sc); else v = Kinds__Scalings__quantum(sc); - Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(lp, v, real_v); + LiteralPatterns__lp_index_value_specific_inner(lp, v, real_v); } -void Semantics__Nouns__LiteralPatterns__lp_index_value_specific(literal_pattern *lp, double alt_value) { +void LiteralPatterns__lp_index_value_specific(literal_pattern *lp, double alt_value) { int v = (int) alt_value; double real_v = alt_value; - Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(lp, v, real_v); + LiteralPatterns__lp_index_value_specific_inner(lp, v, real_v); } -void Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(literal_pattern *lp, int v, double real_v) { +void LiteralPatterns__lp_index_value_specific_inner(literal_pattern *lp, int v, double real_v) { if (lp == NULL) { INDEX("--"); return; } int tc, ec; for (tc=0, ec=0; tcno_lp_tokens; tc++) { @@ -29741,24 +30209,24 @@ void Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(literal_pa switch (lp->lp_tokens[tc].lpt_type) { case WORD_LPT: { -#line 1079 "inform7/Chapter 10/Literal Patterns.w" +#line 1081 "inform7/Chapter 10/Literal Patterns.w" if (tc > 0) INDEX(" "); Text__print_literal_string_to_file(ifl, Lexer__word_raw_text(lp->lp_tokens[tc].token_wn)); } -#line 1067 "inform7/Chapter 10/Literal Patterns.w" +#line 1069 "inform7/Chapter 10/Literal Patterns.w" ; break; case CHARACTER_LPT: { -#line 1085 "inform7/Chapter 10/Literal Patterns.w" +#line 1087 "inform7/Chapter 10/Literal Patterns.w" HTML__html_char_out(ifl, lp->lp_tokens[tc].token_char); } -#line 1068 "inform7/Chapter 10/Literal Patterns.w" +#line 1070 "inform7/Chapter 10/Literal Patterns.w" ; break; case ELEMENT_LPT: { -#line 1090 "inform7/Chapter 10/Literal Patterns.w" +#line 1092 "inform7/Chapter 10/Literal Patterns.w" if (Kinds__FloatingPoint__uses_floating_point(lp->kind_specified)) { INDEX("%g", Kinds__Scalings__real_value_to_quanta(real_v, lp->scaling)); } else { @@ -29769,12 +30237,12 @@ void Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(literal_pa else { char *prototype = "%d"; if ((lp->lp_tokens[tc].new_word_at == FALSE) && (lpe->without_leading_zeros == FALSE)) - prototype = Semantics__Nouns__LiteralPatterns__leading_zero_prototype(lpe->element_range); + prototype = LiteralPatterns__leading_zero_prototype(lpe->element_range); INDEX(prototype, (v/(lpe->element_multiplier)) % (lpe->element_range)); } if (ec == 0) { -#line 1110 "inform7/Chapter 10/Literal Patterns.w" +#line 1112 "inform7/Chapter 10/Literal Patterns.w" int ranger = 1, M = Kinds__Scalings__get_integer_multiplier(lp->scaling); while (M > ranger) ranger = ranger*10; remainder = remainder*(ranger/M); @@ -29783,25 +30251,25 @@ void Semantics__Nouns__LiteralPatterns__lp_index_value_specific_inner(literal_pa } if (remainder > 0) { INDEX("."); - INDEX(Semantics__Nouns__LiteralPatterns__leading_zero_prototype(ranger), remainder); + INDEX(LiteralPatterns__leading_zero_prototype(ranger), remainder); } } -#line 1103 "inform7/Chapter 10/Literal Patterns.w" +#line 1105 "inform7/Chapter 10/Literal Patterns.w" ; } ec++; } -#line 1069 "inform7/Chapter 10/Literal Patterns.w" +#line 1071 "inform7/Chapter 10/Literal Patterns.w" ; break; default: internal_error("unknown literal pattern token type"); } } } -#line 1124 "inform7/Chapter 10/Literal Patterns.w" -char *Semantics__Nouns__LiteralPatterns__leading_zero_prototype(int range) { +#line 1126 "inform7/Chapter 10/Literal Patterns.w" +char *LiteralPatterns__leading_zero_prototype(int range) { if (range > 1000000000) return "%010d"; if (range > 100000000) return "%09d"; if (range > 10000000) return "%08d"; @@ -29814,8 +30282,8 @@ char *Semantics__Nouns__LiteralPatterns__leading_zero_prototype(int range) { return "%d"; } -#line 1140 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_pattern *lp_list) { +#line 1142 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_pattern *lp_list) { literal_pattern_name *lpn; literal_pattern *lp; int k; @@ -29841,7 +30309,7 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ WRITE("if (which == %d) {\n", lpn->allocation_id + 1); { -#line 1195 "inform7/Chapter 10/Literal Patterns.w" +#line 1197 "inform7/Chapter 10/Literal Patterns.w" literal_pattern *lpb = NULL; for (lp = lp_list; lp; lp = lp->next_for_this_kind) if (lp->marked_for_printing) @@ -29875,7 +30343,7 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ } } -#line 1164 "inform7/Chapter 10/Literal Patterns.w" +#line 1166 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("}\n\n"); } @@ -29884,7 +30352,7 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ { -#line 1185 "inform7/Chapter 10/Literal Patterns.w" +#line 1187 "inform7/Chapter 10/Literal Patterns.w" for (k=0, lp = lp_list; lp; lp = lp->next_for_this_kind) { int eligible = FALSE; if (lp->equivalent_unit == FALSE) eligible = TRUE; @@ -29893,11 +30361,11 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ } } -#line 1170 "inform7/Chapter 10/Literal Patterns.w" +#line 1172 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1195 "inform7/Chapter 10/Literal Patterns.w" +#line 1197 "inform7/Chapter 10/Literal Patterns.w" literal_pattern *lpb = NULL; for (lp = lp_list; lp; lp = lp->next_for_this_kind) if (lp->marked_for_printing) @@ -29931,7 +30399,7 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ } } -#line 1171 "inform7/Chapter 10/Literal Patterns.w" +#line 1173 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("return;\n"); @@ -29939,16 +30407,16 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ for (lp = lp_list; lp; lp = lp->next_for_this_kind) { { -#line 1230 "inform7/Chapter 10/Literal Patterns.w" +#line 1232 "inform7/Chapter 10/Literal Patterns.w" int tc, ec=0, oc=0; WRITE("\n"); - Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUT, lp); + LiteralPatterns__comment_use_of_lp(OUT, lp); WRITE(".Use_LP_%d;\n", lp->allocation_id); for (tc=0; tcno_lp_tokens; tc++) { if (lp->lp_elements[ec].preamble_optional) { -#line 1295 "inform7/Chapter 10/Literal Patterns.w" +#line 1297 "inform7/Chapter 10/Literal Patterns.w" if (oc == ec) { if (ec == 0) WRITE("if ((value/%d) == 0) rtrue;\n", @@ -29961,24 +30429,24 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ } } -#line 1236 "inform7/Chapter 10/Literal Patterns.w" +#line 1238 "inform7/Chapter 10/Literal Patterns.w" ; if ((tc>0) && (lp->lp_tokens[tc].new_word_at)) WRITE("print \" \";\n"); switch (lp->lp_tokens[tc].lpt_type) { case WORD_LPT: { -#line 1250 "inform7/Chapter 10/Literal Patterns.w" +#line 1252 "inform7/Chapter 10/Literal Patterns.w" WRITE("print \""); CompiledText__from_ISO_string(OUT, Lexer__word_raw_text(lp->lp_tokens[tc].token_wn), 0); WRITE("\";\n"); } -#line 1240 "inform7/Chapter 10/Literal Patterns.w" +#line 1242 "inform7/Chapter 10/Literal Patterns.w" ; break; case CHARACTER_LPT: { -#line 1257 "inform7/Chapter 10/Literal Patterns.w" +#line 1259 "inform7/Chapter 10/Literal Patterns.w" char tiny_string[2]; tiny_string[0] = lp->lp_tokens[tc].token_char; tiny_string[1] = 0; WRITE("print \""); @@ -29986,16 +30454,16 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ WRITE("\";\n"); } -#line 1241 "inform7/Chapter 10/Literal Patterns.w" +#line 1243 "inform7/Chapter 10/Literal Patterns.w" ; break; case ELEMENT_LPT: { -#line 1266 "inform7/Chapter 10/Literal Patterns.w" +#line 1268 "inform7/Chapter 10/Literal Patterns.w" literal_pattern_element *lpe = &(lp->lp_elements[ec]); if (lpe->element_optional) { -#line 1295 "inform7/Chapter 10/Literal Patterns.w" +#line 1297 "inform7/Chapter 10/Literal Patterns.w" if (oc == ec) { if (ec == 0) WRITE("if ((value/%d) == 0) rtrue;\n", @@ -30008,7 +30476,7 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ } } -#line 1268 "inform7/Chapter 10/Literal Patterns.w" +#line 1270 "inform7/Chapter 10/Literal Patterns.w" ; oc = ec + 1; if (lp->no_lp_elements == 1) { @@ -30034,21 +30502,21 @@ void Semantics__Nouns__LiteralPatterns__printing_routine(OUTPUT_STREAM, literal_ ec++; } -#line 1242 "inform7/Chapter 10/Literal Patterns.w" +#line 1244 "inform7/Chapter 10/Literal Patterns.w" ; break; default: internal_error("unknown literal pattern token type"); } } } -#line 1176 "inform7/Chapter 10/Literal Patterns.w" +#line 1178 "inform7/Chapter 10/Literal Patterns.w" ; WRITE("return;\n"); } } -#line 1309 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUTPUT_STREAM, literal_pattern *lp) { +#line 1311 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__comment_use_of_lp(OUTPUT_STREAM, literal_pattern *lp) { WRITE("! "); Text__print_text_to_stream(lp->prototype_w1, lp->prototype_w2, OUT); WRITE(", "); @@ -30056,35 +30524,35 @@ void Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUTPUT_STREAM, literal WRITE("\n"); } -#line 1320 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__log_lp_debugging_data(OUTPUT_STREAM, literal_pattern *lp) { +#line 1322 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__log_lp_debugging_data(OUTPUT_STREAM, literal_pattern *lp) { WRITE("! %s %s LP%d: primary %d, s/p: %d/%d ", (lp->benchmark)?"***":"---", (lp->equivalent_unit)?"equiv":"new ", lp->allocation_id, lp->primary_alternative, lp->singular_form_only, lp->plural_form_only); - Semantics__Nouns__LiteralPatterns__comment_use_of_lp(OUT, lp); + LiteralPatterns__comment_use_of_lp(OUT, lp); } -#line 1342 "inform7/Chapter 10/Literal Patterns.w" +#line 1344 "inform7/Chapter 10/Literal Patterns.w" sentence_handler SPECIFIES_SH_handler = - { SENTENCE_NT, SPECIFIES_VB, 1, Semantics__Nouns__LiteralPatterns__new_literal_specification }; + { SENTENCE_NT, SPECIFIES_VB, 1, LiteralPatterns__new_literal_specification }; -void Semantics__Nouns__LiteralPatterns__new_literal_specification(parse_node *pn) { - Semantics__Nouns__LiteralPatterns__new_literal_specification_list(pn->down->next, pn->down->next->next, NULL); +void LiteralPatterns__new_literal_specification(parse_node *pn) { + LiteralPatterns__new_literal_specification_list(pn->down->next, pn->down->next->next, NULL); } -#line 1359 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_list(parse_node *p, parse_node *q, +#line 1361 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern *LiteralPatterns__new_literal_specification_list(parse_node *p, parse_node *q, literal_pattern *lp_main) { if (ParseTree__type(p) == AND_NT) { - lp_main = Semantics__Nouns__LiteralPatterns__new_literal_specification_list(p->down, q, lp_main); - return Semantics__Nouns__LiteralPatterns__new_literal_specification_list(p->down->next, q, lp_main); + lp_main = LiteralPatterns__new_literal_specification_list(p->down, q, lp_main); + return LiteralPatterns__new_literal_specification_list(p->down->next, q, lp_main); } - return Semantics__Nouns__LiteralPatterns__new_literal_specification_inner(p, q, lp_main); + return LiteralPatterns__new_literal_specification_inner(p, q, lp_main); } -#line 1378 "inform7/Chapter 10/Literal Patterns.w" +#line 1380 "inform7/Chapter 10/Literal Patterns.w" double LP_real_offset = 0.0, LP_real_equivalent = 0.0, LP_real_scaling_amount = 0.0; int LP_scaling, LP_scaling_amount; int LP_equivalent; kind *LP_equivalent_kind; @@ -30092,8 +30560,8 @@ int LP_offset; kind *LP_offset_kind; kind *LP_left_kind, *LP_right_kind; /* used only for dimensional rules */ kind *LP_kind_specified; /* what kind this sentence specifies */ -#line 1388 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_inner(parse_node *p, parse_node *q, +#line 1390 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern *LiteralPatterns__new_literal_specification_inner(parse_node *p, parse_node *q, literal_pattern *owner) { int scaled = 1, scaled_dir = LP_SCALED_UP, offset = 0, integer_scaling = TRUE; parse_node *part_np_list = NULL; @@ -30104,7 +30572,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in { -#line 1450 "inform7/Chapter 10/Literal Patterns.w" +#line 1452 "inform7/Chapter 10/Literal Patterns.w" LP_scaling = LP_SCALED_UP; LP_scaling_amount = 1; LP_real_scaling_amount = 1.0; LP_equivalent = 0; LP_real_equivalent = 0.0; LP_equivalent_kind = NULL; LP_offset = 0; LP_real_offset = 0.0; LP_offset_kind = NULL; @@ -30117,11 +30585,11 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in if (notation_options) notation_groups = most_recent_result_p; } -#line 1397 "inform7/Chapter 10/Literal Patterns.w" +#line 1399 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1546 "inform7/Chapter 10/Literal Patterns.w" +#line 1548 "inform7/Chapter 10/Literal Patterns.w" LP_offset_kind = NULL; Preform__parse_nt_against_word_range(specifies_sentence_object_NTM, q->word_ref1, q->word_ref2, NULL, NULL); switch (most_recent_result) { @@ -30132,25 +30600,25 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in if (K == NULL) return owner; } -#line 1398 "inform7/Chapter 10/Literal Patterns.w" +#line 1400 "inform7/Chapter 10/Literal Patterns.w" ; if (Kinds__FloatingPoint__uses_floating_point(K)) integer_scaling = FALSE; { -#line 1704 "inform7/Chapter 10/Literal Patterns.w" +#line 1706 "inform7/Chapter 10/Literal Patterns.w" if (notation_options == TIMES_LPN) { Kinds__Dimensions__dim_set_multiplication(LP_left_kind, LP_right_kind, K); return owner; } } -#line 1402 "inform7/Chapter 10/Literal Patterns.w" +#line 1404 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1684 "inform7/Chapter 10/Literal Patterns.w" +#line 1686 "inform7/Chapter 10/Literal Patterns.w" waive_lp_overflows = TRUE; kind *K = NULL; if (Preform__parse_nt_against_word_range(literal_NTM, spw1, spw2, NULL, NULL)) K = most_recent_result_p; waive_lp_overflows = FALSE; @@ -30169,11 +30637,11 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1403 "inform7/Chapter 10/Literal Patterns.w" +#line 1405 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1713 "inform7/Chapter 10/Literal Patterns.w" +#line 1715 "inform7/Chapter 10/Literal Patterns.w" if (Kinds__Behaviour__is_built_in(K)) { Problems__Issue__sentence_problem(_P_(PM_LPBuiltInKOV), "you can only specify ways to write new kinds of value", @@ -30189,11 +30657,11 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1404 "inform7/Chapter 10/Literal Patterns.w" +#line 1406 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1645 "inform7/Chapter 10/Literal Patterns.w" +#line 1647 "inform7/Chapter 10/Literal Patterns.w" if (LP_equivalent_kind) { if (Kinds__Compare__eq(LP_equivalent_kind, K)) { scaled_dir = LP_SCALED_UP; scaled = LP_equivalent; @@ -30221,12 +30689,12 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1405 "inform7/Chapter 10/Literal Patterns.w" +#line 1407 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1730 "inform7/Chapter 10/Literal Patterns.w" - lp = Semantics__Nouns__LiteralPatterns__lp_new(K, spw1, spw2); +#line 1732 "inform7/Chapter 10/Literal Patterns.w" + lp = LiteralPatterns__lp_new(K, spw1, spw2); if (LP_equivalent_kind) LP_real_scaling_amount = LP_real_equivalent; lp->scaling = Kinds__Scalings__new(integer_scaling, scaled_dir, scaled, LP_real_scaling_amount, offset, LP_real_offset); @@ -30242,11 +30710,11 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1406 "inform7/Chapter 10/Literal Patterns.w" +#line 1408 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1749 "inform7/Chapter 10/Literal Patterns.w" +#line 1751 "inform7/Chapter 10/Literal Patterns.w" int i, j, tc, ec; for (i=0, tc=0, ec=0; spw1+i<=spw2; i++) { literal_pattern_token new_token; @@ -30256,7 +30724,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in if (digit_found) { -#line 1778 "inform7/Chapter 10/Literal Patterns.w" +#line 1780 "inform7/Chapter 10/Literal Patterns.w" int j, sgn = 1, next_token_begins_word = TRUE; for (j=0; text_of_word[j]; j++) { int tot = 0, digit_found = FALSE, point_found = FALSE; @@ -30279,7 +30747,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in j += 2; point_found = TRUE; } if (digit_found) { - literal_pattern_element new_element = Semantics__Nouns__LiteralPatterns__lpe_new(ec, tot+1, sgn); + literal_pattern_element new_element = LiteralPatterns__lpe_new(ec, tot+1, sgn); if (ec >= MAX_ELEMENTS_PER_LITERAL) { Problems__Issue__sentence_problem(_P_(PM_LPTooManyElements), "that specification contains too many numerical elements", @@ -30290,10 +30758,10 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in if (point_found) integer_scaling = FALSE; lp->lp_elements[ec++] = new_element; if (sgn == -1) lp->number_signed = TRUE; - new_token = Semantics__Nouns__LiteralPatterns__lpt_new(ELEMENT_LPT, next_token_begins_word); + new_token = LiteralPatterns__lpt_new(ELEMENT_LPT, next_token_begins_word); { -#line 1829 "inform7/Chapter 10/Literal Patterns.w" +#line 1831 "inform7/Chapter 10/Literal Patterns.w" if (tc >= MAX_TOKENS_PER_LITERAL) { Problems__Issue__sentence_problem(_P_(PM_LPTooComplicated), "that specification is too complicated", @@ -30303,15 +30771,15 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in lp->lp_tokens[tc++] = new_token; } -#line 1812 "inform7/Chapter 10/Literal Patterns.w" +#line 1814 "inform7/Chapter 10/Literal Patterns.w" ; j--; } else { - new_token = Semantics__Nouns__LiteralPatterns__lpt_new(CHARACTER_LPT, next_token_begins_word); + new_token = LiteralPatterns__lpt_new(CHARACTER_LPT, next_token_begins_word); new_token.token_char = text_of_word[j]; { -#line 1829 "inform7/Chapter 10/Literal Patterns.w" +#line 1831 "inform7/Chapter 10/Literal Patterns.w" if (tc >= MAX_TOKENS_PER_LITERAL) { Problems__Issue__sentence_problem(_P_(PM_LPTooComplicated), "that specification is too complicated", @@ -30321,21 +30789,21 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in lp->lp_tokens[tc++] = new_token; } -#line 1817 "inform7/Chapter 10/Literal Patterns.w" +#line 1819 "inform7/Chapter 10/Literal Patterns.w" ; } sgn = 1; next_token_begins_word = FALSE; } } -#line 1756 "inform7/Chapter 10/Literal Patterns.w" +#line 1758 "inform7/Chapter 10/Literal Patterns.w" else { - new_token = Semantics__Nouns__LiteralPatterns__lpt_new(WORD_LPT, TRUE); + new_token = LiteralPatterns__lpt_new(WORD_LPT, TRUE); new_token.token_wn = spw1+i; { -#line 1829 "inform7/Chapter 10/Literal Patterns.w" +#line 1831 "inform7/Chapter 10/Literal Patterns.w" if (tc >= MAX_TOKENS_PER_LITERAL) { Problems__Issue__sentence_problem(_P_(PM_LPTooComplicated), "that specification is too complicated", @@ -30345,7 +30813,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in lp->lp_tokens[tc++] = new_token; } -#line 1760 "inform7/Chapter 10/Literal Patterns.w" +#line 1762 "inform7/Chapter 10/Literal Patterns.w" ; } } @@ -30360,22 +30828,22 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1407 "inform7/Chapter 10/Literal Patterns.w" +#line 1409 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1840 "inform7/Chapter 10/Literal Patterns.w" +#line 1842 "inform7/Chapter 10/Literal Patterns.w" if (integer_scaling == FALSE) { Kinds__Behaviour__convert_to_real(K); Kinds__Scalings__convert_to_real(&(lp->scaling)); } } -#line 1408 "inform7/Chapter 10/Literal Patterns.w" +#line 1410 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1850 "inform7/Chapter 10/Literal Patterns.w" +#line 1852 "inform7/Chapter 10/Literal Patterns.w" int i, m = 1; for (i=lp->no_lp_elements-1; i>=0; i--) { literal_pattern_element *lpe = &(lp->lp_elements[i]); @@ -30384,7 +30852,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1409 "inform7/Chapter 10/Literal Patterns.w" +#line 1411 "inform7/Chapter 10/Literal Patterns.w" ; if (Kinds__Behaviour__list_of_literal_forms(K) == NULL) lp->benchmark = TRUE; @@ -30393,7 +30861,7 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in if (part_np_list) { { -#line 1860 "inform7/Chapter 10/Literal Patterns.w" +#line 1862 "inform7/Chapter 10/Literal Patterns.w" int i; parse_node *p; for (i=0, p=part_np_list; (ino_lp_elements) && (p); i++, p = p->next) { @@ -30414,11 +30882,11 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1415 "inform7/Chapter 10/Literal Patterns.w" +#line 1417 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 1883 "inform7/Chapter 10/Literal Patterns.w" +#line 1885 "inform7/Chapter 10/Literal Patterns.w" int i, opt_count = 0; for (i=0; ino_lp_elements; i++) if (lp->lp_elements[i].element_optional) { opt_count++; @@ -30437,26 +30905,26 @@ literal_pattern *Semantics__Nouns__LiteralPatterns__new_literal_specification_in } } -#line 1416 "inform7/Chapter 10/Literal Patterns.w" +#line 1418 "inform7/Chapter 10/Literal Patterns.w" ; - Semantics__Nouns__LiteralPatterns__define_packing_phrases(lp, K); + LiteralPatterns__define_packing_phrases(lp, K); } if (owner == NULL) owner = lp; else { -#line 1428 "inform7/Chapter 10/Literal Patterns.w" +#line 1430 "inform7/Chapter 10/Literal Patterns.w" literal_pattern *alt = owner; while ((alt) && (alt->next_alternative_lp)) alt = alt->next_alternative_lp; alt->next_alternative_lp = lp; } -#line 1421 "inform7/Chapter 10/Literal Patterns.w" +#line 1423 "inform7/Chapter 10/Literal Patterns.w" ; return owner; } -#line 1490 "inform7/Chapter 10/Literal Patterns.w" +#line 1492 "inform7/Chapter 10/Literal Patterns.w" int specifies_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; *XP = RP[1]; @@ -30471,7 +30939,7 @@ break; #pragma clang diagnostic pop case 2: { -#line 1521 "inform7/Chapter 10/Literal Patterns.w" +#line 1523 "inform7/Chapter 10/Literal Patterns.w" *X = ABANDON_LPN; *XP = NULL; if (preform_lookahead_mode == FALSE) { Problems__Issue__sentence_problem(_P_(PM_MultiplyingNonKOVs), @@ -30480,7 +30948,7 @@ break; } } -#line 1493 "inform7/Chapter 10/Literal Patterns.w" +#line 1495 "inform7/Chapter 10/Literal Patterns.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -30495,19 +30963,19 @@ break; } return TRUE; } -#line 1495 "inform7/Chapter 10/Literal Patterns.w" +#line 1497 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_group_list_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1] | R[2]; { -#line 1514 "inform7/Chapter 10/Literal Patterns.w" +#line 1516 "inform7/Chapter 10/Literal Patterns.w" *XP = RP[1]; if (RP[1] == NULL) *XP = RP[2]; else if (RP[2]) ((literal_pattern_name *) RP[1])->next_with_rp = RP[2]; } -#line 1497 "inform7/Chapter 10/Literal Patterns.w" +#line 1499 "inform7/Chapter 10/Literal Patterns.w" ;; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -30522,7 +30990,7 @@ break; } return TRUE; } -#line 1499 "inform7/Chapter 10/Literal Patterns.w" +#line 1501 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_group_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30540,7 +31008,7 @@ break; } return TRUE; } -#line 1503 "inform7/Chapter 10/Literal Patterns.w" +#line 1505 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_group_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30554,19 +31022,19 @@ break; #pragma clang diagnostic ignored "-Wunreachable-code" break; #pragma clang diagnostic pop - case 2: *X = IN_LPN; *XP = Semantics__Nouns__LiteralPatterns__new_lpn(-1, -1, RP[1]);; + case 2: *X = IN_LPN; *XP = LiteralPatterns__new_lpn(-1, -1, RP[1]);; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" break; #pragma clang diagnostic pop - case 3: *X = IN_LPN; *XP = Semantics__Nouns__LiteralPatterns__new_lpn(w1, w2, NULL);; + case 3: *X = IN_LPN; *XP = LiteralPatterns__new_lpn(w1, w2, NULL);; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" break; #pragma clang diagnostic pop case 4: { -#line 1531 "inform7/Chapter 10/Literal Patterns.w" +#line 1533 "inform7/Chapter 10/Literal Patterns.w" *X = ABANDON_LPN; *XP = NULL; if (preform_lookahead_mode == FALSE) { Problems__quote_source(1, current_sentence); @@ -30580,7 +31048,7 @@ break; } } -#line 1509 "inform7/Chapter 10/Literal Patterns.w" +#line 1511 "inform7/Chapter 10/Literal Patterns.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -30590,9 +31058,9 @@ break; } return TRUE; } -#line 1510 "inform7/Chapter 10/Literal Patterns.w" +#line 1512 "inform7/Chapter 10/Literal Patterns.w" -#line 1560 "inform7/Chapter 10/Literal Patterns.w" +#line 1562 "inform7/Chapter 10/Literal Patterns.w" int specifies_sentence_object_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[2]; *XP = RP[2]; @@ -30609,7 +31077,7 @@ break; } return TRUE; } -#line 1563 "inform7/Chapter 10/Literal Patterns.w" +#line 1565 "inform7/Chapter 10/Literal Patterns.w" int kind_specified_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30620,7 +31088,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 1586 "inform7/Chapter 10/Literal Patterns.w" +#line 1588 "inform7/Chapter 10/Literal Patterns.w" if (preform_lookahead_mode == FALSE) { Problems__Issue__sentence_problem(_P_(PM_LPNotKOV), "you can only specify ways to write kinds of value", @@ -30628,7 +31096,7 @@ break; } } -#line 1566 "inform7/Chapter 10/Literal Patterns.w" +#line 1568 "inform7/Chapter 10/Literal Patterns.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -30638,7 +31106,7 @@ break; } return TRUE; } -#line 1567 "inform7/Chapter 10/Literal Patterns.w" +#line 1569 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_specification_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30671,7 +31139,7 @@ break; } return TRUE; } -#line 1574 "inform7/Chapter 10/Literal Patterns.w" +#line 1576 "inform7/Chapter 10/Literal Patterns.w" int scaling_instruction_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30709,9 +31177,9 @@ break; } return TRUE; } -#line 1582 "inform7/Chapter 10/Literal Patterns.w" +#line 1584 "inform7/Chapter 10/Literal Patterns.w" -#line 1601 "inform7/Chapter 10/Literal Patterns.w" +#line 1603 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_list_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = 0; *XP = RP[1]; if (RP[1]) ((parse_node *) RP[1])->next = RP[2];; @@ -30728,7 +31196,7 @@ break; } return TRUE; } -#line 1604 "inform7/Chapter 10/Literal Patterns.w" +#line 1606 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30746,7 +31214,7 @@ break; } return TRUE; } -#line 1608 "inform7/Chapter 10/Literal Patterns.w" +#line 1610 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30764,7 +31232,7 @@ break; } return TRUE; } -#line 1612 "inform7/Chapter 10/Literal Patterns.w" +#line 1614 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_option_list_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30782,7 +31250,7 @@ break; } return TRUE; } -#line 1616 "inform7/Chapter 10/Literal Patterns.w" +#line 1618 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_option_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30800,7 +31268,7 @@ break; } return TRUE; } -#line 1620 "inform7/Chapter 10/Literal Patterns.w" +#line 1622 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_part_option_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -30821,7 +31289,7 @@ break; #pragma clang diagnostic pop case 3: { -#line 1630 "inform7/Chapter 10/Literal Patterns.w" +#line 1632 "inform7/Chapter 10/Literal Patterns.w" *X = 0; if (preform_lookahead_mode == FALSE) { Problems__quote_source(1, current_sentence); @@ -30835,7 +31303,7 @@ break; } } -#line 1625 "inform7/Chapter 10/Literal Patterns.w" +#line 1627 "inform7/Chapter 10/Literal Patterns.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -30845,11 +31313,11 @@ break; } return TRUE; } -#line 1626 "inform7/Chapter 10/Literal Patterns.w" +#line 1628 "inform7/Chapter 10/Literal Patterns.w" -#line 1905 "inform7/Chapter 10/Literal Patterns.w" +#line 1907 "inform7/Chapter 10/Literal Patterns.w" int literal_pattern_group_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 1906 "inform7/Chapter 10/Literal Patterns.w" +#line 1908 "inform7/Chapter 10/Literal Patterns.w" literal_pattern_name *lpn; LOOP_OVER(lpn, literal_pattern_name) { if (Text__compare_word_range(lpn->word_ref1, lpn->word_ref2, w1, w2)) { @@ -30859,8 +31327,8 @@ int literal_pattern_group_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 1922 "inform7/Chapter 10/Literal Patterns.w" -literal_pattern_name *Semantics__Nouns__LiteralPatterns__new_lpn(int w1, int w2, literal_pattern_name *existing) { +#line 1924 "inform7/Chapter 10/Literal Patterns.w" +literal_pattern_name *LiteralPatterns__new_lpn(int w1, int w2, literal_pattern_name *existing) { if (preform_lookahead_mode) return NULL; literal_pattern_name *new = CREATE(literal_pattern_name); new->word_ref1 = w1; new->word_ref2 = w2; @@ -30874,8 +31342,8 @@ literal_pattern_name *Semantics__Nouns__LiteralPatterns__new_lpn(int w1, int w2, return new; } -#line 1942 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__define_named_phrases(void) { +#line 1944 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__define_named_phrases(void) { literal_pattern_name *lpn; LOOP_OVER(lpn, literal_pattern_name) lpn->lpn_compiled_already = FALSE; @@ -30886,7 +31354,7 @@ void Semantics__Nouns__LiteralPatterns__define_named_phrases(void) { if (lpn2->lpn_compiled_already == FALSE) { -#line 1971 "inform7/Chapter 10/Literal Patterns.w" +#line 1973 "inform7/Chapter 10/Literal Patterns.w" kind *K = lpn2->can_use_this_lp->kind_specified; TEMPORARY_STREAM; Kinds__Textual__write(TEMP, K); @@ -30914,20 +31382,20 @@ void Semantics__Nouns__LiteralPatterns__define_named_phrases(void) { lpn3->lpn_compiled_already = TRUE; } -#line 1951 "inform7/Chapter 10/Literal Patterns.w" +#line 1953 "inform7/Chapter 10/Literal Patterns.w" ; } } Sentences__RuleSubtrees__register_recently_lexed_phrases(); } -#line 2001 "inform7/Chapter 10/Literal Patterns.w" -void Semantics__Nouns__LiteralPatterns__define_packing_phrases(literal_pattern *lp, kind *K) { +#line 2003 "inform7/Chapter 10/Literal Patterns.w" +void LiteralPatterns__define_packing_phrases(literal_pattern *lp, kind *K) { TEMPORARY_STREAM; Kinds__Textual__write(TEMP, K); { -#line 2024 "inform7/Chapter 10/Literal Patterns.w" +#line 2026 "inform7/Chapter 10/Literal Patterns.w" int i; for (i=0; ino_lp_elements; i++) { literal_pattern_element *lpe = &(lp->lp_elements[i]); @@ -30955,11 +31423,11 @@ void Semantics__Nouns__LiteralPatterns__define_packing_phrases(literal_pattern * } } -#line 2004 "inform7/Chapter 10/Literal Patterns.w" +#line 2006 "inform7/Chapter 10/Literal Patterns.w" ; { -#line 2057 "inform7/Chapter 10/Literal Patterns.w" +#line 2059 "inform7/Chapter 10/Literal Patterns.w" if (lp->no_lp_elements > 0) { int i, x1, x2; char print_rule_buff[1024]; @@ -30996,7 +31464,7 @@ void Semantics__Nouns__LiteralPatterns__define_packing_phrases(literal_pattern * } } -#line 2005 "inform7/Chapter 10/Literal Patterns.w" +#line 2007 "inform7/Chapter 10/Literal Patterns.w" ; Sentences__RuleSubtrees__register_recently_lexed_phrases(); CLOSE_TEMPORARY_STREAM; @@ -31220,7 +31688,7 @@ break; } #line 172 "inform7/Chapter 10/Times of Day.w" -#line 165 "inform7/Chapter 10/Excerpt Meanings.w" +#line 163 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning *Semantics__Nouns__ExcerptMeanings__new(unsigned int mc, unsigned int smc, general_pointer data) { excerpt_meaning *em = CREATE(excerpt_meaning); @@ -31232,7 +31700,7 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__new(unsigned int mc, return em; } -#line 179 "inform7/Chapter 10/Excerpt Meanings.w" +#line 177 "inform7/Chapter 10/Excerpt Meanings.w" unsigned int Semantics__Nouns__ExcerptMeanings__get_secondary_code(excerpt_meaning *em) { if (em->meaning_code != MISCELLANEOUS_MC) internal_error("looked up SMC for non-miscellaneous EM"); @@ -31242,7 +31710,7 @@ general_pointer Semantics__Nouns__ExcerptMeanings__data(excerpt_meaning *em) { return em->data; } -#line 192 "inform7/Chapter 10/Excerpt Meanings.w" +#line 190 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__log_meaning_code(unsigned int mc) { int i, f = FALSE; unsigned int j; @@ -31283,7 +31751,7 @@ void Semantics__Nouns__ExcerptMeanings__log_meaning_code(unsigned int mc) { } } -#line 235 "inform7/Chapter 10/Excerpt Meanings.w" +#line 233 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__log(excerpt_meaning *em) { int i; if (em == NULL) { LOG(""); return; } @@ -31307,7 +31775,7 @@ void Semantics__Nouns__ExcerptMeanings__log_all(void) { LOG("%02d: %08x $M\n", i++, (pointer_sized_int) em, em); } -#line 280 "inform7/Chapter 10/Excerpt Meanings.w" +#line 278 "inform7/Chapter 10/Excerpt Meanings.w" int cached_hash_w1 = -2, cached_hash_w2 = -2, cached_value; int Semantics__Nouns__ExcerptMeanings__hash_code(int w1, int w2) { @@ -31317,20 +31785,20 @@ int Semantics__Nouns__ExcerptMeanings__hash_code(int w1, int w2) { v = Lexer__word(i); if (v) { -#line 334 "inform7/Chapter 10/Excerpt Meanings.w" +#line 332 "inform7/Chapter 10/Excerpt Meanings.w" if ((v->flags) & NUMBER_MC) h = h | 1; else if ((v->flags) & TEXT_MC) h = h | 2; else if ((v->flags) & I6_MC) h = h | 4; else h = h | (8 << ((v->hash) % 27)); } -#line 287 "inform7/Chapter 10/Excerpt Meanings.w" +#line 285 "inform7/Chapter 10/Excerpt Meanings.w" ; } return h; } -#line 309 "inform7/Chapter 10/Excerpt Meanings.w" +#line 307 "inform7/Chapter 10/Excerpt Meanings.w" void Semantics__Nouns__ExcerptMeanings__hash_code_from_token_list(excerpt_meaning *em) { int i, h = 0; if (em->no_em_tokens == 0) internal_error("Empty text when registering"); @@ -31345,42 +31813,42 @@ void Semantics__Nouns__ExcerptMeanings__hash_code_from_token_list(excerpt_meanin vocabulary_entry *v = em->em_tokens[i]; if (v) { -#line 334 "inform7/Chapter 10/Excerpt Meanings.w" +#line 332 "inform7/Chapter 10/Excerpt Meanings.w" if ((v->flags) & NUMBER_MC) h = h | 1; else if ((v->flags) & TEXT_MC) h = h | 2; else if ((v->flags) & I6_MC) h = h | 4; else h = h | (8 << ((v->hash) % 27)); } -#line 321 "inform7/Chapter 10/Excerpt Meanings.w" +#line 319 "inform7/Chapter 10/Excerpt Meanings.w" ; } em->excerpt_hash = h; } -#line 402 "inform7/Chapter 10/Excerpt Meanings.w" +#line 400 "inform7/Chapter 10/Excerpt Meanings.w" meaning_list *blank_says_ml = NULL; void Semantics__Nouns__ExcerptMeanings__register_em(unsigned int meaning_code, excerpt_meaning *em) { Specifications__Cache__warn_expression_cache(); /* the existence of new meanings jeopardises any cached parsing results */ { -#line 433 "inform7/Chapter 10/Excerpt Meanings.w" +#line 431 "inform7/Chapter 10/Excerpt Meanings.w" Semantics__Nouns__ExcerptMeanings__hash_code_from_token_list(em); } -#line 406 "inform7/Chapter 10/Excerpt Meanings.w" +#line 404 "inform7/Chapter 10/Excerpt Meanings.w" ; { -#line 449 "inform7/Chapter 10/Excerpt Meanings.w" +#line 447 "inform7/Chapter 10/Excerpt Meanings.w" int i; for (i=0; ino_em_tokens; i++) if (em->em_tokens[i]) ((em->em_tokens[i])->flags) |= meaning_code; } -#line 407 "inform7/Chapter 10/Excerpt Meanings.w" +#line 405 "inform7/Chapter 10/Excerpt Meanings.w" ; LOGIF(EXCERPT_MEANINGS, @@ -31390,7 +31858,7 @@ void Semantics__Nouns__ExcerptMeanings__register_em(unsigned int meaning_code, e if (meaning_code & SUBSET_PARSING_BITMAP) { { -#line 459 "inform7/Chapter 10/Excerpt Meanings.w" +#line 457 "inform7/Chapter 10/Excerpt Meanings.w" int i; for (i=0; ino_em_tokens; i++) { vocabulary_entry *v = em->em_tokens[i]; @@ -31407,13 +31875,13 @@ void Semantics__Nouns__ExcerptMeanings__register_em(unsigned int meaning_code, e } } -#line 414 "inform7/Chapter 10/Excerpt Meanings.w" +#line 412 "inform7/Chapter 10/Excerpt Meanings.w" ; } else if ((em->no_em_tokens == 1) && (em->em_tokens[0] == NULL) && (meaning_code == SAY_PHRASE_MC)) { { -#line 478 "inform7/Chapter 10/Excerpt Meanings.w" +#line 476 "inform7/Chapter 10/Excerpt Meanings.w" meaning_list *ml = Parser__SP__MeaningLists__new_permanent(em->meaning_code); ml->em = em; if (blank_says_ml) { meaning_list *ml2 = blank_says_ml; @@ -31425,48 +31893,48 @@ void Semantics__Nouns__ExcerptMeanings__register_em(unsigned int meaning_code, e "The blank list with $M is now:\n$m", em, blank_says_ml); } -#line 417 "inform7/Chapter 10/Excerpt Meanings.w" +#line 415 "inform7/Chapter 10/Excerpt Meanings.w" ; } else if (em->em_tokens[0]) { { -#line 491 "inform7/Chapter 10/Excerpt Meanings.w" +#line 489 "inform7/Chapter 10/Excerpt Meanings.w" meaning_list *ml = Parser__SP__MeaningLists__new_permanent(em->meaning_code); ml->em = em; ml->next_alternative = em->em_tokens[0]->start_list; em->em_tokens[0]->start_list = ml; } -#line 419 "inform7/Chapter 10/Excerpt Meanings.w" +#line 417 "inform7/Chapter 10/Excerpt Meanings.w" ; } else if (em->em_tokens[em->no_em_tokens-1]) { { -#line 498 "inform7/Chapter 10/Excerpt Meanings.w" +#line 496 "inform7/Chapter 10/Excerpt Meanings.w" meaning_list *ml = Parser__SP__MeaningLists__new_permanent(em->meaning_code); ml->em = em; ml->next_alternative = em->em_tokens[em->no_em_tokens-1]->end_list; em->em_tokens[em->no_em_tokens-1]->end_list = ml; } -#line 421 "inform7/Chapter 10/Excerpt Meanings.w" +#line 419 "inform7/Chapter 10/Excerpt Meanings.w" ; } else { int i; for (i=1; ino_em_tokens-1; i++) if (em->em_tokens[i]) { { -#line 505 "inform7/Chapter 10/Excerpt Meanings.w" +#line 503 "inform7/Chapter 10/Excerpt Meanings.w" meaning_list *ml = Parser__SP__MeaningLists__new_permanent(em->meaning_code); ml->em = em; ml->next_alternative = em->em_tokens[i]->middle_list; em->em_tokens[i]->middle_list = ml; } -#line 425 "inform7/Chapter 10/Excerpt Meanings.w" +#line 423 "inform7/Chapter 10/Excerpt Meanings.w" ; break; } if (i >= em->no_em_tokens-1) internal_error("registered meaning of two or more #s"); } } -#line 514 "inform7/Chapter 10/Excerpt Meanings.w" +#line 512 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( unsigned int meaning_code, unsigned int secondary, int w1, int w2, general_pointer data) { @@ -31487,20 +31955,20 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( { -#line 551 "inform7/Chapter 10/Excerpt Meanings.w" +#line 549 "inform7/Chapter 10/Excerpt Meanings.w" if ((meaning_code & PARAMETRISED_PARSING_BITMAP) == 0) { if (Preform__test_word(w1, article_NTM)) w1++; if (w1 > w2) internal_error("registered a meaning which was only an article"); } } -#line 532 "inform7/Chapter 10/Excerpt Meanings.w" +#line 530 "inform7/Chapter 10/Excerpt Meanings.w" ; if (meaning_code == SAY_PHRASE_MC) { -#line 573 "inform7/Chapter 10/Excerpt Meanings.w" +#line 571 "inform7/Chapter 10/Excerpt Meanings.w" char *tx = Lexer__word_raw_text(w1); if ((tx[0]) && (isupper(tx[0]))) { vocabulary_entry *ucf = Vocabulary__make_case_sensitive(Lexer__word(w1)); @@ -31511,24 +31979,24 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( } } -#line 535 "inform7/Chapter 10/Excerpt Meanings.w" +#line 533 "inform7/Chapter 10/Excerpt Meanings.w" ; { -#line 594 "inform7/Chapter 10/Excerpt Meanings.w" +#line 592 "inform7/Chapter 10/Excerpt Meanings.w" int i, tc; for (i=0, tc=0; w1+i<=w2; i++) { if (tc >= MAX_TOKENS_PER_EXCERPT_MEANING) { { -#line 663 "inform7/Chapter 10/Excerpt Meanings.w" +#line 661 "inform7/Chapter 10/Excerpt Meanings.w" Problems__Issue__sentence_problem(_P_(PM_TooLongName), "that seems to involve far too long a name", "since in general names are limited to a maximum of 32 words."); } -#line 597 "inform7/Chapter 10/Excerpt Meanings.w" +#line 595 "inform7/Chapter 10/Excerpt Meanings.w" ; break; } @@ -31536,7 +32004,7 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( em->em_tokens[tc++] = NULL; { -#line 611 "inform7/Chapter 10/Excerpt Meanings.w" +#line 609 "inform7/Chapter 10/Excerpt Meanings.w" int bl = 1; i++; while (bl > 0) { if (w1+i>w2) { @@ -31554,14 +32022,14 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( i--; } -#line 602 "inform7/Chapter 10/Excerpt Meanings.w" +#line 600 "inform7/Chapter 10/Excerpt Meanings.w" ; } else em->em_tokens[tc++] = Lexer__word(w1+i); } em->no_em_tokens = tc; } -#line 537 "inform7/Chapter 10/Excerpt Meanings.w" +#line 535 "inform7/Chapter 10/Excerpt Meanings.w" ; Semantics__Nouns__ExcerptMeanings__register_em(meaning_code, em); @@ -31571,7 +32039,7 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register( return em; } -#line 636 "inform7/Chapter 10/Excerpt Meanings.w" +#line 634 "inform7/Chapter 10/Excerpt Meanings.w" excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register_assemblage( unsigned int meaning_code, unsigned int secondary, word_assemblage wa, general_pointer data) { excerpt_meaning *em = Semantics__Nouns__ExcerptMeanings__new(meaning_code, secondary, data); @@ -31584,13 +32052,13 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register_assemblage( if (tc >= MAX_TOKENS_PER_EXCERPT_MEANING) { { -#line 663 "inform7/Chapter 10/Excerpt Meanings.w" +#line 661 "inform7/Chapter 10/Excerpt Meanings.w" Problems__Issue__sentence_problem(_P_(PM_TooLongName), "that seems to involve far too long a name", "since in general names are limited to a maximum of 32 words."); } -#line 646 "inform7/Chapter 10/Excerpt Meanings.w" +#line 644 "inform7/Chapter 10/Excerpt Meanings.w" ; break; } @@ -31604,15 +32072,15 @@ excerpt_meaning *Semantics__Nouns__ExcerptMeanings__register_assemblage( #line 12 "inform7/Chapter 10/Unicode Translations.w" sentence_handler TRANSLATESU_SH_handler = - { SENTENCE_NT, TRANSLATESU_VB, 2, Semantics__Nouns__UnicodeTranslations__unicode_translates }; + { SENTENCE_NT, TRANSLATESU_VB, 2, UnicodeTranslations__unicode_translates }; -void Semantics__Nouns__UnicodeTranslations__unicode_translates(parse_node *pn) { +void UnicodeTranslations__unicode_translates(parse_node *pn) { int nn1, nn2, as1, as2, cc; as1 = pn->down->next->next->word_ref1; as2 = pn->down->next->next->word_ref2; if (Preform__parse_nt_against_word_range(translates_into_unicode_sentence_object_NTM, as1, as2, NULL, NULL) == FALSE) return; cc = most_recent_result; - if (Semantics__Nouns__UnicodeTranslations__char_in_range(cc) == FALSE) return; + if (UnicodeTranslations__char_in_range(cc) == FALSE) return; nn1 = pn->down->next->word_ref1; nn2 = pn->down->next->word_ref2; Preform__parse_nt_against_word_range(translates_into_unicode_sentence_subject_NTM, nn1, nn2, NULL, NULL); @@ -31680,7 +32148,7 @@ break; #line 80 "inform7/Chapter 10/Unicode Translations.w" int unicode_character_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { - case 0: *X = R[1]; if (!(Semantics__Nouns__UnicodeTranslations__char_in_range(R[1]))) return FALSE;; + case 0: *X = R[1]; if (!(UnicodeTranslations__char_in_range(R[1]))) return FALSE;; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" break; @@ -31710,7 +32178,7 @@ int unicode_character_name_NTMR(int w1, int w2, int *X, void **XP) { } #line 99 "inform7/Chapter 10/Unicode Translations.w" -int Semantics__Nouns__UnicodeTranslations__char_in_range(int cc) { +int UnicodeTranslations__char_in_range(int cc) { if ((cc < 0) || (cc >= 0x10000)) { Problems__Issue__sentence_problem(_P_(PM_UnicodeOutOfRange), "Inform can only handle Unicode characters in the 16-bit range", @@ -31937,11 +32405,11 @@ nametag *Nametags__disambiguate(meaning_list *ml, int priority) { return first_nt; } -#line 326 "inform7/Chapter 10/Nametags.w" +#line 329 "inform7/Chapter 10/Nametags.w" sentence_handler TRANSLATESL_SH_handler = { SENTENCE_NT, TRANSLATESL_VB, 1, Nametags__nl_translates }; -#line 335 "inform7/Chapter 10/Nametags.w" +#line 338 "inform7/Chapter 10/Nametags.w" int translates_into_nl_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRANS_KIND; *XP = RP[1]; @@ -31958,9 +32426,9 @@ break; } return TRUE; } -#line 338 "inform7/Chapter 10/Nametags.w" +#line 341 "inform7/Chapter 10/Nametags.w" -#line 342 "inform7/Chapter 10/Nametags.w" +#line 345 "inform7/Chapter 10/Nametags.w" void Nametags__nl_translates(parse_node *pn) { int nn1, nn2, as1, as2; @@ -33559,7 +34027,7 @@ void Data__Objects__index_instances(kind *K, int depth) { } } -#line 339 "inform7/Chapter 11/Binary Predicates.w" +#line 333 "inform7/Chapter 11/Binary Predicates.w" bp_term_details BinaryPredicates__new_term(inference_subject *infs) { bp_term_details bptd; bptd.word_ref1 = -1; bptd.word_ref2 = -1; @@ -33570,7 +34038,7 @@ bp_term_details BinaryPredicates__new_term(inference_subject *infs) { return bptd; } -#line 352 "inform7/Chapter 11/Binary Predicates.w" +#line 346 "inform7/Chapter 11/Binary Predicates.w" bp_term_details BinaryPredicates__full_new_term(inference_subject *infs, kind *K, int c1, int c2, i6_schema *f) { bp_term_details bptd = BinaryPredicates__new_term(infs); @@ -33580,14 +34048,14 @@ bp_term_details BinaryPredicates__full_new_term(inference_subject *infs, kind *K return bptd; } -#line 365 "inform7/Chapter 11/Binary Predicates.w" +#line 359 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_term_domain(bp_term_details *bptd, kind *K) { if (bptd == NULL) internal_error("no BPTD"); bptd->implies_kind = K; bptd->implies_infs = Kinds__Behaviour__as_subject(K); } -#line 374 "inform7/Chapter 11/Binary Predicates.w" +#line 368 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_term_function(bp_term_details *bptd, i6_schema *f) { if (bptd == NULL) internal_error("no BPTD"); bptd->function_of_other = f; @@ -33598,7 +34066,7 @@ i6_schema *BinaryPredicates__get_term_function(bp_term_details *bptd) { return bptd->function_of_other; } -#line 387 "inform7/Chapter 11/Binary Predicates.w" +#line 381 "inform7/Chapter 11/Binary Predicates.w" kind *BinaryPredicates__kind(binary_predicate *bp) { if (bp == R_equality) return Kinds__binary_construction(CON_relation, K_value, K_value); kind *K0 = BinaryPredicates__kind_of_term(&(bp->term_details[0])); @@ -33608,14 +34076,14 @@ kind *BinaryPredicates__kind(binary_predicate *bp) { return Kinds__binary_construction(CON_relation, K0, K1); } -#line 399 "inform7/Chapter 11/Binary Predicates.w" +#line 393 "inform7/Chapter 11/Binary Predicates.w" kind *BinaryPredicates__kind_of_term(bp_term_details *bptd) { if (bptd == NULL) return NULL; if (bptd->implies_kind) return bptd->implies_kind; return InferenceSubjects__domain(bptd->implies_infs); } -#line 408 "inform7/Chapter 11/Binary Predicates.w" +#line 402 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__index_term_details(bp_term_details *bptd) { if (bptd->index_term_as) { INDEX("%s", bptd->index_term_as); return; } int w1 = -1, w2 = -1; @@ -33623,7 +34091,7 @@ void BinaryPredicates__index_term_details(bp_term_details *bptd) { if (w1 >= 0) Text__print_text_to_stream(w1, w2, ifl); else INDEX("--"); } -#line 421 "inform7/Chapter 11/Binary Predicates.w" +#line 415 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__add_term_as_call_parameter(OUTPUT_STREAM, ph_stack_frame *phsf, bp_term_details bptd) { kind *K = BinaryPredicates__kind_of_term(&bptd); kind *PK = K; @@ -33635,7 +34103,7 @@ void BinaryPredicates__add_term_as_call_parameter(OUTPUT_STREAM, ph_stack_frame LocalVariables__lvalue(lvar), Kinds__Behaviour__I6_classname(K)); } -#line 435 "inform7/Chapter 11/Binary Predicates.w" +#line 429 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_index_details(binary_predicate *bp, char *left, char *right) { if (left) { bp->term_details[0].index_term_as = left; @@ -33647,7 +34115,7 @@ void BinaryPredicates__set_index_details(binary_predicate *bp, char *left, char } } -#line 463 "inform7/Chapter 11/Binary Predicates.w" +#line 457 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *BinaryPredicates__make_equality(void) { binary_predicate *bp = BinaryPredicates__make_single(EQUALITY_KBP, BinaryPredicates__new_term(NULL), BinaryPredicates__new_term(NULL), @@ -33658,7 +34126,7 @@ binary_predicate *BinaryPredicates__make_equality(void) { return bp; } -#line 484 "inform7/Chapter 11/Binary Predicates.w" +#line 478 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *BinaryPredicates__make_pair(int family, bp_term_details left_term, bp_term_details right_term, char *name, char *namer, property *pn, @@ -33686,7 +34154,7 @@ binary_predicate *BinaryPredicates__make_pair(int family, return bp; } -#line 518 "inform7/Chapter 11/Binary Predicates.w" +#line 512 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *BinaryPredicates__make_pair_sketchily(word_assemblage wa, int f) { char *name = Vocabulary__get_exemplar(WordAssemblages__first_word(&wa), FALSE); binary_predicate *bp = @@ -33698,7 +34166,7 @@ binary_predicate *BinaryPredicates__make_pair_sketchily(word_assemblage wa, int return bp; } -#line 541 "inform7/Chapter 11/Binary Predicates.w" +#line 535 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *BinaryPredicates__make_single(int family, bp_term_details left_term, bp_term_details right_term, char *name, property *pn, @@ -33750,7 +34218,7 @@ binary_predicate *BinaryPredicates__make_single(int family, return bp; } -#line 595 "inform7/Chapter 11/Binary Predicates.w" +#line 589 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__SUBJ_get_name_text(inference_subject *from, int *w1, int *w2) { /* nameless */ } @@ -33823,7 +34291,7 @@ void BinaryPredicates__SUBJ_compile(OUTPUT_STREAM, inference_subject *infs) { } } -#line 670 "inform7/Chapter 11/Binary Predicates.w" +#line 664 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__log_term_details(bp_term_details *bptd, int i) { LOG(" function(%d): $i\n", i, bptd->function_of_other); if (bptd->word_ref1 >= 0) LOG(" term %d is '$W'\n", i, bptd->word_ref1, bptd->word_ref2); @@ -33847,9 +34315,9 @@ void BinaryPredicates__log(binary_predicate *bp) { LOG(" storage property: $Y\n", bp->i6_storage_property); } -#line 700 "inform7/Chapter 11/Binary Predicates.w" +#line 694 "inform7/Chapter 11/Binary Predicates.w" int relation_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 701 "inform7/Chapter 11/Binary Predicates.w" +#line 695 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *bp; LOOP_OVER(bp, binary_predicate) if (WordAssemblages__compare_with_range(&(bp->relation_name), w1, w2)) { @@ -33858,12 +34326,12 @@ int relation_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 712 "inform7/Chapter 11/Binary Predicates.w" +#line 706 "inform7/Chapter 11/Binary Predicates.w" char *BinaryPredicates__get_log_name(binary_predicate *bp) { return bp->debugging_log_name; } -#line 719 "inform7/Chapter 11/Binary Predicates.w" +#line 713 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__get_form_of_relation(binary_predicate *bp) { return bp->form_of_relation; } @@ -33892,7 +34360,7 @@ parse_node *BinaryPredicates__get_bp_created_at(binary_predicate *bp) { return bp->bp_created_at; } -#line 750 "inform7/Chapter 11/Binary Predicates.w" +#line 744 "inform7/Chapter 11/Binary Predicates.w" kind *BinaryPredicates__term_kind(binary_predicate *bp, int t) { return BinaryPredicates__kind_of_term(&(bp->term_details[t])); } @@ -33900,7 +34368,7 @@ i6_schema *BinaryPredicates__get_term_as_function_of_other(binary_predicate *bp, return bp->term_details[t].function_of_other; } -#line 760 "inform7/Chapter 11/Binary Predicates.w" +#line 754 "inform7/Chapter 11/Binary Predicates.w" binary_predicate *BinaryPredicates__get_reversal(binary_predicate *bp) { return bp->reversal; } @@ -33909,7 +34377,7 @@ int BinaryPredicates__is_the_wrong_way_round(binary_predicate *bp) { return FALSE; } -#line 771 "inform7/Chapter 11/Binary Predicates.w" +#line 765 "inform7/Chapter 11/Binary Predicates.w" i6_schema *BinaryPredicates__get_test_function(binary_predicate *bp) { return bp->test_function; } @@ -33919,7 +34387,7 @@ int BinaryPredicates__can_be_made_true_at_runtime(binary_predicate *bp) { return FALSE; } -#line 788 "inform7/Chapter 11/Binary Predicates.w" +#line 782 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__allow_arbitrary_assertions(binary_predicate *bp) { return bp->arbitrary; } @@ -33933,7 +34401,7 @@ inference_subject *BinaryPredicates__as_subject(binary_predicate *bp) { return bp->knowledge_about_bp; } -#line 804 "inform7/Chapter 11/Binary Predicates.w" +#line 798 "inform7/Chapter 11/Binary Predicates.w" property *BinaryPredicates__get_i6_storage_property(binary_predicate *bp) { return bp->i6_storage_property; } @@ -33944,18 +34412,18 @@ void BinaryPredicates__mark_as_needed(binary_predicate *bp) { bp->record_needed = TRUE; } -#line 817 "inform7/Chapter 11/Binary Predicates.w" +#line 811 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__set_comparison_details(binary_predicate *bp, int sign, property *prn) { bp->comparison_sign = sign; bp->comparative_property = prn; } -#line 834 "inform7/Chapter 11/Binary Predicates.w" +#line 828 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__write_optimised_loop_schema(i6_schema *sch, binary_predicate *bp) { if (bp == NULL) return FALSE; { -#line 847 "inform7/Chapter 11/Binary Predicates.w" +#line 841 "inform7/Chapter 11/Binary Predicates.w" if (bp->loop_parent_optimisation_ranger) { Calculus__Schemas__modify(sch, "for (*1=%s(*2): *1: *1=%s(*2,*1))", @@ -33965,11 +34433,11 @@ int BinaryPredicates__write_optimised_loop_schema(i6_schema *sch, binary_predica } } -#line 836 "inform7/Chapter 11/Binary Predicates.w" +#line 830 "inform7/Chapter 11/Binary Predicates.w" ; { -#line 864 "inform7/Chapter 11/Binary Predicates.w" +#line 858 "inform7/Chapter 11/Binary Predicates.w" if (bp->loop_parent_optimisation_proviso) { Calculus__Schemas__modify(sch, "objectloop (*1 in *2) if (%s(*1)==parent(*1))", @@ -33978,12 +34446,12 @@ int BinaryPredicates__write_optimised_loop_schema(i6_schema *sch, binary_predica } } -#line 837 "inform7/Chapter 11/Binary Predicates.w" +#line 831 "inform7/Chapter 11/Binary Predicates.w" ; return FALSE; } -#line 877 "inform7/Chapter 11/Binary Predicates.w" +#line 871 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__make_built_in(void) { Calculus__Equality__REL_create_initial_stock(); Properties__ProvisionRelation__REL_create_initial_stock(); @@ -33998,7 +34466,7 @@ void BinaryPredicates__make_built_in(void) { Relations__Explicit__REL_create_initial_stock(); } -#line 894 "inform7/Chapter 11/Binary Predicates.w" +#line 888 "inform7/Chapter 11/Binary Predicates.w" void BinaryPredicates__make_built_in_further(void) { Calculus__Equality__REL_create_second_stock(); Properties__ProvisionRelation__REL_create_second_stock(); @@ -34013,7 +34481,7 @@ void BinaryPredicates__make_built_in_further(void) { Relations__Explicit__REL_create_second_stock(); } -#line 914 "inform7/Chapter 11/Binary Predicates.w" +#line 908 "inform7/Chapter 11/Binary Predicates.w" int BinaryPredicates__typecheck(binary_predicate *bp, kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) { int result = DECLINE_TO_MATCH; @@ -35454,7 +35922,7 @@ void Relations__equivalence_relation_make_singleton_partitions(binary_predicate bp->equivalence_partition = partition_array; } -#line 1551 "inform7/Chapter 11/Relations.w" +#line 1550 "inform7/Chapter 11/Relations.w" void Relations__equivalence_relation_merge_classes(binary_predicate *bp, int domain_size, int ix1, int ix2) { if (bp->form_of_relation != Relation_Equiv) @@ -35473,7 +35941,7 @@ void Relations__equivalence_relation_merge_classes(binary_predicate *bp, partition_array[i] = little; } -#line 1575 "inform7/Chapter 11/Relations.w" +#line 1574 "inform7/Chapter 11/Relations.w" void Relations__equivalence_relation_add_properties(binary_predicate *bp) { kind *k = BinaryPredicates__term_kind(bp, 1); if (Kinds__Compare__le(k, K_object)) { @@ -35482,13 +35950,13 @@ void Relations__equivalence_relation_add_properties(binary_predicate *bp) { inference_subject *infs = Instances__as_subject(I); { -#line 1595 "inform7/Chapter 11/Relations.w" +#line 1594 "inform7/Chapter 11/Relations.w" specification *val = Specifications__Values__new_integer_literal( Relations__equivalence_relation_get_class(bp, infs->allocation_id)); Properties__Valued__assert(bp->i6_storage_property, infs, val, CERTAIN_CE); } -#line 1581 "inform7/Chapter 11/Relations.w" +#line 1580 "inform7/Chapter 11/Relations.w" ; } } else { @@ -35497,19 +35965,19 @@ void Relations__equivalence_relation_add_properties(binary_predicate *bp) { inference_subject *infs = Instances__as_subject(nc); { -#line 1595 "inform7/Chapter 11/Relations.w" +#line 1594 "inform7/Chapter 11/Relations.w" specification *val = Specifications__Values__new_integer_literal( Relations__equivalence_relation_get_class(bp, infs->allocation_id)); Properties__Valued__assert(bp->i6_storage_property, infs, val, CERTAIN_CE); } -#line 1587 "inform7/Chapter 11/Relations.w" +#line 1586 "inform7/Chapter 11/Relations.w" ; } } } -#line 1602 "inform7/Chapter 11/Relations.w" +#line 1601 "inform7/Chapter 11/Relations.w" int Relations__equivalence_relation_get_class(binary_predicate *bp, int ix) { if (bp->form_of_relation != Relation_Equiv) internal_error("attempt to merge classes for a non-equivalence relation"); @@ -35520,7 +35988,7 @@ int Relations__equivalence_relation_get_class(binary_predicate *bp, int ix) { return partition_array[ix]; } -#line 1621 "inform7/Chapter 11/Relations.w" +#line 1620 "inform7/Chapter 11/Relations.w" void Relations__check_1to1_relation(binary_predicate *bp) { int nc = NUMBER_CREATED(inference_subject); int *right_counts = (int *) @@ -35574,7 +36042,7 @@ void Relations__check_1to1_relation(binary_predicate *bp) { Memory__I7_free(right_counts, OBJECT_COMPILATION_MREASON); } -#line 1686 "inform7/Chapter 11/Relations.w" +#line 1685 "inform7/Chapter 11/Relations.w" void Relations__compile_defined_relations(OUTPUT_STREAM) { Relations__compile_relation_records(OUT); binary_predicate *bp; @@ -35669,7 +36137,7 @@ void Relations__compile_defined_relations(OUTPUT_STREAM) { } } -#line 1783 "inform7/Chapter 11/Relations.w" +#line 1782 "inform7/Chapter 11/Relations.w" void Relations__compile_routine_to_decide(OUTPUT_STREAM, char *rname, int w1, int w2, bp_term_details par1, bp_term_details par2) { @@ -35695,7 +36163,7 @@ void Relations__compile_routine_to_decide(OUTPUT_STREAM, char *rname, OUT = Routines__end(OUT); } -#line 1812 "inform7/Chapter 11/Relations.w" +#line 1811 "inform7/Chapter 11/Relations.w" void Relations__index_table(void) { binary_predicate *bp; INDEX("

"); @@ -35743,7 +36211,7 @@ void Relations__index_table(void) { INDEX("

"); } -#line 1862 "inform7/Chapter 11/Relations.w" +#line 1861 "inform7/Chapter 11/Relations.w" void Relations__index_for_verbs(binary_predicate *bp) { INDEX(" ... "); if (bp->right_way_round == FALSE) { @@ -37256,7 +37724,7 @@ int same_property_as_in_lexicon_NTMC(int *X, void **XP, int *R, void **RP, int w } #line 221 "inform7/Chapter 11/Prepositions.w" -#line 239 "inform7/Chapter 12/Lexer.w" +#line 233 "inform7/Chapter 12/Lexer.w" char *lexer_workspace; /* Large area of contiguous memory for text */ char *lexer_word; /* Start of current word in workspace */ char *lexer_hwm; /* High water mark of workspace */ @@ -37269,7 +37737,7 @@ void Lexer__start(void) { Vocabulary__start_hash_table(); } -#line 258 "inform7/Chapter 12/Lexer.w" +#line 252 "inform7/Chapter 12/Lexer.w" int current_lw_array_size = 0, next_lw_array_size = 75000; void Lexer__ensure_space_up_to(int n) { @@ -37301,7 +37769,7 @@ void Lexer__ensure_space_up_to(int n) { current_lw_array_size = new_size; } -#line 296 "inform7/Chapter 12/Lexer.w" +#line 290 "inform7/Chapter 12/Lexer.w" void Lexer__ensure_lexer_hwm_can_be_raised_by(int n, int transfer_partial_word) { if (lexer_hwm + n + 2 >= lexer_workspace_end) { char *old_hwm = lexer_hwm; @@ -37324,7 +37792,7 @@ void Lexer__allocate_lexer_workspace_chunk(void) { lexer_workspace_end = lexer_workspace + TEXT_STORAGE_CHUNK_SIZE; } -#line 325 "inform7/Chapter 12/Lexer.w" +#line 319 "inform7/Chapter 12/Lexer.w" char *Lexer__copy_to_memory(char *p) { Lexer__ensure_lexer_hwm_can_be_raised_by(Platform__strlen(p), FALSE); char *q = lexer_hwm; @@ -37333,13 +37801,13 @@ char *Lexer__copy_to_memory(char *p) { return q; } -#line 364 "inform7/Chapter 12/Lexer.w" +#line 358 "inform7/Chapter 12/Lexer.w" char *lexer_punctuation_marks = ""; int lexer_divide_strings_at_text_substitutions; /* Break up text substitutions in quoted text */ int lexer_allow_I6_escapes; /* Recognise |(-| and |-)| */ int lexer_wait_for_dashes; /* Ignore all text until first |----| found */ -#line 374 "inform7/Chapter 12/Lexer.w" +#line 368 "inform7/Chapter 12/Lexer.w" int Lexer__is_punctuation(char c) { int i; for (i=0; lexer_punctuation_marks[i]; i++) @@ -37348,7 +37816,7 @@ int Lexer__is_punctuation(char c) { return FALSE; } -#line 391 "inform7/Chapter 12/Lexer.w" +#line 385 "inform7/Chapter 12/Lexer.w" int Lexer__indentation_level(int wn) { int q = lw_array[wn].lw_break - 'A' + 1; if ((q >= 1) && (q <= GROSS_AMOUNT_OF_INDENTATION)) return q; @@ -37361,7 +37829,7 @@ char Lexer__break_char_for_indents(int t) { return (char) ('A' + t - 1); } -#line 406 "inform7/Chapter 12/Lexer.w" +#line 400 "inform7/Chapter 12/Lexer.w" vocabulary_entry *Lexer__word(int wn) { return lw_array[wn].lw_identity; } @@ -37402,13 +37870,13 @@ void Lexer__word_copy(int to, int from) { lw_array[to] = lw_array[from]; } -#line 467 "inform7/Chapter 12/Lexer.w" +#line 461 "inform7/Chapter 12/Lexer.w" int lxs_previous_char_in_raw_feed; /* Preceding character in raw file read */ -#line 480 "inform7/Chapter 12/Lexer.w" +#line 474 "inform7/Chapter 12/Lexer.w" int lxs_kind_of_word; /* One of the defined values above */ -#line 492 "inform7/Chapter 12/Lexer.w" +#line 486 "inform7/Chapter 12/Lexer.w" int lxs_literal_mode; /* Are we in literal or ordinary mode? */ /* significant in ordinary mode: */ @@ -37422,7 +37890,7 @@ int lxs_scanning_text_substitution; /* Used to break up strings at [substitution int lxs_comment_nesting; /* For square brackets within square brackets */ int lxs_string_soak_up_spaces_mode; /* Used to fold strings which break across lines */ -#line 511 "inform7/Chapter 12/Lexer.w" +#line 505 "inform7/Chapter 12/Lexer.w" void Lexer__reset_lexer(void) { lexer_word = lexer_hwm; lxs_previous_char_in_raw_feed = EOF; @@ -37447,7 +37915,7 @@ void Lexer__reset_lexer(void) { lxs_comment_nesting = 0; } -#line 550 "inform7/Chapter 12/Lexer.w" +#line 544 "inform7/Chapter 12/Lexer.w" int lexer_feed_started_at = -1; void Lexer__feed_begins(source_location sl) { @@ -37464,7 +37932,7 @@ void Lexer__feed_ends(int *range_read_w1, int *range_read_w2, int extra_padding, { -#line 589 "inform7/Chapter 12/Lexer.w" +#line 583 "inform7/Chapter 12/Lexer.w" if (extra_padding == FALSE) { Lexer__feed_char_into_lexer(' '); } else { @@ -37477,7 +37945,7 @@ void Lexer__feed_ends(int *range_read_w1, int *range_read_w2, int extra_padding, } } -#line 564 "inform7/Chapter 12/Lexer.w" +#line 558 "inform7/Chapter 12/Lexer.w" ; *range_read_w1 = lexer_feed_started_at; *range_read_w2 = lexer_wordcount-1; @@ -37485,7 +37953,7 @@ void Lexer__feed_ends(int *range_read_w1, int *range_read_w2, int extra_padding, LOGIF(LEXICAL_OUTPUT, "Lexer feed ended at %d\n", *range_read_w2); { -#line 605 "inform7/Chapter 12/Lexer.w" +#line 599 "inform7/Chapter 12/Lexer.w" if (lxs_kind_of_word != ORDINARY_KW) { if (lexer_wordcount >= 20) { LOG("Last words: $W\n", lexer_wordcount-20, lexer_wordcount-1); @@ -37531,11 +37999,11 @@ void Lexer__feed_ends(int *range_read_w1, int *range_read_w2, int extra_padding, lxs_kind_of_word = ORDINARY_KW; } -#line 569 "inform7/Chapter 12/Lexer.w" +#line 563 "inform7/Chapter 12/Lexer.w" ; } -#line 674 "inform7/Chapter 12/Lexer.w" +#line 668 "inform7/Chapter 12/Lexer.w" void Lexer__feed_triplet(int last_cr, int cr, int next_cr) { lxs_previous_char_in_raw_feed = last_cr; int space = FALSE; @@ -37564,14 +38032,14 @@ void Lexer__feed_triplet(int last_cr, int cr, int next_cr) { lexer_position.line_number++; } -#line 731 "inform7/Chapter 12/Lexer.w" +#line 725 "inform7/Chapter 12/Lexer.w" void Lexer__feed_char_into_lexer(char c) { Lexer__ensure_lexer_hwm_can_be_raised_by(MAX_WORD_LENGTH, TRUE); if (lxs_literal_mode) { { -#line 1010 "inform7/Chapter 12/Lexer.w" +#line 1004 "inform7/Chapter 12/Lexer.w" switch(lxs_kind_of_word) { case COMMENT_KW: if (c == COMMENT_BEGIN) lxs_comment_nesting++; @@ -37599,12 +38067,12 @@ void Lexer__feed_char_into_lexer(char c) { if (lxs_literal_mode == FALSE) c = ' '; /* trigger completion of this word */ } -#line 735 "inform7/Chapter 12/Lexer.w" +#line 729 "inform7/Chapter 12/Lexer.w" ; if (lxs_kind_of_word == STRING_KW) { { -#line 1057 "inform7/Chapter 12/Lexer.w" +#line 1051 "inform7/Chapter 12/Lexer.w" if ((lexer_divide_strings_at_text_substitutions) && (c == TEXT_SUBSTITUTION_BEGIN)) { Lexer__feed_char_into_lexer(STRING_END); /* feed |"| to close the old string */ Lexer__feed_char_into_lexer(' '); @@ -37614,11 +38082,11 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 737 "inform7/Chapter 12/Lexer.w" +#line 731 "inform7/Chapter 12/Lexer.w" ; { -#line 827 "inform7/Chapter 12/Lexer.w" +#line 821 "inform7/Chapter 12/Lexer.w" if (lxs_string_soak_up_spaces_mode) { switch(c) { case ' ': case '\t': c = *(lexer_hwm-1); lexer_hwm--; break; @@ -37635,7 +38103,7 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 738 "inform7/Chapter 12/Lexer.w" +#line 732 "inform7/Chapter 12/Lexer.w" ; } } @@ -37644,7 +38112,7 @@ void Lexer__feed_char_into_lexer(char c) { if ((lxs_literal_mode == FALSE) && (is_whitespace(c))) { { -#line 776 "inform7/Chapter 12/Lexer.w" +#line 770 "inform7/Chapter 12/Lexer.w" if (c == '\t') { lxs_number_of_tab_stops++; if (lxs_most_significant_space_char != '\n') lxs_most_significant_space_char = '\t'; @@ -37655,11 +38123,11 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 744 "inform7/Chapter 12/Lexer.w" +#line 738 "inform7/Chapter 12/Lexer.w" ; if (lexer_word != lexer_hwm) { -#line 852 "inform7/Chapter 12/Lexer.w" +#line 846 "inform7/Chapter 12/Lexer.w" *lexer_hwm++ = 0; /* terminate the current word as a C string */ if ((lexer_wait_for_dashes) && (strcmp(lexer_word, "----") == 0)) @@ -37668,7 +38136,7 @@ void Lexer__feed_char_into_lexer(char c) { if ((lexer_wait_for_dashes == FALSE) && (lxs_kind_of_word != COMMENT_KW)) { { -#line 872 "inform7/Chapter 12/Lexer.w" +#line 866 "inform7/Chapter 12/Lexer.w" int len = Platform__strlen(lexer_word), max_len = MAX_WORD_LENGTH; if (lxs_kind_of_word == STRING_KW) max_len = MAX_STRING_LENGTH; if (lxs_kind_of_word == I6_INCLUSION_KW) max_len = MAX_VERBATIM_LENGTH; @@ -37708,11 +38176,11 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 858 "inform7/Chapter 12/Lexer.w" +#line 852 "inform7/Chapter 12/Lexer.w" ; { -#line 929 "inform7/Chapter 12/Lexer.w" +#line 923 "inform7/Chapter 12/Lexer.w" lw_array[lexer_wordcount].lw_rawtext = lexer_word; lw_array[lexer_wordcount].lw_source = lexer_position; @@ -37731,7 +38199,7 @@ void Lexer__feed_char_into_lexer(char c) { Lexer__ensure_space_up_to(lexer_wordcount); } -#line 859 "inform7/Chapter 12/Lexer.w" +#line 853 "inform7/Chapter 12/Lexer.w" ; } @@ -37741,11 +38209,11 @@ void Lexer__feed_char_into_lexer(char c) { lxs_kind_of_word = ORDINARY_KW; } -#line 745 "inform7/Chapter 12/Lexer.w" +#line 739 "inform7/Chapter 12/Lexer.w" ; if (c == '\n') { -#line 808 "inform7/Chapter 12/Lexer.w" +#line 802 "inform7/Chapter 12/Lexer.w" if (lxs_this_line_is_empty_so_far) { int i; for (i=0; PARAGRAPH_BREAK[i]; i++) @@ -37755,7 +38223,7 @@ void Lexer__feed_char_into_lexer(char c) { lxs_this_line_is_empty_so_far = TRUE; } -#line 746 "inform7/Chapter 12/Lexer.w" +#line 740 "inform7/Chapter 12/Lexer.w" ; return; } @@ -37766,7 +38234,7 @@ void Lexer__feed_char_into_lexer(char c) { if (lxs_scanning_text_substitution) { { -#line 1084 "inform7/Chapter 12/Lexer.w" +#line 1078 "inform7/Chapter 12/Lexer.w" if ((lexer_divide_strings_at_text_substitutions) && (c == TEXT_SUBSTITUTION_END)) { lxs_scanning_text_substitution = FALSE; *(lexer_hwm-1) = TEXT_SUBSTITUTION_SEPARATOR; /* overwrite recorded copy of |]| with |,| */ @@ -37775,14 +38243,14 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 754 "inform7/Chapter 12/Lexer.w" +#line 748 "inform7/Chapter 12/Lexer.w" ; } if (lxs_this_word_is_empty_so_far) { { -#line 793 "inform7/Chapter 12/Lexer.w" +#line 787 "inform7/Chapter 12/Lexer.w" if ((lxs_most_significant_space_char == '\n') && (lxs_number_of_tab_stops >= 1)) lw_array[lexer_wordcount].lw_break = Lexer__break_char_for_indents(lxs_number_of_tab_stops); /* newline followed by 1 or more tabs */ @@ -37793,11 +38261,11 @@ void Lexer__feed_char_into_lexer(char c) { lxs_number_of_tab_stops = 0; } -#line 758 "inform7/Chapter 12/Lexer.w" +#line 752 "inform7/Chapter 12/Lexer.w" ; { -#line 968 "inform7/Chapter 12/Lexer.w" +#line 962 "inform7/Chapter 12/Lexer.w" switch(c) { case COMMENT_BEGIN: lxs_literal_mode = TRUE; lxs_kind_of_word = COMMENT_KW; @@ -37821,7 +38289,7 @@ void Lexer__feed_char_into_lexer(char c) { } } -#line 759 "inform7/Chapter 12/Lexer.w" +#line 753 "inform7/Chapter 12/Lexer.w" ; } @@ -37829,7 +38297,7 @@ void Lexer__feed_char_into_lexer(char c) { lxs_this_line_is_empty_so_far = FALSE; } -#line 1112 "inform7/Chapter 12/Lexer.w" +#line 1106 "inform7/Chapter 12/Lexer.w" int Lexer__splice_words(int w1, int w2) { int i; Lexer__ensure_space_up_to(lexer_wordcount + w2 - w1 + 1); @@ -37840,10 +38308,10 @@ int Lexer__splice_words(int w1, int w2) { return i; } -#line 61 "inform7/Chapter 12/Read Source Text.w" -int SourceFiles__read_extension_source_text(extension_file *EF, char *filename, +#line 60 "inform7/Chapter 12/Read Source Text.w" +int SourceFiles__read_extension_source_text(extension_file *EF, char *synopsis, int documentation_only) { - int rv = SourceFiles__read_file(NULL, filename, synopsis, EF, documentation_only); + int rv = SourceFiles__read_file(NULL, synopsis, EF, documentation_only); if (Log__get_aspect(LEXICAL_OUTPUT_DA)) Text__log_lexer_output(); return rv; } @@ -37851,14 +38319,11 @@ int SourceFiles__read_extension_source_text(extension_file *EF, char *filename, void SourceFiles__read_primary_source_text(void) { SourceFiles__feed_into_lexer(MANDATORY_INSERTED_TEXT, FALSE, NULL); Log__read_further_mandatory_text(); - if (bundle_name != NULL) - SourceFiles__read_file(bundle_name, Filenames__source_filename_relative_to_bundle("story.ni"), - "your source text", NULL, FALSE); - else SourceFiles__read_file(NULL, source_text_file, "the source text", NULL, FALSE); + SourceFiles__read_file(filename_of_i7_source, "your source text", NULL, FALSE); } -#line 90 "inform7/Chapter 12/Read Source Text.w" -int SourceFiles__read_file(char *pathname, char *leafname, char *synopsis, extension_file *EF, +#line 86 "inform7/Chapter 12/Read Source Text.w" +int SourceFiles__read_file(filename *F, char *synopsis, extension_file *EF, int documentation_only) { source_file *sf = CREATE(source_file); if (EF == NULL) primary_source_file = sf; @@ -37866,43 +38331,31 @@ int SourceFiles__read_file(char *pathname, char *leafname, char *synopsis, exten sf->last_lexed_word = -1; sf->words_of_quoted_text = 0; sf->extension_provided = EF; - strcpy(sf->leafname, leafname); + sf->name = F; int origin_tried = ORIGIN_WAS_PRIMARY_SOURCE; { -#line 125 "inform7/Chapter 12/Read Source Text.w" +#line 121 "inform7/Chapter 12/Read Source Text.w" sf->handle = NULL; if (EF) { - int i; - for (i=1; i<=3; i++) + char author_name[MAX_FILENAME_LENGTH]; + Text__print_text_to_string(EF->author_w1, EF->author_w2, author_name); + char title[MAX_FILENAME_LENGTH]; + Text__print_text_to_string(EF->name_w1, EF->name_w2, title); + for (int area=0; areahandle == NULL) { - switch (i) { - case 1: - origin_tried = ORIGIN_WAS_MATERIALS_EXTENSIONS_AREA; - pathname = pathname_of_materials_extensions; - break; - case 2: - origin_tried = ORIGIN_WAS_USER_EXTENSIONS_AREA; - pathname = pathname_of_extensions; - break; - case 3: - origin_tried = ORIGIN_WAS_BUILT_IN_EXTENSIONS_AREA; - pathname = pathname_of_built_in_extensions; - break; - } - sprintf(sf->filename, "%s%c%s", pathname, FOLDER_SEPARATOR, leafname); - sf->handle = Platform__iso_fopen_caseless(sf->filename, "r"); + pathname *P = pathname_of_extensions[area]; + origin_tried = area + 1; + sf->name = Locations__of_extension(P, title, author_name, TRUE); + sf->handle = Platform__iso_fopen_caseless(sf->name, "r"); if (sf->handle == NULL) { - char extended_name[MAX_FILENAME_LENGTH]; - sprintf(extended_name, "%s.i7x", sf->filename); - sf->handle = Platform__iso_fopen_caseless(extended_name, "r"); - if (sf->handle) strcpy(sf->filename, extended_name); + sf->name = Locations__of_extension(P, title, author_name, FALSE); + sf->handle = Platform__iso_fopen_caseless(sf->name, "r"); } } if (sf->handle == NULL) { - LOG("Extension failed: '%s'\n", leafname); Problems__quote_source(1, current_sentence); Problems__quote_text(2, synopsis); Problems__Issue__handmade_problem(_P_(PM_BogusExtension)); @@ -37915,25 +38368,24 @@ int SourceFiles__read_file(char *pathname, char *leafname, char *synopsis, exten return -1; } } else { - if (pathname == NULL) strcpy(sf->filename, leafname); - else sprintf(sf->filename, "%s%c%s", pathname, FOLDER_SEPARATOR, leafname); - sf->handle = Platform__iso_fopen(sf->filename, "r"); + sf->handle = Platform__iso_fopen(sf->name, "r"); if (sf->handle == NULL) - Problems__Fatal__issue2("Error: can't open source text file", sf->filename); + Problems__Fatal__filename_related( + "Error: can't open source text file", sf->name); } } -#line 102 "inform7/Chapter 12/Read Source Text.w" +#line 98 "inform7/Chapter 12/Read Source Text.w" ; if (EF) Extensions__Files__set_corresponding_source_file(EF, sf); - SourceFiles__feed_file_into_lexer(sf, leafname, documentation_only); + SourceFiles__feed_file_into_lexer(sf, Filenames__get_leafname(F), documentation_only); fclose(sf->handle); if (documentation_only == FALSE) { -#line 185 "inform7/Chapter 12/Read Source Text.w" +#line 168 "inform7/Chapter 12/Read Source Text.w" int wc; char *message; if (EF == NULL) message = "I've now read %s, which is %d words long.\n"; @@ -37944,14 +38396,14 @@ int SourceFiles__read_file(char *pathname, char *leafname, char *synopsis, exten LOG(message, synopsis, wc); } -#line 109 "inform7/Chapter 12/Read Source Text.w" +#line 105 "inform7/Chapter 12/Read Source Text.w" ; return origin_tried; } -#line 207 "inform7/Chapter 12/Read Source Text.w" -void SourceFiles__feed_file_into_lexer(source_file *sf, char *leafname, int documentation_only) { +#line 190 "inform7/Chapter 12/Read Source Text.w" +void SourceFiles__feed_file_into_lexer(source_file *sf, char *leaf, int documentation_only) { source_location top_of_file; int words_fed_w1, words_fed_w2; int cr, last_cr, next_cr, read_cr, newline_char = 0; @@ -37987,23 +38439,23 @@ void SourceFiles__feed_file_into_lexer(source_file *sf, char *leafname, int docu Lexer__feed_triplet(last_cr, cr, next_cr); } - if (primary_source_file == sf) leafname = "main source text"; - Lexer__feed_ends(&words_fed_w1, &words_fed_w2, TRUE, leafname); + if (primary_source_file == sf) leaf = "main source text"; + Lexer__feed_ends(&words_fed_w1, &words_fed_w2, TRUE, leaf); { -#line 254 "inform7/Chapter 12/Read Source Text.w" +#line 237 "inform7/Chapter 12/Read Source Text.w" int wc; for (wc=words_fed_w1; wc<=words_fed_w2; wc++) sf->words_of_source += SourceFiles__word_count(wc); } -#line 246 "inform7/Chapter 12/Read Source Text.w" +#line 229 "inform7/Chapter 12/Read Source Text.w" ; sf->last_lexed_word = words_fed_w2; } -#line 261 "inform7/Chapter 12/Read Source Text.w" +#line 244 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__word_count(int wc) { int N = 0; char *p = Lexer__word_text(wc); @@ -38029,7 +38481,7 @@ int SourceFiles__word_count(int wc) { return N; } -#line 290 "inform7/Chapter 12/Read Source Text.w" +#line 273 "inform7/Chapter 12/Read Source Text.w" int SourceFiles__total_word_count(source_file *sf) { return sf->words_of_source + sf->words_of_quoted_text; } @@ -38038,10 +38490,10 @@ int SourceFiles__last_lexed_word(source_file *sf) { return sf->last_lexed_word; } -#line 304 "inform7/Chapter 12/Read Source Text.w" -char *SourceFiles__get_filename(source_file *sf) { +#line 287 "inform7/Chapter 12/Read Source Text.w" +filename *SourceFiles__get_filename(source_file *sf) { if (sf == NULL) internal_error("tried to read filename of null source file"); - return sf->filename; + return sf->name; } extension_file *SourceFiles__get_extension_corresponding(source_file *sf) { @@ -38052,13 +38504,15 @@ extension_file *SourceFiles__get_extension_corresponding(source_file *sf) { source_file *SourceFiles__filename_to_source_file(char *filename) { source_file *sf; LOOP_OVER(sf, source_file) { - if (strcmp(sf->filename, filename) == 0) return sf; - if (strcmp(sf->leafname, filename) == 0) return sf; + char temp[MAX_FILENAME_LENGTH]; + Filenames__to_string(temp, sf->name); + if (strcmp(temp, filename) == 0) return sf; + if (strcmp(Filenames__get_leafname(sf->name), filename) == 0) return sf; } return NULL; } -#line 347 "inform7/Chapter 12/Read Source Text.w" +#line 332 "inform7/Chapter 12/Read Source Text.w" char unicode_feed_buffer[32]; /* holds a single escape such as "[unicode 3106]" */ int ufb_counter = -1; /* position in the unicode feed buffer */ @@ -38074,7 +38528,7 @@ int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) { { -#line 380 "inform7/Chapter 12/Read Source Text.w" +#line 365 "inform7/Chapter 12/Read Source Text.w" if (c<0xC0) return '?'; /* malformed UTF-8 */ if (c<0xE0) { c = c & 0x1f; conts = 1; } else if (c<0xF0) { c = c & 0xf; conts = 2; } @@ -38091,11 +38545,11 @@ int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) { } } -#line 360 "inform7/Chapter 12/Read Source Text.w" +#line 345 "inform7/Chapter 12/Read Source Text.w" ; { -#line 408 "inform7/Chapter 12/Read Source Text.w" +#line 393 "inform7/Chapter 12/Read Source Text.w" if ((c == 0xa1) || (c == 0xa3) || (c == 0xbf)) return c; /* pound sign, inverted ! and ? */ if (c == 0xd7) return 'x'; /* convert multiplication sign to lower case "x" */ if ((c >= 0xc0) && (c <= 0xff)) { /* accented West European letters, but... */ @@ -38106,11 +38560,11 @@ int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) { } } -#line 361 "inform7/Chapter 12/Read Source Text.w" +#line 346 "inform7/Chapter 12/Read Source Text.w" ; { -#line 423 "inform7/Chapter 12/Read Source Text.w" +#line 408 "inform7/Chapter 12/Read Source Text.w" if (c == 0x85) return '\x0d'; /* NEL, or "next line" */ if (c == 0xa0) return ' '; /* non-breaking space */ if ((c >= 0x2000) && (c <= 0x200a)) return ' '; /* space variants */ @@ -38120,7 +38574,7 @@ int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) { if ((c >= 0x2028) && (c <= 0x2029)) return '\x0d'; /* fancy newlines */ } -#line 362 "inform7/Chapter 12/Read Source Text.w" +#line 347 "inform7/Chapter 12/Read Source Text.w" ; if (c == 0xFEFF) return c; /* the Unicode BOM non-character */ @@ -38132,7 +38586,7 @@ int SourceFiles__utf8_fgetc(FILE *from, char **or_from, int escape_oddities) { return '['; } -#line 445 "inform7/Chapter 12/Read Source Text.w" +#line 430 "inform7/Chapter 12/Read Source Text.w" int lexer_feed_w1, lexer_feed_w2; /* word range made in last call to |SourceFiles__feed_into_lexer| */ void SourceFiles__feed_into_lexer(char *text, int expand_strings, char *nonstandard) { @@ -38897,7 +39351,7 @@ void ParseTree__log_single_node(parse_node *p, int indentation) { LOG("\n"); } -#line 104 "inform7/Chapter 13/Verify Parse Tree.w" +#line 102 "inform7/Chapter 13/Verify Parse Tree.w" parse_tree_node_type parse_tree_node_types[HIGHEST_NODE_TYPE+1] = { /* the columns are: name, max and min children, weight, required parent (if any), whether allowed in assertions */ { "(zero node type)", 0, INFTY, 0, -1, FALSE }, @@ -38940,7 +39394,7 @@ parse_tree_node_type parse_tree_node_types[HIGHEST_NODE_TYPE+1] = { { "TOKEN_NT", 0, INFTY, 0, -1, FALSE } }; -#line 152 "inform7/Chapter 13/Verify Parse Tree.w" +#line 150 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__log_type(int t) { if ((t<1) || (t>HIGHEST_NODE_TYPE)) LOG("?%d_NT", t); else LOG("%s", parse_tree_node_types[t].node_type_name); @@ -38950,7 +39404,7 @@ char *ParseTree__Verification__get_type_name(int t) { return parse_tree_node_types[t].node_type_name; } -#line 173 "inform7/Chapter 13/Verify Parse Tree.w" +#line 171 "inform7/Chapter 13/Verify Parse Tree.w" int tree_stats_size = 0, tree_stats_depth = 0, tree_stats_width = 0; void ParseTree__Verification__verify_integrity(parse_node *p, int worth_logging) { @@ -38962,7 +39416,7 @@ void ParseTree__Verification__verify_integrity(parse_node *p, int worth_logging) tree_stats_size, tree_stats_width, tree_stats_depth); } -#line 198 "inform7/Chapter 13/Verify Parse Tree.w" +#line 196 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__tidy_tree_after_verification(parse_node *p) { for (; p; p = p->next) { int t = ParseTree__type(p); @@ -38972,7 +39426,7 @@ void ParseTree__Verification__tidy_tree_after_verification(parse_node *p) { } } -#line 212 "inform7/Chapter 13/Verify Parse Tree.w" +#line 210 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify_tree_integrity_recursively(parse_node *p, parse_node *from, char *way, int depth) { int t, width; @@ -39001,7 +39455,7 @@ void ParseTree__Verification__verify_tree_integrity_recursively(parse_node *p, p if (width > tree_stats_width) tree_stats_width = width; } -#line 248 "inform7/Chapter 13/Verify Parse Tree.w" +#line 246 "inform7/Chapter 13/Verify Parse Tree.w" int node_errors = 0; void ParseTree__Verification__verify(void) { @@ -39017,7 +39471,7 @@ void ParseTree__Verification__verify(void) { LOGIF(VERIFICATIONS, "[Initial parse tree correct.]\n"); } -#line 269 "inform7/Chapter 13/Verify Parse Tree.w" +#line 267 "inform7/Chapter 13/Verify Parse Tree.w" void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, parse_node *parent, int current_weight) { parse_node *q; int t = ParseTree__type(p), children_count = 0; @@ -39025,7 +39479,7 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, { -#line 288 "inform7/Chapter 13/Verify Parse Tree.w" +#line 286 "inform7/Chapter 13/Verify Parse Tree.w" if (weight_here == 0) { LOG("N%d is %s, which is not allowed in initial tree\n", p->allocation_id, parse_tree_node_types[t].node_type_name); @@ -39034,11 +39488,11 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, } } -#line 274 "inform7/Chapter 13/Verify Parse Tree.w" +#line 272 "inform7/Chapter 13/Verify Parse Tree.w" ; { -#line 299 "inform7/Chapter 13/Verify Parse Tree.w" +#line 297 "inform7/Chapter 13/Verify Parse Tree.w" if ((parent) && (weight_here > 0) && (weight_here < current_weight)) { LOG("N%d is %s (weight %d): should not be a child of %s (weight %d)\n", p->allocation_id, @@ -39051,11 +39505,11 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, } } -#line 275 "inform7/Chapter 13/Verify Parse Tree.w" +#line 273 "inform7/Chapter 13/Verify Parse Tree.w" ; { -#line 313 "inform7/Chapter 13/Verify Parse Tree.w" +#line 311 "inform7/Chapter 13/Verify Parse Tree.w" if (parent) { int t_parent = parse_tree_node_types[t].required_parent_node_type; if ((t_parent != -1) && (t_parent != ParseTree__type(parent))) { @@ -39070,7 +39524,7 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, } } -#line 276 "inform7/Chapter 13/Verify Parse Tree.w" +#line 274 "inform7/Chapter 13/Verify Parse Tree.w" ; if (weight_here < 0) weight_here = -weight_here; @@ -39079,7 +39533,7 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, { -#line 329 "inform7/Chapter 13/Verify Parse Tree.w" +#line 327 "inform7/Chapter 13/Verify Parse Tree.w" if (children_count < parse_tree_node_types[t].min_children) { LOG("N%d has %d children, but min for %s is %d:\n", p->allocation_id, @@ -39098,11 +39552,11 @@ void ParseTree__Verification__verify_initial_parse_tree_invariant(parse_node *p, } } -#line 282 "inform7/Chapter 13/Verify Parse Tree.w" +#line 280 "inform7/Chapter 13/Verify Parse Tree.w" ; } -#line 355 "inform7/Chapter 13/Verify Parse Tree.w" +#line 353 "inform7/Chapter 13/Verify Parse Tree.w" int ParseTree__Verification__allow_in_assertions(parse_node *subtree) { int t; ParseTree__Verification__verify_integrity(subtree, FALSE); @@ -40511,13 +40965,15 @@ void Sentences__Headings__log(heading *h) { if (h==NULL) { LOG("\n"); return; } if (h==&pseudo_heading) { LOG("\n"); return; } LOG("H%d ", h->allocation_id); - if (h->start_location.file_of_origin) LOG("<%s, line %d>", - SourceFiles__get_filename(h->start_location.file_of_origin), h->start_location.line_number); + if (h->start_location.file_of_origin) + LOG("<%f, line %d>", + SourceFiles__get_filename(h->start_location.file_of_origin), + h->start_location.line_number); else LOG(""); LOG(" level:%d indentation:%d", h->level, h->indentation); } -#line 1033 "inform7/Chapter 13/Headings.w" +#line 1035 "inform7/Chapter 13/Headings.w" void Sentences__Headings__log_all_headings(void) { heading *h; LOOP_OVER(h, heading) LOG("$H\n", h); @@ -40535,7 +40991,7 @@ void Sentences__Headings__log_headings_recursively(heading *h, int depth) { Sentences__Headings__log_headings_recursively(h->next_heading, depth); } -#line 1053 "inform7/Chapter 13/Headings.w" +#line 1055 "inform7/Chapter 13/Headings.w" int headings_indexed = 0; void Sentences__Headings__index(void) { INDEX("

"); @@ -40551,7 +41007,7 @@ void Sentences__Headings__index(void) { LOOP_OVER(ce, contents_entry) { -#line 1079 "inform7/Chapter 13/Headings.w" +#line 1081 "inform7/Chapter 13/Headings.w" heading *h = ce->heading_entered; /* indent to correct tab position */ INDEX("

    \n"); @@ -40589,7 +41045,7 @@ void Sentences__Headings__index(void) { INDEX("
\n"); { -#line 1153 "inform7/Chapter 13/Headings.w" +#line 1155 "inform7/Chapter 13/Headings.w" nametag *nt; int c = 0; LOOP_OVER_NAMETAGS_UNDER(nt, h) { @@ -40608,11 +41064,11 @@ void Sentences__Headings__index(void) { if (c > 0) INDEX("

\n"); } -#line 1114 "inform7/Chapter 13/Headings.w" +#line 1116 "inform7/Chapter 13/Headings.w" ; } -#line 1066 "inform7/Chapter 13/Headings.w" +#line 1068 "inform7/Chapter 13/Headings.w" ; if (NUMBER_CREATED(contents_entry) == 1) { @@ -40623,7 +41079,7 @@ void Sentences__Headings__index(void) { } } -#line 1121 "inform7/Chapter 13/Headings.w" +#line 1123 "inform7/Chapter 13/Headings.w" void Sentences__Headings__index_heading_recursively(heading *h) { if (h == NULL) return; int show_heading = TRUE; @@ -40651,12 +41107,11 @@ void Sentences__Headings__index_heading_recursively(heading *h) { Sentences__Headings__index_heading_recursively(h->next_heading); } -#line 1182 "inform7/Chapter 13/Headings.w" +#line 1184 "inform7/Chapter 13/Headings.w" void Sentences__Headings__write_as_xml(void) { STREAM xf_struct; STREAM *xf = &xf_struct; - char *fn = Filenames__index(XML_HEADINGS_LEAFNAME, -1); - if (STREAM_OPEN_TO_FILE(xf, fn, UTF8_ENC) == FALSE) - Problems__Fatal__issue2("Can't open headings file", fn); + if (STREAM_OPEN_TO_FILE(xf, filename_of_headings, UTF8_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open headings file", filename_of_headings); Sentences__Headings__write_headings_as_xml_inner(xf); STREAM_CLOSE(xf); } @@ -40665,13 +41120,13 @@ void Sentences__Headings__write_headings_as_xml_inner(OUTPUT_STREAM) { heading *h; { -#line 1211 "inform7/Chapter 13/Headings.w" +#line 1212 "inform7/Chapter 13/Headings.w" WRITE("\n" "\n"); } -#line 1193 "inform7/Chapter 13/Headings.w" +#line 1194 "inform7/Chapter 13/Headings.w" ; WRITE("\n"); INDENT; @@ -40681,9 +41136,9 @@ void Sentences__Headings__write_headings_as_xml_inner(OUTPUT_STREAM) { INDENT; { -#line 1223 "inform7/Chapter 13/Headings.w" +#line 1224 "inform7/Chapter 13/Headings.w" if (h->start_location.file_of_origin) - WRITE("Filename%s\n", + WRITE("Filename%f\n", SourceFiles__get_filename(h->start_location.file_of_origin)); WRITE("Line%d\n", h->start_location.line_number); if (h->sentence_declaring != NULL) { @@ -40698,7 +41153,7 @@ void Sentences__Headings__write_headings_as_xml_inner(OUTPUT_STREAM) { WRITE("Indentation%d\n", h->indentation); } -#line 1200 "inform7/Chapter 13/Headings.w" +#line 1201 "inform7/Chapter 13/Headings.w" ; OUTDENT; WRITE("\n"); @@ -44081,7 +44536,7 @@ int phrase_beginning_block_NTMC(int *X, void **XP, int *R, void **RP, int w1, in } #line 638 "inform7/Chapter 13/Rule Subtrees.w" -#line 190 "inform7/Chapter 14/Extension Files.w" +#line 187 "inform7/Chapter 14/Extension Files.w" extension_file *Extensions__Files__new(int author_w1, int author_w2, int nw1, int nw2, int vm1, int vm2, int version_word) { char violation[160]; /* enough for two lines of type */ @@ -44091,7 +44546,7 @@ extension_file *Extensions__Files__new(int author_w1, int author_w2, ef->name_w1 = nw1; ef->name_w2 = nw2; { -#line 219 "inform7/Chapter 14/Extension Files.w" +#line 216 "inform7/Chapter 14/Extension Files.w" char exft[MAX_FILENAME_LENGTH], exfa[MAX_FILENAME_LENGTH]; Text__print_raw_text_to_string_truncated(ef->author_w1, ef->author_w2, exfa, MAX_FILENAME_LENGTH); Text__print_raw_text_to_string_truncated(ef->name_w1, ef->name_w2, exft, MAX_FILENAME_LENGTH); @@ -44114,7 +44569,7 @@ extension_file *Extensions__Files__new(int author_w1, int author_w2, if (Extensions__IDs__is_standard_rules(&(ef->ef_id))) standard_rules_extension = ef; } -#line 197 "inform7/Chapter 14/Extension Files.w" +#line 194 "inform7/Chapter 14/Extension Files.w" ; ef->min_version_needed = version_word; ef->inclusion_sentence = current_sentence; @@ -44131,7 +44586,7 @@ extension_file *Extensions__Files__new(int author_w1, int author_w2, return ef; } -#line 252 "inform7/Chapter 14/Extension Files.w" +#line 249 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_rubric(extension_file *ef, char *text) { Extensions__IDs__truncated_strcpy(ef->rubric_as_lexed, text, MAX_RUBRIC_LENGTH); LOGIF(EXTENSIONS_CENSUS, "Extension rubric: %s\n", ef->rubric_as_lexed); @@ -44142,7 +44597,7 @@ void Extensions__Files__set_extra_credit(extension_file *ef, char *text) { LOGIF(EXTENSIONS_CENSUS, "Extension extra credit: %s\n", ef->extra_credit_as_lexed); } -#line 267 "inform7/Chapter 14/Extension Files.w" +#line 264 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__set_corresponding_source_file(extension_file *ef, source_file *sf) { ef->read_into_file = sf; } @@ -44151,22 +44606,22 @@ source_file *Extensions__Files__get_corresponding_source_file(extension_file *ef return ef->read_into_file; } -#line 278 "inform7/Chapter 14/Extension Files.w" +#line 275 "inform7/Chapter 14/Extension Files.w" extension_identifier *Extensions__Files__get_eid(extension_file *ef) { return &(ef->ef_id); } -#line 285 "inform7/Chapter 14/Extension Files.w" +#line 282 "inform7/Chapter 14/Extension Files.w" int Extensions__Files__get_version_wn(extension_file *ef) { return ef->version_loaded; } -#line 295 "inform7/Chapter 14/Extension Files.w" +#line 292 "inform7/Chapter 14/Extension Files.w" int general_authorial_modesty = FALSE; void Extensions__Files__set_authorial_modesty(extension_file *ef) { ef->authorial_modesty = TRUE; } void Extensions__Files__set_general_authorial_modesty(void) { general_authorial_modesty = TRUE; } -#line 305 "inform7/Chapter 14/Extension Files.w" +#line 302 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_name_to_file(extension_file *ef, OUTPUT_STREAM) { Text__print_raw_text_to_stream(ef->name_w1, ef->name_w2, OUT); } @@ -44175,13 +44630,13 @@ void Extensions__Files__write_author_to_file(extension_file *ef, OUTPUT_STREAM) Text__print_raw_text_to_stream(ef->author_w1, ef->author_w2, OUT); } -#line 316 "inform7/Chapter 14/Extension Files.w" +#line 313 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__log(extension_file *ef) { if (ef == NULL) { LOG(""); return; } LOG("$W by $W", ef->name_w1, ef->name_w2, ef->author_w1, ef->author_w2); } -#line 325 "inform7/Chapter 14/Extension Files.w" +#line 322 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_I6_comment_describing(extension_file *ef, OUTPUT_STREAM) { if (ef == standard_rules_extension) { WRITE("! From the Standard Rules\n"); @@ -44194,14 +44649,14 @@ void Extensions__Files__write_I6_comment_describing(extension_file *ef, OUTPUT_S } } -#line 340 "inform7/Chapter 14/Extension Files.w" +#line 337 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_full_title_to_stream(OUTPUT_STREAM, extension_file *ef) { Text__print_raw_text_to_stream(ef->name_w1, ef->name_w2, OUT); WRITE(" by "); Text__print_raw_text_to_stream(ef->author_w1, ef->author_w2, OUT); } -#line 357 "inform7/Chapter 14/Extension Files.w" +#line 354 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__check_versions(void) { extension_file *ef; LOOP_OVER(ef, extension_file) { @@ -44230,7 +44685,7 @@ void Extensions__Files__check_versions(void) { } } -#line 405 "inform7/Chapter 14/Extension Files.w" +#line 402 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__ShowExtensionVersions_routine(OUTPUT_STREAM) { OUT = Routines__begin(OUT, "ShowExtensionVersions"); extension_file *ef; @@ -44257,7 +44712,7 @@ void Extensions__Files__ShowExtensionVersions_routine(OUTPUT_STREAM) { OUT = Routines__end(OUT); } -#line 435 "inform7/Chapter 14/Extension Files.w" +#line 432 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__credit_ef(OUTPUT_STREAM, extension_file *ef, int with_newline) { WRITE("print \"%s", ef->ef_id.raw_title); if (ef->version_loaded >= 0) { @@ -44270,7 +44725,7 @@ void Extensions__Files__credit_ef(OUTPUT_STREAM, extension_file *ef, int with_ne WRITE("\";\n"); } -#line 452 "inform7/Chapter 14/Extension Files.w" +#line 449 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__index(void) { INDEX("

EXTENSIONS

\n"); Extensions__Files__index_extensions_from(NULL); @@ -44334,7 +44789,7 @@ void Extensions__Files__index_extensions_from(extension_file *from) { } } -#line 527 "inform7/Chapter 14/Extension Files.w" +#line 524 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__handle_census_mode(void) { if (census_mode) { Extensions__Dictionary__load(); @@ -44356,40 +44811,34 @@ void Extensions__Files__update_census(void) { if (Log__get_aspect(EXTENSIONS_CENSUS_DA)) Extensions__IDs__log_EID_hash_table(); } -#line 553 "inform7/Chapter 14/Extension Files.w" +#line 550 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_sketchy_documentation_for_extensions_found(void) { extension_census_datum *ecd; LOOP_OVER(ecd, extension_census_datum) Extensions__Documentation__write_sketchy(ecd); } -#line 589 "inform7/Chapter 14/Extension Files.w" +#line 585 "inform7/Chapter 14/Extension Files.w" void Extensions__Files__write_top_level_of_extensions_documentation(void) { - Extensions__Files__write_top_level_extensions_page("Extensions", 1); - Extensions__Files__write_top_level_extensions_page("ExtIndex", 2); + Extensions__Files__write_top_level_extensions_page("Extensions.html", 1); + Extensions__Files__write_top_level_extensions_page("ExtIndex.html", 2); } -#line 597 "inform7/Chapter 14/Extension Files.w" -void Extensions__Files__write_top_level_extensions_page(char *leafname, int content) { +#line 593 "inform7/Chapter 14/Extension Files.w" +void Extensions__Files__write_top_level_extensions_page(char *leaf, int content) { STREAM HOMEPAGE_struct; STREAM *HOMEPAGE = &HOMEPAGE_struct; FILE *TEMPLATE; - char path_to_census[MAX_FILENAME_LENGTH]; - char path_to_model[MAX_FILENAME_LENGTH]; - sprintf(path_to_census, "%s%c%s.html", pathname_of_extension_docs, FOLDER_SEPARATOR, - leafname); - if (STREAM_OPEN_TO_FILE(HOMEPAGE, path_to_census, UTF8_ENC) == FALSE) - Problems__Fatal__issue2("Unable to open extensions documentation index for writing", - path_to_census); - sprintf(path_to_model, "%s%cReserved%c%s", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR, - EXTENSIONS_MODEL_HTML); - TEMPLATE = Platform__iso_fopen(path_to_model, "r"); + filename *F = Filenames__in_folder(pathname_of_extension_docs, leaf); + if (STREAM_OPEN_TO_FILE(HOMEPAGE, F, UTF8_ENC) == FALSE) + Problems__Fatal__filename_related( + "Unable to open extensions documentation index for writing", F); + TEMPLATE = Platform__iso_fopen(filename_of_extensions_documentation_model, "r"); if (TEMPLATE == NULL) Problems__Fatal__issue("Unable to open model extensions documentation for reading"); { -#line 628 "inform7/Chapter 14/Extension Files.w" +#line 618 "inform7/Chapter 14/Extension Files.w" char line_of_template[LONGEST_LINE_IN_EX_TEMPLATE]; int skipping_between_markers = FALSE; while (!(feof(TEMPLATE))) { @@ -44417,7 +44866,7 @@ void Extensions__Files__write_top_level_extensions_page(char *leafname, int cont } } -#line 614 "inform7/Chapter 14/Extension Files.w" +#line 604 "inform7/Chapter 14/Extension Files.w" ; STREAM_CLOSE(HOMEPAGE); fclose(TEMPLATE); @@ -44594,31 +45043,25 @@ extension_file *Extensions__Inclusion__load(int author_w1, int author_w2, { #line 193 "inform7/Chapter 14/Including Extensions.w" - char partial_pathname[MAX_FILENAME_LENGTH]; char synopsis[MAX_FILENAME_LENGTH]; int start_wn, end_wn; { -#line 228 "inform7/Chapter 14/Including Extensions.w" - int i; - Text__print_text_to_string(author_w1, author_w2, partial_pathname); - sprintf(partial_pathname+Platform__strlen(partial_pathname), "%c", FOLDER_SEPARATOR); - Text__print_text_to_string(name_w1, name_w2, partial_pathname+Platform__strlen(partial_pathname)); - +#line 220 "inform7/Chapter 14/Including Extensions.w" Text__print_raw_text_to_string(name_w1, name_w2, synopsis); sprintf(synopsis+Platform__strlen(synopsis), " by "); Text__print_raw_text_to_string(author_w1, author_w2, synopsis+Platform__strlen(synopsis)); - for (i=0; synopsis[i]; i++) synopsis[i] = + for (int i=0; synopsis[i]; i++) synopsis[i] = (char) (HTML__iso_remove_accents((int) synopsis[i])); } -#line 197 "inform7/Chapter 14/Including Extensions.w" +#line 196 "inform7/Chapter 14/Including Extensions.w" ; start_wn = lexer_wordcount; - switch (SourceFiles__read_extension_source_text(ef, partial_pathname, synopsis, census_mode)) { + switch (SourceFiles__read_extension_source_text(ef, synopsis, census_mode)) { case ORIGIN_WAS_MATERIALS_EXTENSIONS_AREA: case ORIGIN_WAS_USER_EXTENSIONS_AREA: ef->loaded_from_built_in_area = FALSE; break; @@ -44630,14 +45073,14 @@ extension_file *Extensions__Inclusion__load(int author_w1, int author_w2, end_wn = lexer_wordcount-1; if (end_wn >= start_wn) { -#line 258 "inform7/Chapter 14/Including Extensions.w" +#line 245 "inform7/Chapter 14/Including Extensions.w" Preform__parse_nt_against_word_range(extension_body_NTM, start_wn, end_wn, NULL, NULL); GET_RW(extension_body_NTM, 1, (ef->body_w1), (ef->body_w2)); if (most_recent_result) GET_RW(extension_body_NTM, 2, (ef->doc_w1), (ef->doc_w2)); ef->body_text_unbroken = TRUE; /* mark this to be sentence-broken */ } -#line 210 "inform7/Chapter 14/Including Extensions.w" +#line 209 "inform7/Chapter 14/Including Extensions.w" ; } @@ -44646,7 +45089,7 @@ extension_file *Extensions__Inclusion__load(int author_w1, int author_w2, return ef; } -#line 251 "inform7/Chapter 14/Including Extensions.w" +#line 238 "inform7/Chapter 14/Including Extensions.w" int extension_body_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRUE; @@ -44663,9 +45106,9 @@ break; } return TRUE; } -#line 254 "inform7/Chapter 14/Including Extensions.w" +#line 241 "inform7/Chapter 14/Including Extensions.w" -#line 299 "inform7/Chapter 14/Including Extensions.w" +#line 286 "inform7/Chapter 14/Including Extensions.w" int Extensions__Inclusion__parse_version(int vwn) { int i, rv, slashes = 0, digits = 0, slash_at = 0; char *p, *q; @@ -44694,7 +45137,7 @@ int Extensions__Inclusion__parse_version(int vwn) { Malformed: { -#line 334 "inform7/Chapter 14/Including Extensions.w" +#line 321 "inform7/Chapter 14/Including Extensions.w" LOG("Offending word number %d <%s>\n", vwn, Lexer__word_text(vwn)); Problems__Issue__sentence_problem(_P_(PM_ExtVersionMalformed), "a version number must have the form N/DDDDDD", @@ -44705,11 +45148,11 @@ int Extensions__Inclusion__parse_version(int vwn) { return 1000000; /* which equates to |1/000000| */ } -#line 325 "inform7/Chapter 14/Including Extensions.w" +#line 312 "inform7/Chapter 14/Including Extensions.w" ; } -#line 367 "inform7/Chapter 14/Including Extensions.w" +#line 354 "inform7/Chapter 14/Including Extensions.w" int begins_here_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; auth1_NTMV = begins_here_sentence_subject_NTM->range_result_w1[1]; auth2_NTMV = begins_here_sentence_subject_NTM->range_result_w2[1];; @@ -44719,7 +45162,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 374 "inform7/Chapter 14/Including Extensions.w" +#line 361 "inform7/Chapter 14/Including Extensions.w" auth1_NTMV = -1; auth2_NTMV = -1; Problems__Issue__handmade_problem(_P_(PM_ExtMiswordedBeginsHere)); Problems__issue_problem_segment( @@ -44731,7 +45174,7 @@ break; Problems__issue_problem_end(); } -#line 369 "inform7/Chapter 14/Including Extensions.w" +#line 356 "inform7/Chapter 14/Including Extensions.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -44741,9 +45184,9 @@ break; } return TRUE; } -#line 370 "inform7/Chapter 14/Including Extensions.w" +#line 357 "inform7/Chapter 14/Including Extensions.w" -#line 387 "inform7/Chapter 14/Including Extensions.w" +#line 374 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef) { int w1, w2, aw1, aw2; @@ -44763,12 +45206,12 @@ void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef if (ef->VM_restriction_w1 >= 0) { -#line 416 "inform7/Chapter 14/Including Extensions.w" +#line 403 "inform7/Chapter 14/Including Extensions.w" if (Preform__parse_nt_against_word_range(platform_qualifier_NTM, ef->VM_restriction_w1, ef->VM_restriction_w2, NULL, NULL)) { if (most_recent_result == PLATFORM_UNMET_HQ) { -#line 460 "inform7/Chapter 14/Including Extensions.w" +#line 447 "inform7/Chapter 14/Including Extensions.w" current_sentence = ef->inclusion_sentence; Problems__quote_source(1, current_sentence); Problems__quote_words(2, ef->name_w1, ef->name_w2); @@ -44784,12 +45227,12 @@ void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef Problems__issue_problem_end(); } -#line 418 "inform7/Chapter 14/Including Extensions.w" +#line 405 "inform7/Chapter 14/Including Extensions.w" ; } else { { -#line 444 "inform7/Chapter 14/Including Extensions.w" +#line 431 "inform7/Chapter 14/Including Extensions.w" Problems__quote_extension(1, ef); Problems__quote_words(2, ef->VM_restriction_w1, ef->VM_restriction_w2); Problems__Issue__handmade_problem(_P_(PM_ExtMalformedVM)); @@ -44801,19 +45244,19 @@ void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef Problems__issue_problem_end(); } -#line 420 "inform7/Chapter 14/Including Extensions.w" +#line 407 "inform7/Chapter 14/Including Extensions.w" ; } } -#line 404 "inform7/Chapter 14/Including Extensions.w" +#line 391 "inform7/Chapter 14/Including Extensions.w" ; if ((Text__compare_word_range(ef->name_w1, ef->name_w2, w1, w2) == FALSE) || (Text__compare_word_range(ef->author_w1, ef->author_w2, aw1, aw2) == FALSE)) { -#line 430 "inform7/Chapter 14/Including Extensions.w" +#line 417 "inform7/Chapter 14/Including Extensions.w" Problems__quote_extension(1, ef); Problems__quote_words(2, PN->word_ref1, PN->word_ref2); Problems__Issue__handmade_problem(_P_(PM_ExtMisidentified)); @@ -44825,11 +45268,11 @@ void Extensions__Inclusion__check_begins_here(parse_node *PN, extension_file *ef return; } -#line 408 "inform7/Chapter 14/Including Extensions.w" +#line 395 "inform7/Chapter 14/Including Extensions.w" ; } -#line 481 "inform7/Chapter 14/Including Extensions.w" +#line 468 "inform7/Chapter 14/Including Extensions.w" void Extensions__Inclusion__check_ends_here(parse_node *PN, extension_file *ef) { int w1, w2; w1 = PN->word_ref1; w2 = PN->word_ref2; @@ -44852,7 +45295,7 @@ void Extensions__Inclusion__check_ends_here(parse_node *PN, extension_file *ef) } } -#line 516 "inform7/Chapter 14/Including Extensions.w" +#line 503 "inform7/Chapter 14/Including Extensions.w" sentence_handler BEGINHERE_SH_handler = { BEGINHERE_NT, -1, 0, Extensions__Inclusion__handle_extension_begins }; sentence_handler ENDHERE_SH_handler = @@ -44866,7 +45309,7 @@ void Extensions__Inclusion__handle_extension_ends(parse_node *PN) { Problems__empty_headings(0); near_start_of_extension = 0; } -#line 80 "inform7/Chapter 14/Extension Identifiers.w" +#line 76 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__new(extension_identifier *eid, char *an, char *ti, int context) { unsigned int hc = 0, i; Extensions__IDs__truncated_strcpy(eid->raw_author_name, an, MAX_EXTENSION_AUTHOR_LENGTH); @@ -44925,7 +45368,7 @@ void Extensions__IDs__write_link_to_HTML_file(OUTPUT_STREAM, extension_identifie WRITE(""); } -#line 149 "inform7/Chapter 14/Extension Identifiers.w" +#line 145 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__match(extension_identifier *eid1, extension_identifier *eid2) { if ((eid1 == NULL) || (eid2 == NULL)) internal_error("bad eid match"); if (eid1->extension_id_hash_code != eid2->extension_id_hash_code) return FALSE; @@ -44934,7 +45377,7 @@ int Extensions__IDs__match(extension_identifier *eid1, extension_identifier *eid return TRUE; } -#line 160 "inform7/Chapter 14/Extension Identifiers.w" +#line 156 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__compare(extension_identifier *eid1, extension_identifier *eid2) { int d; if ((eid1 == NULL) || (eid2 == NULL)) internal_error("bad eid match"); @@ -44971,7 +45414,7 @@ int Extensions__IDs__compare_by_length(extension_identifier *eid1, extension_ide return strcmp(eid1->author_name, eid2->author_name); } -#line 201 "inform7/Chapter 14/Extension Identifiers.w" +#line 197 "inform7/Chapter 14/Extension Identifiers.w" int an_eid_for_standard_rules_created = FALSE; extension_identifier an_eid_for_standard_rules; int Extensions__IDs__is_standard_rules(extension_identifier *eid) { @@ -44983,7 +45426,7 @@ int Extensions__IDs__is_standard_rules(extension_identifier *eid) { return Extensions__IDs__match(eid, &an_eid_for_standard_rules); } -#line 227 "inform7/Chapter 14/Extension Identifiers.w" +#line 223 "inform7/Chapter 14/Extension Identifiers.w" int EID_database_created = FALSE; extension_identifier_database_entry *hash_of_EIDEs[EI_HASH_CODING_BASE]; @@ -45011,7 +45454,7 @@ void Extensions__IDs__add_EID_to_database(extension_identifier *eid, int context eide->word_count_text[0] = 0; } -#line 257 "inform7/Chapter 14/Extension Identifiers.w" +#line 253 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__set_usage_date(extension_identifier *eid, char *date) { extension_identifier_database_entry *eide; int hc = eid->extension_id_hash_code; @@ -45090,7 +45533,7 @@ char *Extensions__IDs__get_word_count(extension_identifier *eid) { return p; } -#line 339 "inform7/Chapter 14/Extension Identifiers.w" +#line 335 "inform7/Chapter 14/Extension Identifiers.w" int Extensions__IDs__no_times_used_in_context(extension_identifier *eid, int context) { extension_identifier_database_entry *eide; for (eide = hash_of_EIDEs[eid->extension_id_hash_code]; eide; eide = eide->hash_next) @@ -45098,7 +45541,7 @@ int Extensions__IDs__no_times_used_in_context(extension_identifier *eid, int con return 0; } -#line 349 "inform7/Chapter 14/Extension Identifiers.w" +#line 345 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__log_EID_hash_table(void) { int hc, total = 0; LOG("Extension identifier hash table:\n"); @@ -45115,14 +45558,14 @@ void Extensions__IDs__log_EID_hash_table(void) { LOG("%d entries in all\n", total); } -#line 372 "inform7/Chapter 14/Extension Identifiers.w" +#line 368 "inform7/Chapter 14/Extension Identifiers.w" void Extensions__IDs__truncated_strcpy(char *to, char *from, int max) { int i; for (i=0; ((from[i]) && (iauthor_name, transcoded); @@ -45164,53 +45607,37 @@ void Extensions__IDs__end_extension_link(OUTPUT_STREAM, extension_identifier *ei WRITE(""); } -#line 51 "inform7/Chapter 14/Extension Census.w" +#line 54 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__perform(void) { - -{ -#line 75 "inform7/Chapter 14/Extension Census.w" - if (Folders__verify_installed_extensions_tree() == FALSE) return; - -} -#line 52 "inform7/Chapter 14/Extension Census.w" -; Extensions__Census__begin_recording_census_errors(); - /* count per-project extensions first */ - Extensions__Census__take_census_of_domain(pathname_of_materials_extensions, - ORIGIN_WAS_MATERIALS_EXTENSIONS_AREA); - /* and then count user-installed extensions */ - Extensions__Census__take_census_of_domain(pathname_of_extensions, - ORIGIN_WAS_USER_EXTENSIONS_AREA); - /* and then count the built-in ones */ - Extensions__Census__take_census_of_domain(pathname_of_built_in_extensions, - ORIGIN_WAS_BUILT_IN_EXTENSIONS_AREA); + for (int area=0; area\n", path_to_folder); + filename *temporary_filename = + Filenames__in_folder(pathname_of_extension_docs, + (top_level)?"Temporary1.txt":"Temporary0.txt"); + + if (Pathnames__write_contents_to_file(temporary_filename, P) == FALSE) { + LOGIF(EXTENSIONS_CENSUS, "Unable to obtain contents of <%p>\n", P); return; } - TEMPF = Platform__iso_fopen(path_to_temp, "r"); + TEMPF = Platform__iso_fopen(temporary_filename, "r"); if (TEMPF == NULL) Problems__Fatal__issue("Unable to open temporary file for reading"); while (Platform__truncated_locale_fgets(TEMPF, item_name, MAX_FILENAME_LENGTH+1) >= 1) { int n = Platform__strlen(item_name) - 1; @@ -45218,12 +45645,13 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, LOGIF(EXTENSIONS_CENSUS, "%d: %s\n", linecount++, item_name); if (top_level) { -#line 163 "inform7/Chapter 14/Extension Census.w" +#line 141 "inform7/Chapter 14/Extension Census.w" if (item_name[0] == '.') continue; if (item_name[n] == FOLDER_SEPARATOR) { - char path_to_sub[MAX_FILENAME_LENGTH]; item_name[n] = 0; /* remove the terminal slash: it has served its purpose */ - if (strcmp(item_name, "Reserved") == 0) continue; + + if (strcmp(item_name, RESERVED_AUTHOR_NAME) == 0) continue; + if (Platform__strlen(item_name) > MAX_EXTENSION_TITLE_LENGTH-1) { Extensions__Census__census_error("author name exceeds the maximum permitted length", item_name, NULL, NULL, NULL); continue; @@ -45234,19 +45662,20 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, Extensions__Census__census_error("author name contains a full stop", item_name, NULL, NULL, NULL); continue; } - sprintf(path_to_sub, "%s%c%s", pathname, FOLDER_SEPARATOR, item_name); - Extensions__Census__census_from(path_to_sub, FALSE, origin, item_name); + Extensions__Census__census_from( + Pathnames__subfolder(P, item_name), + FALSE, origin, item_name); continue; } Extensions__Census__census_error("non-folder found where author folders should be", item_name, NULL, NULL, NULL); continue; } -#line 133 "inform7/Chapter 14/Extension Census.w" +#line 116 "inform7/Chapter 14/Extension Census.w" else { -#line 199 "inform7/Chapter 14/Extension Census.w" +#line 179 "inform7/Chapter 14/Extension Census.w" int overridden_by_an_extension_already_found = FALSE; char candidate_title[MAX_EXTENSION_TITLE_LENGTH + 1], raw_title[MAX_EXTENSION_TITLE_LENGTH + 1]; @@ -45269,12 +45698,12 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, { -#line 250 "inform7/Chapter 14/Extension Census.w" +#line 230 "inform7/Chapter 14/Extension Census.w" strcpy(candidate_author_name, parent); strcpy(candidate_title, item_name); { -#line 269 "inform7/Chapter 14/Extension Census.w" +#line 249 "inform7/Chapter 14/Extension Census.w" if ((n>=5) && (candidate_title[n-3] == '.') && ((candidate_title[n-2] == 'i') || (candidate_title[n-2] == 'I')) && @@ -45283,7 +45712,7 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, candidate_title[n-3] = 0; } -#line 252 "inform7/Chapter 14/Extension Census.w" +#line 232 "inform7/Chapter 14/Extension Census.w" ; strcpy(raw_title, candidate_title); strcpy(raw_author_name, candidate_author_name); @@ -45298,30 +45727,30 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 219 "inform7/Chapter 14/Extension Census.w" +#line 199 "inform7/Chapter 14/Extension Census.w" ; { -#line 281 "inform7/Chapter 14/Extension Census.w" +#line 261 "inform7/Chapter 14/Extension Census.w" FILE *EXTF; { -#line 292 "inform7/Chapter 14/Extension Census.w" - char path_to_ext[MAX_FILENAME_LENGTH]; - sprintf(path_to_ext, "%s%c%s%c%s", - current_extension_domain, FOLDER_SEPARATOR, parent, FOLDER_SEPARATOR, item_name); - EXTF = Platform__iso_fopen_caseless(path_to_ext, "r"); +#line 272 "inform7/Chapter 14/Extension Census.w" + filename *F = + Locations__of_extension(current_extension_domain, + item_name, parent, FALSE); + EXTF = Platform__iso_fopen_caseless(F, "r"); if (EXTF == NULL) { Extensions__Census__census_error("file cannot be read", parent, item_name, NULL, NULL); continue; } } -#line 282 "inform7/Chapter 14/Extension Census.w" +#line 262 "inform7/Chapter 14/Extension Census.w" ; { -#line 307 "inform7/Chapter 14/Extension Census.w" +#line 287 "inform7/Chapter 14/Extension Census.w" int titling_chars_read = 0, c; titling_line[0] = 0; while ((c = SourceFiles__utf8_fgetc(EXTF, NULL, FALSE)) != EOF) { @@ -45334,11 +45763,11 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, Extensions__IDs__normalise_casing(titling_line); } -#line 283 "inform7/Chapter 14/Extension Census.w" +#line 263 "inform7/Chapter 14/Extension Census.w" ; { -#line 326 "inform7/Chapter 14/Extension Census.w" +#line 306 "inform7/Chapter 14/Extension Census.w" int rubric_chars_read = 0, c, found_start = FALSE; while ((c = SourceFiles__utf8_fgetc(EXTF, NULL, FALSE)) != EOF) { if (rubric_chars_read >= MAX_RUBRIC_LENGTH) break; @@ -45354,16 +45783,16 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, rubric_text[rubric_chars_read] = 0; } -#line 284 "inform7/Chapter 14/Extension Census.w" +#line 264 "inform7/Chapter 14/Extension Census.w" ; fclose(EXTF); } -#line 220 "inform7/Chapter 14/Extension Census.w" +#line 200 "inform7/Chapter 14/Extension Census.w" ; { -#line 362 "inform7/Chapter 14/Extension Census.w" +#line 342 "inform7/Chapter 14/Extension Census.w" int start = 0, end = Platform__strlen(titling_line) - 1; while ((end>=0) && ((titling_line[end] == ' ') || (titling_line[end] == '\t') || (titling_line[end] == '.'))) { @@ -45387,7 +45816,7 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, { -#line 398 "inform7/Chapter 14/Extension Census.w" +#line 378 "inform7/Chapter 14/Extension Census.w" int l; version_text[0] = 0; if (strncmp(titling_line, "Version ", 8) == 0) @@ -45400,12 +45829,12 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 383 "inform7/Chapter 14/Extension Census.w" +#line 363 "inform7/Chapter 14/Extension Census.w" ; if (strncmp(titling_line+start, "The ", 4) == 0) start += 4; /* advance past any |"The "| */ { -#line 414 "inform7/Chapter 14/Extension Census.w" +#line 394 "inform7/Chapter 14/Extension Census.w" int l, j; claimed_author_name[0] = 0; claimed_title[0] = 0; @@ -45424,11 +45853,11 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 385 "inform7/Chapter 14/Extension Census.w" +#line 365 "inform7/Chapter 14/Extension Census.w" ; { -#line 435 "inform7/Chapter 14/Extension Census.w" +#line 415 "inform7/Chapter 14/Extension Census.w" int l; requirement_text[0] = 0; for (l=0; claimed_title[l]; l++) @@ -45442,15 +45871,15 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 386 "inform7/Chapter 14/Extension Census.w" +#line 366 "inform7/Chapter 14/Extension Census.w" ; } -#line 221 "inform7/Chapter 14/Extension Census.w" +#line 201 "inform7/Chapter 14/Extension Census.w" ; { -#line 456 "inform7/Chapter 14/Extension Census.w" +#line 436 "inform7/Chapter 14/Extension Census.w" int right_leafname = FALSE, right_folder = FALSE; if (strcmp(claimed_title, candidate_title) == 0) right_leafname = TRUE; if (strcmp(claimed_author_name, candidate_author_name) == 0) right_folder = TRUE; @@ -45472,11 +45901,11 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 222 "inform7/Chapter 14/Extension Census.w" +#line 202 "inform7/Chapter 14/Extension Census.w" ; { -#line 484 "inform7/Chapter 14/Extension Census.w" +#line 464 "inform7/Chapter 14/Extension Census.w" extension_census_datum *other; LOOP_OVER(other, extension_census_datum) if ((strcmp(candidate_author_name, other->ecd_id.author_name) == 0) @@ -45487,13 +45916,13 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, } } -#line 223 "inform7/Chapter 14/Extension Census.w" +#line 203 "inform7/Chapter 14/Extension Census.w" ; if (overridden_by_an_extension_already_found == FALSE) { extension_census_datum *ecd; { -#line 499 "inform7/Chapter 14/Extension Census.w" +#line 479 "inform7/Chapter 14/Extension Census.w" ecd = CREATE(extension_census_datum); Extensions__IDs__new(&(ecd->ecd_id), candidate_author_name, candidate_title, INSTALLED_EIDBC); Extensions__IDs__set_raw(&(ecd->ecd_id), raw_author_name, raw_title); @@ -45511,18 +45940,18 @@ void Extensions__Census__census_from(char *pathname, int top_level, int origin, strcpy(ecd->rubric, rubric_text); } -#line 226 "inform7/Chapter 14/Extension Census.w" +#line 206 "inform7/Chapter 14/Extension Census.w" ; } } -#line 134 "inform7/Chapter 14/Extension Census.w" +#line 117 "inform7/Chapter 14/Extension Census.w" ; } fclose(TEMPF); } -#line 530 "inform7/Chapter 14/Extension Census.w" +#line 510 "inform7/Chapter 14/Extension Census.w" int no_census_errors = 0; STREAM CENERR_struct; STREAM *CENERR = NULL; @@ -45542,17 +45971,14 @@ void Extensions__Census__end_recording_census_errors(void) { CENERR = NULL; } -#line 554 "inform7/Chapter 14/Extension Census.w" +#line 534 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__census_error(char *message, char *auth, char *title, char *claimed_author, char *claimed_title) { no_census_errors++; if (CENERR == NULL) { - char path_to_errors[MAX_FILENAME_LENGTH]; - sprintf(path_to_errors, "%s%cReserved%cCensusErrors.txt", - pathname_of_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); CENERR = &CENERR_struct; - if (STREAM_OPEN_TO_FILE(CENERR, path_to_errors, UTF8_ENC) == FALSE) - Problems__Fatal__issue2("Unable to write census error log", path_to_errors); + if (STREAM_OPEN_TO_FILE(CENERR, filename_of_extensions_census_errors, UTF8_ENC) == FALSE) + Problems__Fatal__filename_related("Unable to write census error log", filename_of_extensions_census_errors); } HTML__open_para(CENERR, 2, "hanging"); if (claimed_author) @@ -45563,7 +45989,7 @@ void Extensions__Census__census_error(char *message, char *auth, char *title, STREAM_WRITE(CENERR, "

\n"); } -#line 580 "inform7/Chapter 14/Extension Census.w" +#line 557 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__warn_about_census_errors(OUTPUT_STREAM) { if (no_census_errors == 0) return; /* no need for a warning */ if (NUMBER_CREATED(extension_census_datum) < 20) return; /* it's a short page anyway */ @@ -45572,19 +45998,18 @@ void Extensions__Census__warn_about_census_errors(OUTPUT_STREAM) { "see details below.

"); } -#line 595 "inform7/Chapter 14/Extension Census.w" +#line 572 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__transcribe_census_errors(OUTPUT_STREAM) { FILE *RESULTS; - char path_to_errors[MAX_FILENAME_LENGTH]; char error_line[LONGEST_POSSIBLE_CENSUS_ERROR]; if (no_census_errors == 0) return; /* nothing to include, then */ - sprintf(path_to_errors, "%s%cReserved%cCensusErrors.txt", - pathname_of_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - RESULTS = Platform__iso_fopen(path_to_errors, "r"); - if (RESULTS == NULL) Problems__Fatal__issue2("Unable to read census error log", path_to_errors); + RESULTS = Platform__iso_fopen(filename_of_extensions_census_errors, "r"); + if (RESULTS == NULL) + Problems__Fatal__filename_related( + "Unable to read census error log", filename_of_extensions_census_errors); { -#line 618 "inform7/Chapter 14/Extension Census.w" +#line 594 "inform7/Chapter 14/Extension Census.w" WRITE("

" "Warning. Inform checks the folder of user-installed extensions " "each time it translates the source text, in order to keep this directory " @@ -45597,7 +46022,7 @@ void Extensions__Census__transcribe_census_errors(OUTPUT_STREAM) { MAX_EXTENSION_TITLE_LENGTH, MAX_EXTENSION_AUTHOR_LENGTH); } -#line 604 "inform7/Chapter 14/Extension Census.w" +#line 580 "inform7/Chapter 14/Extension Census.w" ; while (Platform__truncated_iso_fgets(RESULTS, error_line, LONGEST_POSSIBLE_CENSUS_ERROR) >= 1) { WRITE("%s", error_line); @@ -45606,11 +46031,11 @@ void Extensions__Census__transcribe_census_errors(OUTPUT_STREAM) { fclose(RESULTS); } -#line 643 "inform7/Chapter 14/Extension Census.w" +#line 619 "inform7/Chapter 14/Extension Census.w" void Extensions__Census__write_results(OUTPUT_STREAM) { { -#line 675 "inform7/Chapter 14/Extension Census.w" +#line 651 "inform7/Chapter 14/Extension Census.w" int nps = 0, nbi = 0, ni = 0; extension_census_datum *ecd; LOOP_OVER(ecd, extension_census_datum) { @@ -45628,7 +46053,7 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { "have no other extensions installed at present.

"); else { WRITE("

"); - HTML__Javascript__open_file(OUT, pathname_of_extensions, NULL, + HTML__Javascript__open_file(OUT, pathname_of_extensions[EXTERNAL_FS_AREA], NULL, ""); WRITE(" You have %d further extension%s installed. These are marked " "with a blue folder icon in the catalogue below. (Click it to see " @@ -45638,8 +46063,7 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { } if (nps > 0) { WRITE("

"); - HTML__Javascript__open_file(OUT, pathname_of_materials_extensions, NULL, - PROJECT_SPECIFIC_SYMBOL); + HTML__Javascript__open_file(OUT, pathname_of_extensions[INTERNAL_FS_AREA], NULL, PROJECT_SPECIFIC_SYMBOL); WRITE(" You have %d extension%s in the .materials folder for the " "current project. (Click the purple folder icon to show the " "location.) %s not available to other projects.

", @@ -45647,7 +46071,7 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { } } -#line 644 "inform7/Chapter 14/Extension Census.w" +#line 620 "inform7/Chapter 14/Extension Census.w" ; Extensions__Census__warn_about_census_errors(OUT); HTML__end_html_row(OUT); @@ -45655,13 +46079,13 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { WRITE("
"); { -#line 715 "inform7/Chapter 14/Extension Census.w" +#line 690 "inform7/Chapter 14/Extension Census.w" extension_file *ef; LOOP_OVER(ef, extension_file) Extensions__Dictionary__time_stamp(ef); } -#line 649 "inform7/Chapter 14/Extension Census.w" +#line 625 "inform7/Chapter 14/Extension Census.w" ; int key_vms = FALSE, key_override = FALSE, key_builtin = FALSE, @@ -45669,7 +46093,7 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { { -#line 723 "inform7/Chapter 14/Extension Census.w" +#line 698 "inform7/Chapter 14/Extension Census.w" WRITE("

Sort catalogue:  By word count

"); } -#line 654 "inform7/Chapter 14/Extension Census.w" +#line 630 "inform7/Chapter 14/Extension Census.w" ; int no_entries = NUMBER_CREATED(extension_census_datum); @@ -45708,17 +46132,17 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { for (d=1; d<=5; d++) { { -#line 753 "inform7/Chapter 14/Extension Census.w" +#line 728 "inform7/Chapter 14/Extension Census.w" char *display = "none"; if (d == CE_BY_AUTHOR) display = "block"; WRITE("
", d, display); } -#line 662 "inform7/Chapter 14/Extension Census.w" +#line 638 "inform7/Chapter 14/Extension Census.w" ; { -#line 778 "inform7/Chapter 14/Extension Census.w" +#line 753 "inform7/Chapter 14/Extension Census.w" int i = 0; extension_census_datum *ecd; LOOP_OVER(ecd, extension_census_datum) @@ -45736,89 +46160,89 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { criterion); } -#line 663 "inform7/Chapter 14/Extension Census.w" +#line 639 "inform7/Chapter 14/Extension Census.w" ; { -#line 801 "inform7/Chapter 14/Extension Census.w" +#line 776 "inform7/Chapter 14/Extension Census.w" HTML__begin_html_table(OUT, FIRST_STRIPE_COLOUR, TRUE, 0, 0, 2, 0, 0); { -#line 823 "inform7/Chapter 14/Extension Census.w" +#line 798 "inform7/Chapter 14/Extension Census.w" switch (d) { case CE_BY_TITLE: { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 825 "inform7/Chapter 14/Extension Census.w" +#line 800 "inform7/Chapter 14/Extension Census.w" ; WRITE("Extensions in alphabetical order"); { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 827 "inform7/Chapter 14/Extension Census.w" +#line 802 "inform7/Chapter 14/Extension Census.w" ; break; case CE_BY_DATE: { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 830 "inform7/Chapter 14/Extension Census.w" +#line 805 "inform7/Chapter 14/Extension Census.w" ; WRITE("Extensions in order of date used (most recent first)"); { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 832 "inform7/Chapter 14/Extension Census.w" +#line 807 "inform7/Chapter 14/Extension Census.w" ; break; case CE_BY_LENGTH: { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 835 "inform7/Chapter 14/Extension Census.w" +#line 810 "inform7/Chapter 14/Extension Census.w" ; WRITE("Extensions in order of word count (longest first)"); { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 837 "inform7/Chapter 14/Extension Census.w" +#line 812 "inform7/Chapter 14/Extension Census.w" ; break; } } -#line 802 "inform7/Chapter 14/Extension Census.w" +#line 777 "inform7/Chapter 14/Extension Census.w" ; int stripe = 0; char *current_author_name = ""; @@ -45827,24 +46251,24 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { extension_census_datum *ecd = sorted_census_results[i]; { -#line 844 "inform7/Chapter 14/Extension Census.w" +#line 819 "inform7/Chapter 14/Extension Census.w" if ((d == CE_BY_AUTHOR) && (strcmp(current_author_name, ecd->ecd_id.author_name) != 0)) { current_author_name = ecd->ecd_id.author_name; { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 847 "inform7/Chapter 14/Extension Census.w" +#line 822 "inform7/Chapter 14/Extension Census.w" ; { -#line 887 "inform7/Chapter 14/Extension Census.w" +#line 862 "inform7/Chapter 14/Extension Census.w" WRITE("%s", ecd->ecd_id.raw_author_name); extension_census_datum *ecd2; @@ -45867,16 +46291,16 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { WRITE(")"); } -#line 848 "inform7/Chapter 14/Extension Census.w" +#line 823 "inform7/Chapter 14/Extension Census.w" ; { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 849 "inform7/Chapter 14/Extension Census.w" +#line 824 "inform7/Chapter 14/Extension Census.w" ; stripe = 0; } @@ -45884,45 +46308,46 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { current_installation = Extensions__Census__installation_region(ecd); { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 854 "inform7/Chapter 14/Extension Census.w" +#line 829 "inform7/Chapter 14/Extension Census.w" ; { -#line 911 "inform7/Chapter 14/Extension Census.w" +#line 886 "inform7/Chapter 14/Extension Census.w" switch (current_installation) { - case 0: WRITE("Supplied in the .materials folder  %s", - pathname_of_materials_extensions); break; + case 0: + WRITE("Supplied in the .materials folder  %p", + pathname_of_extensions[INTERNAL_FS_AREA]); break; case 1: WRITE("Built in to Inform"); break; case 2: WRITE("User installed but overriding a built-in extension"); break; - case 3: WRITE("User installed  %s", - pathname_of_extensions); + case 3: + WRITE("User installed  %p", pathname_of_extensions[EXTERNAL_FS_AREA]); break; } } -#line 855 "inform7/Chapter 14/Extension Census.w" +#line 830 "inform7/Chapter 14/Extension Census.w" ; { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 856 "inform7/Chapter 14/Extension Census.w" +#line 831 "inform7/Chapter 14/Extension Census.w" ; stripe = 0; } } -#line 808 "inform7/Chapter 14/Extension Census.w" +#line 783 "inform7/Chapter 14/Extension Census.w" ; stripe = 1 - stripe; if (stripe == 0) @@ -45931,10 +46356,10 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { HTML__first_html_column_coloured(OUT, 0, FIRST_STRIPE_COLOUR, 0); { -#line 930 "inform7/Chapter 14/Extension Census.w" +#line 906 "inform7/Chapter 14/Extension Census.w" { -#line 947 "inform7/Chapter 14/Extension Census.w" +#line 923 "inform7/Chapter 14/Extension Census.w" char *bulletornot = UNINDEXED_SYMBOL; if (Extensions__Census__ecd_used(ecd)) { bulletornot = INDEXED_SYMBOL; key_bullet = TRUE; } WRITE(" %s", bulletornot); @@ -45955,7 +46380,7 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { if (ecd->VM_requirement[0]) { { -#line 976 "inform7/Chapter 14/Extension Census.w" +#line 952 "inform7/Chapter 14/Extension Census.w" int rw1 = lexer_wordcount, rw2; SourceFiles__feed_into_lexer(ecd->VM_requirement, FALSE, NULL); rw2 = lexer_wordcount - 1; @@ -45964,54 +46389,52 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { VirtualMachines__write_icons(OUT, rw1+2, rw2-2); } -#line 965 "inform7/Chapter 14/Extension Census.w" +#line 941 "inform7/Chapter 14/Extension Census.w" ; key_vms = TRUE; } } -#line 930 "inform7/Chapter 14/Extension Census.w" +#line 906 "inform7/Chapter 14/Extension Census.w" ; HTML__next_html_column_nw(OUT, 0); if (d != CE_BY_TITLE) { { -#line 986 "inform7/Chapter 14/Extension Census.w" +#line 962 "inform7/Chapter 14/Extension Census.w" if (ecd->version_text[0]) WRITE("v %s", ecd->version_text); else WRITE("--"); } -#line 933 "inform7/Chapter 14/Extension Census.w" +#line 909 "inform7/Chapter 14/Extension Census.w" ; HTML__next_html_column_nw(OUT, 0); } { -#line 994 "inform7/Chapter 14/Extension Census.w" +#line 970 "inform7/Chapter 14/Extension Census.w" char *opener = ""; - char *area = pathname_of_extensions; + pathname *area = pathname_of_extensions[EXTERNAL_FS_AREA]; if (ecd->built_in) { opener = BUILT_IN_SYMBOL; key_builtin = TRUE; } if (ecd->overriding_a_built_in_extension) { opener = OVERRIDING_SYMBOL; key_override = TRUE; } if (ecd->project_specific) { opener = PROJECT_SPECIFIC_SYMBOL; key_pspec = TRUE; - area = pathname_of_materials_extensions; + area = pathname_of_extensions[INTERNAL_FS_AREA]; } - if (ecd->built_in) - WRITE("%s", opener); - else HTML__Javascript__open_file(OUT, area, - ecd->ecd_id.raw_author_name, opener); + if (ecd->built_in) WRITE("%s", opener); + else HTML__Javascript__open_file(OUT, area, ecd->ecd_id.raw_author_name, opener); } -#line 936 "inform7/Chapter 14/Extension Census.w" +#line 912 "inform7/Chapter 14/Extension Census.w" ; HTML__next_html_column_w(OUT, 0); { -#line 1012 "inform7/Chapter 14/Extension Census.w" +#line 986 "inform7/Chapter 14/Extension Census.w" if ((d == CE_BY_DATE) || (d == CE_BY_INSTALL)) { WRITE("%s", Extensions__IDs__get_usage_date(&(ecd->ecd_id))); } else if (d == CE_BY_LENGTH) { @@ -46024,52 +46447,52 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { } } -#line 938 "inform7/Chapter 14/Extension Census.w" +#line 914 "inform7/Chapter 14/Extension Census.w" ; } -#line 814 "inform7/Chapter 14/Extension Census.w" +#line 789 "inform7/Chapter 14/Extension Census.w" ; HTML__end_html_row(OUT); } { -#line 863 "inform7/Chapter 14/Extension Census.w" +#line 838 "inform7/Chapter 14/Extension Census.w" { -#line 873 "inform7/Chapter 14/Extension Census.w" +#line 848 "inform7/Chapter 14/Extension Census.w" int span = 4; if (d == CE_BY_TITLE) span = 3; HTML__first_html_column_coloured(OUT, 0, CENSUS_TITLING_BG, span); WRITE(" ", CENSUS_TITLING_FG); } -#line 863 "inform7/Chapter 14/Extension Census.w" +#line 838 "inform7/Chapter 14/Extension Census.w" ; WRITE("%d extensions installed", no_entries); { -#line 881 "inform7/Chapter 14/Extension Census.w" +#line 856 "inform7/Chapter 14/Extension Census.w" WRITE(""); HTML__end_html_row(OUT); } -#line 865 "inform7/Chapter 14/Extension Census.w" +#line 840 "inform7/Chapter 14/Extension Census.w" ; } -#line 817 "inform7/Chapter 14/Extension Census.w" +#line 792 "inform7/Chapter 14/Extension Census.w" ; HTML__end_html_table(OUT); } -#line 664 "inform7/Chapter 14/Extension Census.w" +#line 640 "inform7/Chapter 14/Extension Census.w" ; WRITE("
\n"); } { -#line 762 "inform7/Chapter 14/Extension Census.w" +#line 737 "inform7/Chapter 14/Extension Census.w" if ((key_builtin) || (key_override) || (key_bullet) || (key_vms) || (key_pspec)) { WRITE("

Key: "); if (key_bullet) WRITE("%s Used ", INDEXED_SYMBOL); @@ -46084,13 +46507,13 @@ void Extensions__Census__write_results(OUTPUT_STREAM) { } } -#line 667 "inform7/Chapter 14/Extension Census.w" +#line 643 "inform7/Chapter 14/Extension Census.w" ; Extensions__Census__transcribe_census_errors(OUT); Memory__I7_free(sorted_census_results, EXTENSION_DICTIONARY_MREASON); } -#line 1026 "inform7/Chapter 14/Extension Census.w" +#line 1000 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__installation_region(extension_census_datum *ecd) { if (ecd->project_specific) return 0; if (ecd->built_in) return 1; @@ -46107,7 +46530,7 @@ int Extensions__Census__ecd_used(extension_census_datum *ecd) { return FALSE; } -#line 1045 "inform7/Chapter 14/Extension Census.w" +#line 1019 "inform7/Chapter 14/Extension Census.w" int Extensions__Census__compare_ecd_by_title(const void *ecd1, const void *ecd2) { extension_census_datum *e1 = *((extension_census_datum **) ecd1); extension_census_datum *e2 = *((extension_census_datum **) ecd2); @@ -46234,21 +46657,17 @@ void Extensions__Dictionary__load(void) { { -#line 246 "inform7/Chapter 14/Extension Dictionary.w" - char path_to_dictionary[MAX_FILENAME_LENGTH]; - sprintf(path_to_dictionary, "%s%cReserved%cDictionary.txt", - pathname_of_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - DICTF = Platform__iso_fopen(path_to_dictionary, "r"); +#line 244 "inform7/Chapter 14/Extension Dictionary.w" + DICTF = Platform__iso_fopen(filename_of_extensions_dictionary, "r"); if (DICTF == NULL) { - if (Folders__verify_library_folder("Inform", "Extensions", NULL, "Reserved") == 0) - return; LOGIF(EXTENSIONS_CENSUS, "Creating new empty dictionary file\n"); - EMPTY_DICTF = Platform__iso_fopen(path_to_dictionary, "w"); + EMPTY_DICTF = Platform__iso_fopen(filename_of_extensions_dictionary, "w"); if (EMPTY_DICTF == NULL) return; fclose(EMPTY_DICTF); - DICTF = Platform__iso_fopen(path_to_dictionary, "r"); + DICTF = Platform__iso_fopen(filename_of_extensions_dictionary, "r"); if (DICTF == NULL) - Problems__Fatal__issue2("Unable to open dictionary file", path_to_dictionary); + Problems__Fatal__filename_related( + "Unable to open dictionary file", filename_of_extensions_dictionary); } } @@ -46259,7 +46678,7 @@ void Extensions__Dictionary__load(void) { while (Platform__truncated_iso_fgets(DICTF, line_entry, MAX_ED_LINE_LENGTH-1) >= 1) { -#line 270 "inform7/Chapter 14/Extension Dictionary.w" +#line 264 "inform7/Chapter 14/Extension Dictionary.w" int strokes = 0, pos = 0, inpos = 0; char author[MAX_ED_LINE_LENGTH], title[MAX_ED_LINE_LENGTH]; char headword[MAX_ED_LINE_LENGTH], category[MAX_ED_LINE_LENGTH]; @@ -46287,7 +46706,7 @@ void Extensions__Dictionary__load(void) { fclose(DICTF); } -#line 292 "inform7/Chapter 14/Extension Dictionary.w" +#line 286 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__time_stamp(extension_file *ef) { char dbuff[128]; char *ascday[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; @@ -46304,17 +46723,13 @@ void Extensions__Dictionary__time_stamp(extension_file *ef) { Extensions__Dictionary__new_entry_from_string("indexing", ef, dbuff); } -#line 312 "inform7/Chapter 14/Extension Dictionary.w" +#line 306 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__write_back(void) { extension_dictionary_entry *ede; STREAM DICTF_struct; STREAM *DICTF = &DICTF_struct; - char path_to_dictionary[MAX_FILENAME_LENGTH]; - if (Folders__verify_installed_extensions_tree() == FALSE) return; - sprintf(path_to_dictionary, "%s%cReserved%cDictionary.txt", - pathname_of_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - if (STREAM_OPEN_TO_FILE(DICTF, path_to_dictionary, UTF8_ENC) == FALSE) return; + if (STREAM_OPEN_TO_FILE(DICTF, filename_of_extensions_dictionary, UTF8_ENC) == FALSE) return; LOGIF(EXTENSIONS_CENSUS, "Writing dictionary file\n"); @@ -46323,13 +46738,13 @@ void Extensions__Dictionary__write_back(void) { LOGIF(EXTENSIONS_CENSUS, "Writing $d", ede); { -#line 347 "inform7/Chapter 14/Extension Dictionary.w" +#line 337 "inform7/Chapter 14/Extension Dictionary.w" STREAM_WRITE(DICTF, "|%s|%s|%s|%s|\n", ede->ede_id.author_name, ede->ede_id.title, ede->entry_text, ede->type); } -#line 328 "inform7/Chapter 14/Extension Dictionary.w" +#line 318 "inform7/Chapter 14/Extension Dictionary.w" ; } else LOGIF(EXTENSIONS_CENSUS, "Suppressing $d\n", ede); @@ -46337,7 +46752,7 @@ void Extensions__Dictionary__write_back(void) { STREAM_CLOSE(DICTF); } -#line 365 "inform7/Chapter 14/Extension Dictionary.w" +#line 355 "inform7/Chapter 14/Extension Dictionary.w" int Extensions__Dictionary__sort_extension_dictionary(void) { extension_dictionary_entry **sorted_extension_dictionary = NULL; int no_entries = 0; @@ -46347,7 +46762,7 @@ int Extensions__Dictionary__sort_extension_dictionary(void) { { -#line 411 "inform7/Chapter 14/Extension Dictionary.w" +#line 401 "inform7/Chapter 14/Extension Dictionary.w" extension_dictionary_entry *ede; int i, j; LOOP_OVER(ede, extension_dictionary_entry) @@ -46363,7 +46778,7 @@ int Extensions__Dictionary__sort_extension_dictionary(void) { } } -#line 372 "inform7/Chapter 14/Extension Dictionary.w" +#line 362 "inform7/Chapter 14/Extension Dictionary.w" ; if (no_entries == 0) { @@ -46373,7 +46788,7 @@ int Extensions__Dictionary__sort_extension_dictionary(void) { { -#line 429 "inform7/Chapter 14/Extension Dictionary.w" +#line 419 "inform7/Chapter 14/Extension Dictionary.w" extension_dictionary_entry *ede; int i = 0; sorted_extension_dictionary = Memory__I7_calloc(no_entries, @@ -46384,7 +46799,7 @@ int Extensions__Dictionary__sort_extension_dictionary(void) { } } -#line 379 "inform7/Chapter 14/Extension Dictionary.w" +#line 369 "inform7/Chapter 14/Extension Dictionary.w" ; qsort(sorted_extension_dictionary, (size_t) no_entries, sizeof(extension_dictionary_entry *), @@ -46392,7 +46807,7 @@ int Extensions__Dictionary__sort_extension_dictionary(void) { { -#line 441 "inform7/Chapter 14/Extension Dictionary.w" +#line 431 "inform7/Chapter 14/Extension Dictionary.w" int i; first_in_sorted_dictionary = sorted_extension_dictionary[0]; for (i=0; inext_in_sorted_dictionary = NULL; } -#line 384 "inform7/Chapter 14/Extension Dictionary.w" +#line 374 "inform7/Chapter 14/Extension Dictionary.w" ; { -#line 452 "inform7/Chapter 14/Extension Dictionary.w" +#line 442 "inform7/Chapter 14/Extension Dictionary.w" Memory__I7_free(sorted_extension_dictionary, EXTENSION_DICTIONARY_MREASON); } -#line 385 "inform7/Chapter 14/Extension Dictionary.w" +#line 375 "inform7/Chapter 14/Extension Dictionary.w" ; LOGIF(EXTENSIONS_CENSUS, "Sorted dictionary: %d entries\n", no_entries); return no_entries; } -#line 460 "inform7/Chapter 14/Extension Dictionary.w" +#line 450 "inform7/Chapter 14/Extension Dictionary.w" int Extensions__Dictionary__compare_ed_entries(const void *elem1, const void *elem2) { const extension_dictionary_entry **e1 = (const extension_dictionary_entry **) elem1; const extension_dictionary_entry **e2 = (const extension_dictionary_entry **) elem2; @@ -46426,7 +46841,7 @@ int Extensions__Dictionary__compare_ed_entries(const void *elem1, const void *el return strcmp((*e1)->sorting, (*e2)->sorting); } -#line 476 "inform7/Chapter 14/Extension Dictionary.w" +#line 466 "inform7/Chapter 14/Extension Dictionary.w" known_extension_clash *Extensions__Dictionary__kec_new(extension_dictionary_entry *L, extension_dictionary_entry *R, int first_known_flag) { known_extension_clash *kec = CREATE(known_extension_clash); @@ -46438,7 +46853,7 @@ known_extension_clash *Extensions__Dictionary__kec_new(extension_dictionary_entr return kec; } -#line 540 "inform7/Chapter 14/Extension Dictionary.w" +#line 530 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, extension_dictionary_entry *ede2) { extension_dictionary_entry *left = NULL, *right = NULL; extension_identifier *leftx, *rightx; @@ -46449,13 +46864,13 @@ void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, e { -#line 570 "inform7/Chapter 14/Extension Dictionary.w" +#line 560 "inform7/Chapter 14/Extension Dictionary.w" if (d == 0) return; /* both definitions come from the same extension */ if ((strcmp(ede1->type, "property") == 0) && (strcmp(ede2->type, "property") != 0)) return; if ((strcmp(ede1->type, "property") != 0) && (strcmp(ede2->type, "property") == 0)) return; } -#line 548 "inform7/Chapter 14/Extension Dictionary.w" +#line 538 "inform7/Chapter 14/Extension Dictionary.w" ; if (d < 0) { left = ede1; right = ede2; } @@ -46466,7 +46881,7 @@ void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, e if ((kec->first_known) && (Extensions__IDs__match(leftx, &(kec->leftx->ede_id)))) { { -#line 583 "inform7/Chapter 14/Extension Dictionary.w" +#line 573 "inform7/Chapter 14/Extension Dictionary.w" while (kec) { if (Extensions__IDs__match(rightx, &(kec->rightx->ede_id))) { kec->number_clashes++; return; @@ -46478,7 +46893,7 @@ void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, e } } -#line 556 "inform7/Chapter 14/Extension Dictionary.w" +#line 546 "inform7/Chapter 14/Extension Dictionary.w" ; return; } @@ -46486,13 +46901,13 @@ void Extensions__Dictionary__extension_clash(extension_dictionary_entry *ede1, e kec = Extensions__Dictionary__kec_new(left, right, TRUE); } -#line 597 "inform7/Chapter 14/Extension Dictionary.w" +#line 587 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__list_known_extension_clashes(OUTPUT_STREAM) { known_extension_clash *kec; if (NUMBER_CREATED(known_extension_clash) == 0) return; { -#line 610 "inform7/Chapter 14/Extension Dictionary.w" +#line 600 "inform7/Chapter 14/Extension Dictionary.w" WRITE("

\nClashes found. The dictionary above shows that some " "extensions make incompatible definitions of the same words or phrases. " "When two extensions disagree like this, it is not necessarily a bad " @@ -46502,13 +46917,13 @@ void Extensions__Dictionary__list_known_extension_clashes(OUTPUT_STREAM) { "clashes.

\n"); } -#line 600 "inform7/Chapter 14/Extension Dictionary.w" +#line 590 "inform7/Chapter 14/Extension Dictionary.w" ; LOOP_OVER(kec, known_extension_clash) if (kec->first_known) { -#line 622 "inform7/Chapter 14/Extension Dictionary.w" +#line 612 "inform7/Chapter 14/Extension Dictionary.w" known_extension_clash *example; WRITE(""); Extensions__IDs__write_to_HTML_file(OUT, &(kec->leftx->ede_id), FALSE); @@ -46528,11 +46943,11 @@ void Extensions__Dictionary__list_known_extension_clashes(OUTPUT_STREAM) { WRITE("

\n"); } -#line 603 "inform7/Chapter 14/Extension Dictionary.w" +#line 593 "inform7/Chapter 14/Extension Dictionary.w" ; } -#line 645 "inform7/Chapter 14/Extension Dictionary.w" +#line 635 "inform7/Chapter 14/Extension Dictionary.w" void Extensions__Dictionary__write_to_HTML(OUTPUT_STREAM) { WRITE("

Whenever an extension is used, its definitions are entered into the " "following index. (Thus, a newly installed but never-used extension " @@ -46555,7 +46970,7 @@ void Extensions__Dictionary__write_to_HTML(OUTPUT_STREAM) { } { -#line 681 "inform7/Chapter 14/Extension Dictionary.w" +#line 671 "inform7/Chapter 14/Extension Dictionary.w" int tint = FALSE; if (EDES_DEFINE_SAME_WORD(ede, previous_ede)) tint = TRUE; while (EDES_DEFINE_SAME_WORD(ede, next_ede)) { @@ -46573,7 +46988,7 @@ void Extensions__Dictionary__write_to_HTML(OUTPUT_STREAM) { WRITE("

"); } -#line 665 "inform7/Chapter 14/Extension Dictionary.w" +#line 655 "inform7/Chapter 14/Extension Dictionary.w" ; } Extensions__Dictionary__list_known_extension_clashes(OUT); @@ -46603,36 +47018,29 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens STREAM *DOCF = &DOCF_struct; FILE *TEST_DOCF; int page_exists_already, no_egs = 0; - char leafname[MAX_FILENAME_LENGTH], pathname[MAX_FILENAME_LENGTH]; + char leaf[MAX_FILENAME_LENGTH]; if (ecd) eid = &(ecd->ecd_id); else if (ef) eid = &(ef->ef_id); else internal_error("WEDP incorrectly called"); LOGIF(EXTENSIONS_CENSUS, "WEDP %s (%s by %s)/%d\n", (ecd)?"ecd":" ef", eid->title, eid->author_name, eg_number); - -{ -#line 104 "inform7/Chapter 14/Extension Documentation.w" - strcpy(leafname, eid->title); - if (eg_number > 0) sprintf(leafname+Platform__strlen(leafname), "-eg%d", eg_number); - sprintf(pathname, "%s%cExtensions%c%s%c%s.html", pathname_of_extension_docs, - FOLDER_SEPARATOR, FOLDER_SEPARATOR, eid->author_name, FOLDER_SEPARATOR, leafname); + strcpy(leaf, eid->title); + if (eg_number > 0) sprintf(leaf+Platform__strlen(leaf), "-eg%d", eg_number); -} -#line 75 "inform7/Chapter 14/Extension Documentation.w" -; + filename *name = Locations__of_extension_documentation(leaf, eid->author_name); page_exists_already = FALSE; - TEST_DOCF = Platform__iso_fopen(pathname, "r"); + TEST_DOCF = Platform__iso_fopen(name, "r"); if (TEST_DOCF) { page_exists_already = TRUE; fclose(TEST_DOCF); } - LOGIF(EXTENSIONS_CENSUS, "WEDP %s: %s\n", (page_exists_already)?"exists":"does not exist", - pathname); + LOGIF(EXTENSIONS_CENSUS, "WEDP %s: %f\n", (page_exists_already)?"exists":"does not exist", + name); if (ecd) { if ((page_exists_already == FALSE) || (census_mode)) { -#line 120 "inform7/Chapter 14/Extension Documentation.w" +#line 116 "inform7/Chapter 14/Extension Documentation.w" int aw1 = lexer_wordcount, aw2, tw1, tw2; SourceFiles__feed_into_lexer(eid->raw_author_name, FALSE, NULL); SourceFiles__feed_into_lexer(" ", FALSE, NULL); @@ -46649,60 +47057,55 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens Extensions__Documentation__write_extension_documentation(NULL, ef); } -#line 85 "inform7/Chapter 14/Extension Documentation.w" +#line 88 "inform7/Chapter 14/Extension Documentation.w" ; return 0; /* ensure no requests sent for further pages about the ECD: see below */ } if (ef == NULL) internal_error("null EF in extension documentation writer"); - if (Folders__verify_library_folder("Inform", "Documentation", "Extensions", eid->author_name) == 0) + if (Pathnames__create_in_file_system( + Pathnames__subfolder(pathname_of_extension_docs_inner, eid->author_name)) == 0) return 0; - if (STREAM_OPEN_TO_FILE(DOCF, pathname, UTF8_ENC) == FALSE) + if (STREAM_OPEN_TO_FILE(DOCF, name, UTF8_ENC) == FALSE) return 0; /* if we lack permissions, e.g., then write no documentation */ { -#line 140 "inform7/Chapter 14/Extension Documentation.w" - char path_to_model[MAX_FILENAME_LENGTH]; - char line_of_template[LONGEST_LINE_IN_EX_TEMPLATE]; - FILE *TEMPLATE; - int skipping_between_markers = FALSE; - - sprintf(path_to_model, "%s%cReserved%c%s", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR, - EXTENSION_FILE_MODEL_HTML); - TEMPLATE = Platform__iso_fopen(path_to_model, "r"); +#line 136 "inform7/Chapter 14/Extension Documentation.w" + FILE *TEMPLATE = Platform__iso_fopen(filename_of_extension_file_documentation_model, "r"); if (TEMPLATE == NULL) - Problems__Fatal__issue2("Unable to open model extension documentation file for reading", - path_to_model); + Problems__Fatal__filename_related("Unable to open model extension documentation file for reading", + filename_of_extension_file_documentation_model); + char line_of_template[LONGEST_LINE_IN_EX_TEMPLATE]; + int skipping_between_markers = FALSE; while (!(feof(TEMPLATE))) { int n = Platform__truncated_iso_fgets(TEMPLATE, line_of_template, LONGEST_LINE_IN_EX_TEMPLATE); if (n < 0) break; /* file I/O error or end of file */ if (strcmp(line_of_template, "") == 0) { { -#line 169 "inform7/Chapter 14/Extension Documentation.w" +#line 160 "inform7/Chapter 14/Extension Documentation.w" STREAM_WRITE(DOCF, "

"); if (Extensions__IDs__is_standard_rules(eid) == FALSE) { -#line 187 "inform7/Chapter 14/Extension Documentation.w" +#line 178 "inform7/Chapter 14/Extension Documentation.w" char inclusion_text[MAX_EXTENSION_TITLE_LENGTH + MAX_EXTENSION_AUTHOR_LENGTH + 50]; sprintf(inclusion_text, "Include %s by %s.\n\n\n", eid->title, eid->author_name); HTML__Javascript__paste(DOCF, -1, -1, inclusion_text); STREAM_WRITE(DOCF, " "); } -#line 171 "inform7/Chapter 14/Extension Documentation.w" +#line 162 "inform7/Chapter 14/Extension Documentation.w" ; STREAM_WRITE(DOCF, ""); Extensions__IDs__write_to_HTML_file(DOCF, eid, TRUE); STREAM_WRITE(DOCF, "

"); { -#line 195 "inform7/Chapter 14/Extension Documentation.w" +#line 186 "inform7/Chapter 14/Extension Documentation.w" int rw1 = ef->VM_restriction_w1, rw2 = ef->VM_restriction_w2; if (rw1 >= 0) { Text__print_raw_text_to_stream(rw1, rw2, DOCF); @@ -46711,11 +47114,11 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens } } -#line 175 "inform7/Chapter 14/Extension Documentation.w" +#line 166 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 205 "inform7/Chapter 14/Extension Documentation.w" +#line 196 "inform7/Chapter 14/Extension Documentation.w" char the_version[MAX_VERSION_NUMBER_LENGTH+1]; if (ef->version_loaded >= 0) Text__print_raw_text_to_string(ef->version_loaded, ef->version_loaded, the_version); @@ -46728,38 +47131,38 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens } } -#line 176 "inform7/Chapter 14/Extension Documentation.w" +#line 167 "inform7/Chapter 14/Extension Documentation.w" ; STREAM_WRITE(DOCF, "

"); { -#line 219 "inform7/Chapter 14/Extension Documentation.w" +#line 210 "inform7/Chapter 14/Extension Documentation.w" if (ef->rubric_as_lexed[0]) STREAM_WRITE(DOCF, "%s

", ef->rubric_as_lexed); if (ef->extra_credit_as_lexed[0]) STREAM_WRITE(DOCF, "%s

", ef->extra_credit_as_lexed); } -#line 178 "inform7/Chapter 14/Extension Documentation.w" +#line 169 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 230 "inform7/Chapter 14/Extension Documentation.w" +#line 221 "inform7/Chapter 14/Extension Documentation.w" if (ef->doc_w1 >= 0) - HTML__Documentation__set_table_of_contents(ef->doc_w1, ef->doc_w2, DOCF, leafname); + HTML__Documentation__set_table_of_contents(ef->doc_w1, ef->doc_w2, DOCF, leaf); } -#line 179 "inform7/Chapter 14/Extension Documentation.w" +#line 170 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 249 "inform7/Chapter 14/Extension Documentation.w" +#line 240 "inform7/Chapter 14/Extension Documentation.w" Extensions__Dictionary__erase_entries(ef); Extensions__Dictionary__time_stamp(ef); { -#line 270 "inform7/Chapter 14/Extension Documentation.w" +#line 261 "inform7/Chapter 14/Extension Documentation.w" kind *K; int kc = 0; LOOP_OVER_BASE_KINDS(K) { @@ -46785,11 +47188,11 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 252 "inform7/Chapter 14/Extension Documentation.w" +#line 243 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 297 "inform7/Chapter 14/Extension Documentation.w" +#line 288 "inform7/Chapter 14/Extension Documentation.w" instance *I; int kc = 0; LOOP_OVER_OBJECT_INSTANCES(I) { @@ -46814,12 +47217,12 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 253 "inform7/Chapter 14/Extension Documentation.w" +#line 244 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 323 "inform7/Chapter 14/Extension Documentation.w" +#line 314 "inform7/Chapter 14/Extension Documentation.w" nonlocal_variable *q; int kc = 0; LOOP_OVER(q, nonlocal_variable) @@ -46834,11 +47237,11 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 255 "inform7/Chapter 14/Extension Documentation.w" +#line 246 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 339 "inform7/Chapter 14/Extension Documentation.w" +#line 330 "inform7/Chapter 14/Extension Documentation.w" instance *q; int kc = 0; LOOP_OVER_ENUMERATION_INSTANCES(q) { @@ -46850,12 +47253,12 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 256 "inform7/Chapter 14/Extension Documentation.w" +#line 247 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 352 "inform7/Chapter 14/Extension Documentation.w" +#line 343 "inform7/Chapter 14/Extension Documentation.w" named_action_pattern *nap; int kc = 0; LOOP_OVER(nap, named_action_pattern) @@ -46865,11 +47268,11 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 258 "inform7/Chapter 14/Extension Documentation.w" +#line 249 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 363 "inform7/Chapter 14/Extension Documentation.w" +#line 354 "inform7/Chapter 14/Extension Documentation.w" action_name *acn; int kc = 0; LOOP_OVER(acn, action_name) @@ -46879,20 +47282,20 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 259 "inform7/Chapter 14/Extension Documentation.w" +#line 250 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 374 "inform7/Chapter 14/Extension Documentation.w" +#line 365 "inform7/Chapter 14/Extension Documentation.w" Index__Lexicon__list_verbs_in_file(DOCF, ef->read_into_file, ef); } -#line 261 "inform7/Chapter 14/Extension Documentation.w" +#line 252 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 379 "inform7/Chapter 14/Extension Documentation.w" +#line 370 "inform7/Chapter 14/Extension Documentation.w" adjectival_phrase *adj; int kc = 0; LOOP_OVER(adj, adjectival_phrase) { @@ -46904,11 +47307,11 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 262 "inform7/Chapter 14/Extension Documentation.w" +#line 253 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 392 "inform7/Chapter 14/Extension Documentation.w" +#line 383 "inform7/Chapter 14/Extension Documentation.w" property *prn; int kc = 0; LOOP_OVER(prn, property) @@ -46920,12 +47323,12 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 263 "inform7/Chapter 14/Extension Documentation.w" +#line 254 "inform7/Chapter 14/Extension Documentation.w" ; { -#line 405 "inform7/Chapter 14/Extension Documentation.w" +#line 396 "inform7/Chapter 14/Extension Documentation.w" use_option *uo; int kc = 0; LOOP_OVER(uo, use_option) @@ -46936,27 +47339,27 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (kc != 0) STREAM_WRITE(DOCF, "

"); } -#line 265 "inform7/Chapter 14/Extension Documentation.w" +#line 256 "inform7/Chapter 14/Extension Documentation.w" ; } -#line 180 "inform7/Chapter 14/Extension Documentation.w" +#line 171 "inform7/Chapter 14/Extension Documentation.w" ; STREAM_WRITE(DOCF, "


"); { -#line 236 "inform7/Chapter 14/Extension Documentation.w" +#line 227 "inform7/Chapter 14/Extension Documentation.w" if (ef->doc_w1 >= 0) - no_egs = HTML__Documentation__set_body_text(ef->doc_w1, ef->doc_w2, DOCF, eg_number, leafname); + no_egs = HTML__Documentation__set_body_text(ef->doc_w1, ef->doc_w2, DOCF, eg_number, leaf); else STREAM_WRITE(DOCF, "The extension provides no documentation."); } -#line 182 "inform7/Chapter 14/Extension Documentation.w" +#line 173 "inform7/Chapter 14/Extension Documentation.w" ; } -#line 157 "inform7/Chapter 14/Extension Documentation.w" +#line 147 "inform7/Chapter 14/Extension Documentation.w" ; skipping_between_markers = TRUE; } @@ -46964,16 +47367,17 @@ int Extensions__Documentation__write_extension_documentation_page(extension_cens if (strcmp(line_of_template, "") == 0) skipping_between_markers = FALSE; } + fclose(TEMPLATE); } -#line 96 "inform7/Chapter 14/Extension Documentation.w" +#line 100 "inform7/Chapter 14/Extension Documentation.w" ; STREAM_CLOSE(DOCF); return no_egs; } -#line 419 "inform7/Chapter 14/Extension Documentation.w" +#line 410 "inform7/Chapter 14/Extension Documentation.w" int Extensions__Documentation__document_headword(OUTPUT_STREAM, int kc, extension_file *ef, char *par_heading, char *category, int w1, int w2) { if (kc++ == 0) WRITE("%s: ", par_heading); @@ -50669,7 +51073,7 @@ void Assertions__Maker__make_assertion_recursive_inner(parse_node *px, parse_nod #line 1519 "inform7/Chapter 15/Make Assertions.w" char *P, *Q, *In; int variant = 0; - if (!fix_rng_at_start_of_play) variant = (time(0))&15; + if (rng_seed_at_start_of_play == 0) variant = (time(0))&15; switch(variant) { case 1: P = "the chalk"; Q = "the cheese"; In = "Dairy Products School"; break; case 2: P = "St Peter"; Q = "St Paul"; In = "Pearly Gates"; break; @@ -51563,11 +51967,11 @@ void Assertions__Assemblies__satisfies_generalisation(inference_subject *infs, g infs, g->allocation_id, infs_k, new_sentence); } -#line 45 "inform7/Chapter 15/Implications.w" +#line 44 "inform7/Chapter 15/Implications.w" void Assertions__Implications__new(parse_node *px, parse_node *py) { if (prevailing_mood == CERTAIN_CE) { -#line 58 "inform7/Chapter 15/Implications.w" +#line 57 "inform7/Chapter 15/Implications.w" Problems__Issue__sentence_problem(_P_(PM_ImplicationCertain), "that's an implication which is too certain for me", "since a sentence like this talks about a generality of things in terms of " @@ -51578,7 +51982,7 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { return; } -#line 46 "inform7/Chapter 15/Implications.w" +#line 45 "inform7/Chapter 15/Implications.w" ; if (ParseTree__type(py) == AND_NT) { Assertions__Implications__new(px, py->down); @@ -51587,12 +51991,12 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { } { -#line 70 "inform7/Chapter 15/Implications.w" +#line 69 "inform7/Chapter 15/Implications.w" inference_subject *premiss_kind = NULL; pcalc_prop *premiss = NULL; { -#line 90 "inform7/Chapter 15/Implications.w" +#line 89 "inform7/Chapter 15/Implications.w" parse_node *loc = px; if (ParseTree__type(loc) == WITH_NT) loc = loc->down; premiss_kind = ParseTree__get_subject(loc); @@ -51600,11 +52004,11 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { if (premiss_kind == NULL) premiss_kind = Kinds__Behaviour__as_subject(K_thing); } -#line 72 "inform7/Chapter 15/Implications.w" +#line 71 "inform7/Chapter 15/Implications.w" ; { -#line 99 "inform7/Chapter 15/Implications.w" +#line 98 "inform7/Chapter 15/Implications.w" if (Calculus__Propositions__Assert__testable_at_compile_time(premiss) == FALSE) { Problems__Issue__sentence_problem(_P_(PM_BadImplicationDomain), "that's an implication where the condition to qualify is not " @@ -51616,11 +52020,11 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { } } -#line 73 "inform7/Chapter 15/Implications.w" +#line 72 "inform7/Chapter 15/Implications.w" ; { -#line 112 "inform7/Chapter 15/Implications.w" +#line 111 "inform7/Chapter 15/Implications.w" property *prn = Adjectives__Phrases__has_EORP_meaning(ParseTree__get_aph(py)); if (prn == NULL) { Problems__Issue__sentence_problem(_P_(PM_ImplicationValueProperty), @@ -51631,7 +52035,7 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { } } -#line 74 "inform7/Chapter 15/Implications.w" +#line 73 "inform7/Chapter 15/Implications.w" ; implication *imp = CREATE(implication); @@ -51646,18 +52050,18 @@ void Assertions__Implications__new(parse_node *px, parse_node *py) { premiss_kind, imp->if_spec, imp->then_pn); } -#line 52 "inform7/Chapter 15/Implications.w" +#line 51 "inform7/Chapter 15/Implications.w" ; } -#line 140 "inform7/Chapter 15/Implications.w" +#line 139 "inform7/Chapter 15/Implications.w" void Assertions__Implications__consider_all(inference_subject *infs) { if (InferenceSubjects__domain(infs)) return; int ongoing = TRUE; while (ongoing) { { -#line 156 "inform7/Chapter 15/Implications.w" +#line 155 "inform7/Chapter 15/Implications.w" property *prn; LOOP_OVER(prn, property) { possession_marker *pom = Properties__get_possession_marker(prn); @@ -51666,14 +52070,14 @@ void Assertions__Implications__consider_all(inference_subject *infs) { } } -#line 144 "inform7/Chapter 15/Implications.w" +#line 143 "inform7/Chapter 15/Implications.w" ; Assertions__Implications__set_possessed_flags(infs); ongoing = Assertions__Implications__check_implications_of(infs, infs); } } -#line 167 "inform7/Chapter 15/Implications.w" +#line 166 "inform7/Chapter 15/Implications.w" void Assertions__Implications__set_possessed_flags(inference_subject *infs) { inference_subject *k = InferenceSubjects__narrowest_broader_subject(infs); if (k) Assertions__Implications__set_possessed_flags(k); @@ -51684,21 +52088,21 @@ void Assertions__Implications__set_possessed_flags(inference_subject *infs) { if ((Properties__is_either_or(prn)) && (World__Inferences__get_certainty(inf) != UNKNOWN_CE)) { -#line 184 "inform7/Chapter 15/Implications.w" +#line 183 "inform7/Chapter 15/Implications.w" int truth_state = TRUE, certainty = World__Inferences__get_certainty(inf); if (certainty < 0) { certainty = -certainty; truth_state = FALSE; } possession_marker *pom = Properties__get_possession_marker(prn); { -#line 200 "inform7/Chapter 15/Implications.w" +#line 199 "inform7/Chapter 15/Implications.w" if (pom->possession_certainty < certainty) { pom->possessed = truth_state; pom->possession_certainty = certainty; } } -#line 188 "inform7/Chapter 15/Implications.w" +#line 187 "inform7/Chapter 15/Implications.w" ; if (Properties__EitherOr__get_negation(prn)) { @@ -51707,24 +52111,24 @@ void Assertions__Implications__set_possessed_flags(inference_subject *infs) { truth_state = (truth_state)?FALSE:TRUE; { -#line 200 "inform7/Chapter 15/Implications.w" +#line 199 "inform7/Chapter 15/Implications.w" if (pom->possession_certainty < certainty) { pom->possessed = truth_state; pom->possession_certainty = certainty; } } -#line 194 "inform7/Chapter 15/Implications.w" +#line 193 "inform7/Chapter 15/Implications.w" ; } } -#line 175 "inform7/Chapter 15/Implications.w" +#line 174 "inform7/Chapter 15/Implications.w" ; } } -#line 215 "inform7/Chapter 15/Implications.w" +#line 214 "inform7/Chapter 15/Implications.w" int Assertions__Implications__check_implications_of(inference_subject *domain, inference_subject *candidate) { inference_subject *k = InferenceSubjects__narrowest_broader_subject(domain); if ((k) && (Assertions__Implications__check_implications_of(k, candidate))) return TRUE; @@ -51737,7 +52141,7 @@ int Assertions__Implications__check_implications_of(inference_subject *domain, i for (imp = InferenceSubjects__get_implications(domain); imp; imp = imp->next_implication) { -#line 233 "inform7/Chapter 15/Implications.w" +#line 232 "inform7/Chapter 15/Implications.w" int conclusion_state = TRUE; if (ParseTree__int_annotation(imp->then_pn, negated_boolean_ANNOT)) conclusion_state = FALSE; if (imp->implied_likelihood < 0) conclusion_state = (conclusion_state)?FALSE:TRUE; @@ -51748,20 +52152,20 @@ int Assertions__Implications__check_implications_of(inference_subject *domain, i property *conclusion_prop = Adjectives__Phrases__has_EORP_meaning(ParseTree__get_aph(imp->then_pn)); { -#line 258 "inform7/Chapter 15/Implications.w" +#line 257 "inform7/Chapter 15/Implications.w" if ((conclusion_prop == NULL) || (World__Permissions__find(candidate, conclusion_prop, TRUE) == NULL)) { LOGIF(IMPLICATIONS, "IMPOSSIBLE: property not provided\n"); continue; } } -#line 241 "inform7/Chapter 15/Implications.w" +#line 240 "inform7/Chapter 15/Implications.w" ; possession_marker *pom = Properties__get_possession_marker(conclusion_prop); { -#line 266 "inform7/Chapter 15/Implications.w" +#line 265 "inform7/Chapter 15/Implications.w" LOGIF(IMPLICATIONS, "Possession marker has (certainty %d; possessed state %d)\n", pom->possession_certainty, pom->possessed); if (pom->possessed == conclusion_state) { @@ -51774,7 +52178,7 @@ int Assertions__Implications__check_implications_of(inference_subject *domain, i } } -#line 244 "inform7/Chapter 15/Implications.w" +#line 243 "inform7/Chapter 15/Implications.w" ; int candidate_qualifies = Calculus__Propositions__Assert__test_at_compile_time(imp->if_spec, candidate); @@ -51783,7 +52187,7 @@ int Assertions__Implications__check_implications_of(inference_subject *domain, i LOGIF(IMPLICATIONS, "PASS: changing property $Y of $j\n", conclusion_prop, candidate); { -#line 280 "inform7/Chapter 15/Implications.w" +#line 279 "inform7/Chapter 15/Implications.w" adjectival_phrase *aph = Properties__EitherOr__get_aph(conclusion_prop); pcalc_prop *prop = Calculus__Atoms__KIND_new(InferenceSubjects__domain(domain), Calculus__Terms__new_variable(0)); if (conclusion_state == FALSE) { @@ -51797,29 +52201,29 @@ int Assertions__Implications__check_implications_of(inference_subject *domain, i return TRUE; } -#line 250 "inform7/Chapter 15/Implications.w" +#line 249 "inform7/Chapter 15/Implications.w" ; } else { LOGIF(IMPLICATIONS, "FAIL: take no action\n"); } } -#line 225 "inform7/Chapter 15/Implications.w" +#line 224 "inform7/Chapter 15/Implications.w" ; return FALSE; } -#line 23 "inform7/Chapter 15/Property Declarations.w" +#line 21 "inform7/Chapter 15/Property Declarations.w" sentence_handler CANBE_SH_handler = { SENTENCE_NT, CANBE_VB, 1, Assertions__Property__declare_property_can_be }; -#line 33 "inform7/Chapter 15/Property Declarations.w" +#line 31 "inform7/Chapter 15/Property Declarations.w" int forbidden_property_owners_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 41 "inform7/Chapter 15/Property Declarations.w" +#line 39 "inform7/Chapter 15/Property Declarations.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_PropertyOfKind1), "this seems to give a property to all kinds, rather than to objects or " @@ -51829,7 +52233,7 @@ int forbidden_property_owners_NTMC(int *X, void **XP, int *R, void **RP, int w1, "has a number called coolness rating'."); } -#line 34 "inform7/Chapter 15/Property Declarations.w" +#line 32 "inform7/Chapter 15/Property Declarations.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -51837,7 +52241,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 41 "inform7/Chapter 15/Property Declarations.w" +#line 39 "inform7/Chapter 15/Property Declarations.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_PropertyOfKind1), "this seems to give a property to all kinds, rather than to objects or " @@ -51847,7 +52251,7 @@ break; "has a number called coolness rating'."); } -#line 35 "inform7/Chapter 15/Property Declarations.w" +#line 33 "inform7/Chapter 15/Property Declarations.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -51855,7 +52259,7 @@ break; #pragma clang diagnostic pop case 2: { -#line 52 "inform7/Chapter 15/Property Declarations.w" +#line 50 "inform7/Chapter 15/Property Declarations.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_PropertyOfPronoun), "it's often a little ambiguous to declare properties for 'it'", @@ -51863,7 +52267,7 @@ break; "property's owner or owners would be."); } -#line 36 "inform7/Chapter 15/Property Declarations.w" +#line 34 "inform7/Chapter 15/Property Declarations.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -51873,9 +52277,9 @@ break; } return TRUE; } -#line 37 "inform7/Chapter 15/Property Declarations.w" +#line 35 "inform7/Chapter 15/Property Declarations.w" -#line 67 "inform7/Chapter 15/Property Declarations.w" +#line 65 "inform7/Chapter 15/Property Declarations.w" void Assertions__Property__declare_property_can_be(parse_node *p) { parse_node *the_owner = p->down->next; parse_node *the_list = the_owner->next; @@ -51893,7 +52297,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { Assertions__Refiner__refine(the_owner, FORBID_CREATION); { -#line 168 "inform7/Chapter 15/Property Declarations.w" +#line 166 "inform7/Chapter 15/Property Declarations.w" if (ParseTree__type(the_owner) == WITH_NT) { Problems__Issue__sentence_problem(_P_(PM_QualifiedCanBe), "only a room, a thing or a kind can have such adjectives applied to it", @@ -51905,13 +52309,13 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 82 "inform7/Chapter 15/Property Declarations.w" +#line 80 "inform7/Chapter 15/Property Declarations.w" ; int count = Assertions__Property__list_length(the_list); { -#line 153 "inform7/Chapter 15/Property Declarations.w" +#line 151 "inform7/Chapter 15/Property Declarations.w" if ((cname_w1 >= 0) && (count < 3)) { Problems__Issue__sentence_problem(_P_(PM_ThisIsEitherOr), "a name can only be supplied using '... (this is...)' when a new property " @@ -51925,7 +52329,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 85 "inform7/Chapter 15/Property Declarations.w" +#line 83 "inform7/Chapter 15/Property Declarations.w" ; int first_w1 = -1, first_w2 = -1; @@ -51933,7 +52337,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { else { first_w1 = the_list->down->word_ref1; first_w2 = the_list->down->word_ref2; } { -#line 190 "inform7/Chapter 15/Property Declarations.w" +#line 188 "inform7/Chapter 15/Property Declarations.w" if ((either_flag) && (count != 2)) { Problems__Issue__sentence_problem(_P_(PM_EitherOnThree), "that looks like an attempt to use 'either' other than to lay out exactly " @@ -51945,7 +52349,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 90 "inform7/Chapter 15/Property Declarations.w" +#line 88 "inform7/Chapter 15/Property Declarations.w" ; int second_w1 = -1, second_w2 = -1; if (count >= 2) { second_w1 = the_list->down->next->word_ref1; second_w2 = the_list->down->next->word_ref2; } @@ -51956,12 +52360,12 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { inference_subject *owner_infs = NULL; { -#line 203 "inform7/Chapter 15/Property Declarations.w" +#line 201 "inform7/Chapter 15/Property Declarations.w" specification *owner_spec = ParseTree__get_evaluation(the_owner); if (Specifications__Conditions__is_qualified_DESCRIPTION(owner_spec)) { -#line 237 "inform7/Chapter 15/Property Declarations.w" +#line 235 "inform7/Chapter 15/Property Declarations.w" Problems__Issue__sentence_problem(_P_(PM_OwnerTimeDependent), "ownership of a property is something that has to be always true or " "always false", @@ -51973,7 +52377,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { return; } -#line 205 "inform7/Chapter 15/Property Declarations.w" +#line 203 "inform7/Chapter 15/Property Declarations.w" ; owner_infs = ParseTree__get_subject(the_owner); if (owner_infs == NULL) { @@ -51985,7 +52389,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { if ((K) && (Kinds__Behaviour__has_properties(K) == FALSE)) { -#line 219 "inform7/Chapter 15/Property Declarations.w" +#line 217 "inform7/Chapter 15/Property Declarations.w" Problems__quote_source(1, current_sentence); Problems__quote_kind(2, K); Problems__Issue__handmade_problem(_P_(PM_ValueCantHaveProperties)); @@ -52002,15 +52406,15 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { return; } -#line 214 "inform7/Chapter 15/Property Declarations.w" +#line 212 "inform7/Chapter 15/Property Declarations.w" ; } -#line 98 "inform7/Chapter 15/Property Declarations.w" +#line 96 "inform7/Chapter 15/Property Declarations.w" ; if (owner_infs == NULL) { -#line 250 "inform7/Chapter 15/Property Declarations.w" +#line 248 "inform7/Chapter 15/Property Declarations.w" Problems__Issue__sentence_problem(_P_(PM_NonObjectCanBe), "only a room, a thing or a kind can have such adjectives applied to it", "so that 'a dead end can be secret' is fine but 'taking can be secret' would " @@ -52018,12 +52422,12 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { return; } -#line 99 "inform7/Chapter 15/Property Declarations.w" +#line 97 "inform7/Chapter 15/Property Declarations.w" ; if (count <= 2) { -#line 260 "inform7/Chapter 15/Property Declarations.w" +#line 258 "inform7/Chapter 15/Property Declarations.w" int ew1 = -1, ew2 = -1; char *error_text = NULL; @@ -52032,7 +52436,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { if (Preform__parse_nt_against_word_range(property_name_NTM, first_w1, first_w2, NULL, NULL)) already = most_recent_result_p; { -#line 290 "inform7/Chapter 15/Property Declarations.w" +#line 288 "inform7/Chapter 15/Property Declarations.w" if (already) { if (Properties__is_either_or(already) == FALSE) error_text = "this already has a meaning as a value property"; @@ -52045,14 +52449,14 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 266 "inform7/Chapter 15/Property Declarations.w" +#line 264 "inform7/Chapter 15/Property Declarations.w" ; if ((count == 2) && (error_text == NULL)) { ew1 = second_w1; ew2 = second_w2; { -#line 304 "inform7/Chapter 15/Property Declarations.w" +#line 302 "inform7/Chapter 15/Property Declarations.w" if (Preform__parse_nt_against_word_range(negated_clause_NTM, ew1, ew2, NULL, NULL)) { int ep1, ep2; GET_RW(negated_clause_NTM, 1, ep1, ep2); @@ -52065,13 +52469,13 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 270 "inform7/Chapter 15/Property Declarations.w" +#line 268 "inform7/Chapter 15/Property Declarations.w" ; property *alreadybar = NULL; if (Preform__parse_nt_against_word_range(property_name_NTM, ew1, ew2, NULL, NULL)) alreadybar = most_recent_result_p; { -#line 318 "inform7/Chapter 15/Property Declarations.w" +#line 316 "inform7/Chapter 15/Property Declarations.w" if (alreadybar) { if (Properties__is_either_or(alreadybar) == FALSE) error_text = "this already has a meaning as a value property"; @@ -52092,7 +52496,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 273 "inform7/Chapter 15/Property Declarations.w" +#line 271 "inform7/Chapter 15/Property Declarations.w" ; } @@ -52108,14 +52512,14 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 101 "inform7/Chapter 15/Property Declarations.w" +#line 99 "inform7/Chapter 15/Property Declarations.w" ; property *prn = NULL; int already_created_instances = FALSE; { -#line 340 "inform7/Chapter 15/Property Declarations.w" +#line 338 "inform7/Chapter 15/Property Declarations.w" if (count <= 2) prn = Properties__EitherOr__obtain(first_w1, first_w2, owner_infs); else prn = Properties__Conditions__new(owner_infs, cname_w1, cname_w2, the_list, &already_created_instances); @@ -52123,23 +52527,23 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { owner_infs, prevailing_mood); } -#line 105 "inform7/Chapter 15/Property Declarations.w" +#line 103 "inform7/Chapter 15/Property Declarations.w" ; if (already_created_instances == FALSE) { if (count == 2) { -#line 349 "inform7/Chapter 15/Property Declarations.w" +#line 347 "inform7/Chapter 15/Property Declarations.w" property *prnbar = Properties__EitherOr__obtain(second_w1, second_w2, owner_infs); Calculus__Propositions__Assert__assert_true_about(Calculus__Propositions__Abstract__to_provide_property(prnbar), owner_infs, prevailing_mood); Properties__EitherOr__make_negations(prn, prnbar); } -#line 107 "inform7/Chapter 15/Property Declarations.w" +#line 105 "inform7/Chapter 15/Property Declarations.w" ; if (count >= 3) { -#line 385 "inform7/Chapter 15/Property Declarations.w" +#line 383 "inform7/Chapter 15/Property Declarations.w" parse_node *option; kind *condition_kind = Properties__Valued__kind(prn); for (option = the_list; option; option = (option->down)?(option->down->next):NULL) { @@ -52151,7 +52555,7 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } { -#line 407 "inform7/Chapter 15/Property Declarations.w" +#line 405 "inform7/Chapter 15/Property Declarations.w" if (Preform__parse_nt_against_word_range(spec_type_expression_or_value_NTM, pw1, pw2, NULL, NULL)) { specification *spec = most_recent_result_p; if ((Specifications__species_is(spec, DESCRIPTION_SPC) == FALSE) && @@ -52170,11 +52574,11 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 394 "inform7/Chapter 15/Property Declarations.w" +#line 392 "inform7/Chapter 15/Property Declarations.w" ; { -#line 427 "inform7/Chapter 15/Property Declarations.w" +#line 425 "inform7/Chapter 15/Property Declarations.w" property *already = NULL; if (Preform__parse_nt_against_word_range(property_name_NTM, pw1, pw2, NULL, NULL)) already = most_recent_result_p; if ((already) && (Properties__is_either_or(already))) { @@ -52190,19 +52594,19 @@ void Assertions__Property__declare_property_can_be(parse_node *p) { } } -#line 395 "inform7/Chapter 15/Property Declarations.w" +#line 393 "inform7/Chapter 15/Property Declarations.w" ; pcalc_prop *prop = Calculus__Propositions__Abstract__to_create_something(condition_kind, pw1, pw2); Calculus__Propositions__Assert__assert_true(prop, prevailing_mood); } } -#line 108 "inform7/Chapter 15/Property Declarations.w" +#line 106 "inform7/Chapter 15/Property Declarations.w" ; } } -#line 115 "inform7/Chapter 15/Property Declarations.w" +#line 113 "inform7/Chapter 15/Property Declarations.w" int Assertions__Property__list_length(parse_node *P) { if (P == NULL) internal_error("Ooops"); if (ParseTree__type(P) == AND_NT) @@ -52210,7 +52614,7 @@ int Assertions__Property__list_length(parse_node *P) { return 1; } -#line 131 "inform7/Chapter 15/Property Declarations.w" +#line 129 "inform7/Chapter 15/Property Declarations.w" int can_be_sentence_object_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRUE; *XP = RP[1]; ((parse_node *) RP[1])->next = RP[2];; @@ -52237,7 +52641,7 @@ break; } return TRUE; } -#line 136 "inform7/Chapter 15/Property Declarations.w" +#line 134 "inform7/Chapter 15/Property Declarations.w" int condition_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -52255,7 +52659,7 @@ break; } return TRUE; } -#line 140 "inform7/Chapter 15/Property Declarations.w" +#line 138 "inform7/Chapter 15/Property Declarations.w" int condition_name_inner_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -52278,7 +52682,7 @@ break; } return TRUE; } -#line 145 "inform7/Chapter 15/Property Declarations.w" +#line 143 "inform7/Chapter 15/Property Declarations.w" int condition_name_innermost_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -52296,9 +52700,9 @@ break; } return TRUE; } -#line 149 "inform7/Chapter 15/Property Declarations.w" +#line 147 "inform7/Chapter 15/Property Declarations.w" -#line 459 "inform7/Chapter 15/Property Declarations.w" +#line 456 "inform7/Chapter 15/Property Declarations.w" property *Assertions__Property__recursively_declare_properties(parse_node *owner_ref, parse_node *p) { switch(ParseTree__type(p)) { case AND_NT: @@ -52307,18 +52711,18 @@ property *Assertions__Property__recursively_declare_properties(parse_node *owner break; case PROPERTYCALLED_NT: { -#line 519 "inform7/Chapter 15/Property Declarations.w" +#line 516 "inform7/Chapter 15/Property Declarations.w" parse_node *kind_ref = p->down; parse_node *prn_ref = p->down->next; Assertions__Property__recursively_call_properties(owner_ref, kind_ref, prn_ref); return NULL; } -#line 465 "inform7/Chapter 15/Property Declarations.w" +#line 462 "inform7/Chapter 15/Property Declarations.w" ; case PROPER_NOUN_NT: { -#line 477 "inform7/Chapter 15/Property Declarations.w" +#line 474 "inform7/Chapter 15/Property Declarations.w" if ((Preform__parse_nt_against_word_range(k_kind_NTM, p->word_ref1, p->word_ref2, NULL, NULL)) && ((most_recent_result_p == K_number) || (most_recent_result_p == K_text))) { Problems__Issue__assertion_problem(_P_(PM_BareProperty), @@ -52333,7 +52737,7 @@ property *Assertions__Property__recursively_declare_properties(parse_node *owner if ((K) && (Kinds__Behaviour__has_properties(K) == FALSE)) { -#line 498 "inform7/Chapter 15/Property Declarations.w" +#line 495 "inform7/Chapter 15/Property Declarations.w" if ((Kinds__Compare__eq(K, K_action_name)) || (Kinds__get_construct(K) == CON_activity) || (Kinds__get_construct(K) == CON_rulebook)) @@ -52353,7 +52757,7 @@ property *Assertions__Property__recursively_declare_properties(parse_node *owner owner_infs = Kinds__Behaviour__as_subject(K_object); } -#line 489 "inform7/Chapter 15/Property Declarations.w" +#line 486 "inform7/Chapter 15/Property Declarations.w" ; property *prn = Properties__Valued__obtain(p->word_ref1, p->word_ref2); Calculus__Propositions__Assert__assert_true_about(Calculus__Propositions__Abstract__to_provide_property(prn), @@ -52361,7 +52765,7 @@ property *Assertions__Property__recursively_declare_properties(parse_node *owner return prn; } -#line 466 "inform7/Chapter 15/Property Declarations.w" +#line 463 "inform7/Chapter 15/Property Declarations.w" ; default: internal_error("Assertions__Property__recursively_declare_properties on a node of unknown type"); @@ -52369,7 +52773,7 @@ property *Assertions__Property__recursively_declare_properties(parse_node *owner return NULL; } -#line 530 "inform7/Chapter 15/Property Declarations.w" +#line 527 "inform7/Chapter 15/Property Declarations.w" void Assertions__Property__recursively_call_properties(parse_node *owner_ref, parse_node *kind_ref, parse_node *prn_ref) { switch(ParseTree__type(prn_ref)) { case AND_NT: @@ -52379,16 +52783,16 @@ void Assertions__Property__recursively_call_properties(parse_node *owner_ref, pa default: { -#line 544 "inform7/Chapter 15/Property Declarations.w" +#line 541 "inform7/Chapter 15/Property Declarations.w" property *prn = Assertions__Property__recursively_declare_properties(owner_ref, prn_ref); kind *K = NULL; { -#line 556 "inform7/Chapter 15/Property Declarations.w" +#line 553 "inform7/Chapter 15/Property Declarations.w" if (Preform__parse_nt_against_word_range(k_kind_NTM, kind_ref->word_ref1, kind_ref->word_ref2, NULL, NULL)) K = most_recent_result_p; else { -#line 562 "inform7/Chapter 15/Property Declarations.w" +#line 559 "inform7/Chapter 15/Property Declarations.w" specification *spec = NULL; if (Preform__parse_nt_against_word_range(spec_type_expression_NTM, kind_ref->word_ref1, kind_ref->word_ref2, NULL, NULL)) spec = most_recent_result_p; @@ -52429,15 +52833,15 @@ void Assertions__Property__recursively_call_properties(parse_node *owner_ref, pa return; } -#line 557 "inform7/Chapter 15/Property Declarations.w" +#line 554 "inform7/Chapter 15/Property Declarations.w" ; } -#line 546 "inform7/Chapter 15/Property Declarations.w" +#line 543 "inform7/Chapter 15/Property Declarations.w" ; { -#line 604 "inform7/Chapter 15/Property Declarations.w" +#line 601 "inform7/Chapter 15/Property Declarations.w" if (Kinds__Compare__eq(K, K_value)) { if (prn == P_variable_initial_value) return; Problems__quote_source(1, current_sentence); @@ -52453,14 +52857,14 @@ void Assertions__Property__recursively_call_properties(parse_node *owner_ref, pa } } -#line 547 "inform7/Chapter 15/Property Declarations.w" +#line 544 "inform7/Chapter 15/Property Declarations.w" ; kind *current_kind = Properties__Valued__kind(prn); if (current_kind == NULL) Properties__Valued__set_kind(prn, K); else if (Kinds__Compare__eq(current_kind, K) == FALSE) { -#line 621 "inform7/Chapter 15/Property Declarations.w" +#line 618 "inform7/Chapter 15/Property Declarations.w" Problems__quote_source(1, current_sentence); Problems__quote_words(2, kind_ref->word_ref1, kind_ref->word_ref2); Problems__quote_property(3, prn); @@ -52473,11 +52877,11 @@ void Assertions__Property__recursively_call_properties(parse_node *owner_ref, pa return; } -#line 551 "inform7/Chapter 15/Property Declarations.w" +#line 548 "inform7/Chapter 15/Property Declarations.w" ; } -#line 537 "inform7/Chapter 15/Property Declarations.w" +#line 534 "inform7/Chapter 15/Property Declarations.w" ; } } @@ -52504,7 +52908,7 @@ int s_plain_text_with_equals_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 223 "inform7/Chapter 16/Meaning Lists.w" +#line 219 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__log_production(unsigned int production) { if (production == 0) { LOG(""); return; } if (production & 0x80000000) { @@ -52580,7 +52984,7 @@ void Parser__SP__MeaningLists__log_production(unsigned int production) { } else Semantics__Nouns__ExcerptMeanings__log_meaning_code(production); } -#line 305 "inform7/Chapter 16/Meaning Lists.w" +#line 301 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__log(meaning_list *ml) { if (ml == NULL) { LOG("\n"); return; } Parser__SP__MeaningLists__log_ml_recursively(ml, 0, 0, 1); @@ -52591,7 +52995,7 @@ void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int int w1, w2; { -#line 346 "inform7/Chapter 16/Meaning Lists.w" +#line 342 "inform7/Chapter 16/Meaning Lists.w" if (num == 0) { meaning_list *ml2; for (ml2 = ml, of = 0; ml2; ml2 = ml2->next_alternative, of++) ; @@ -52599,7 +53003,7 @@ void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int } } -#line 313 "inform7/Chapter 16/Meaning Lists.w" +#line 309 "inform7/Chapter 16/Meaning Lists.w" ; if (ml == NULL) { LOG("NULL\n"); return; } @@ -52616,7 +53020,7 @@ void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int } { -#line 359 "inform7/Chapter 16/Meaning Lists.w" +#line 355 "inform7/Chapter 16/Meaning Lists.w" switch (ml->production) { case DETERMINER_ML: LOG(" => "); @@ -52630,7 +53034,7 @@ void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int } } -#line 327 "inform7/Chapter 16/Meaning Lists.w" +#line 323 "inform7/Chapter 16/Meaning Lists.w" ; Parser__SP__MeaningLists__get_text(ml, &w1, &w2); if (w1 >= 0) LOG(" / \"$W\"", w1, w2); @@ -52643,13 +53047,13 @@ void Parser__SP__MeaningLists__log_ml_recursively(meaning_list *ml, int num, int if (ml->sibling) Parser__SP__MeaningLists__log_ml_recursively(ml->sibling, 0, 0, gen+1); } -#line 447 "inform7/Chapter 16/Meaning Lists.w" +#line 443 "inform7/Chapter 16/Meaning Lists.w" meaning_list *LP_marker = NULL, *GAP_marker = NULL, *TAIL_marker = NULL; meaning_list *earliest_ephemeral_ML_today = NULL; int current_creation_time = 0, max_ML_creations_per_day = 0, no_ML_creations_today; -#line 455 "inform7/Chapter 16/Meaning Lists.w" +#line 451 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__get_available_ml(int seeking_permanent_slot) { meaning_list *new; if ((seeking_permanent_slot) && (GAP_marker)) { @@ -52659,7 +53063,7 @@ meaning_list *Parser__SP__MeaningLists__get_available_ml(int seeking_permanent_s /* here TAIL does not change */ { -#line 500 "inform7/Chapter 16/Meaning Lists.w" +#line 496 "inform7/Chapter 16/Meaning Lists.w" do { GAP_marker = NEXT_OBJECT(GAP_marker, meaning_list); GAP_movements++; @@ -52667,7 +53071,7 @@ meaning_list *Parser__SP__MeaningLists__get_available_ml(int seeking_permanent_s if (GAP_marker == TAIL_marker) GAP_marker = NULL; } -#line 462 "inform7/Chapter 16/Meaning Lists.w" +#line 458 "inform7/Chapter 16/Meaning Lists.w" ; } else if (TAIL_marker) { new = TAIL_marker; @@ -52698,7 +53102,7 @@ meaning_list *Parser__SP__MeaningLists__get_available_ml(int seeking_permanent_s return new; } -#line 511 "inform7/Chapter 16/Meaning Lists.w" +#line 507 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__finish_this_session(void) { if (current_creation_time < THE_INFINITE_FUTURE) { if (Log__get_aspect(MEANING_LIST_ALLOCATION_DA)) { @@ -52712,7 +53116,7 @@ void Parser__SP__MeaningLists__finish_this_session(void) { } { -#line 556 "inform7/Chapter 16/Meaning Lists.w" +#line 552 "inform7/Chapter 16/Meaning Lists.w" TAIL_marker = NEXT_OBJECT(LP_marker, meaning_list); if (GAP_marker == NULL) { GAP_marker = earliest_ephemeral_ML_today; @@ -52722,7 +53126,7 @@ void Parser__SP__MeaningLists__finish_this_session(void) { } } -#line 522 "inform7/Chapter 16/Meaning Lists.w" +#line 518 "inform7/Chapter 16/Meaning Lists.w" ; current_creation_time++; earliest_ephemeral_ML_today = NULL; @@ -52730,12 +53134,12 @@ void Parser__SP__MeaningLists__finish_this_session(void) { } } -#line 619 "inform7/Chapter 16/Meaning Lists.w" +#line 615 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__new(unsigned int code_number) { meaning_list *ml = Parser__SP__MeaningLists__get_available_ml(FALSE); { -#line 636 "inform7/Chapter 16/Meaning Lists.w" +#line 632 "inform7/Chapter 16/Meaning Lists.w" ml->em = NULL; ml->next_alternative = NULL; ml->sibling = NULL; @@ -52747,7 +53151,7 @@ meaning_list *Parser__SP__MeaningLists__new(unsigned int code_number) { ml->data_attached = NULL_GENERAL_POINTER; } -#line 621 "inform7/Chapter 16/Meaning Lists.w" +#line 617 "inform7/Chapter 16/Meaning Lists.w" ; no_ephemeral_MLs++; return ml; @@ -52757,7 +53161,7 @@ meaning_list *Parser__SP__MeaningLists__new_permanent(unsigned int code_number) meaning_list *ml = Parser__SP__MeaningLists__get_available_ml(TRUE); { -#line 636 "inform7/Chapter 16/Meaning Lists.w" +#line 632 "inform7/Chapter 16/Meaning Lists.w" ml->em = NULL; ml->next_alternative = NULL; ml->sibling = NULL; @@ -52769,20 +53173,20 @@ meaning_list *Parser__SP__MeaningLists__new_permanent(unsigned int code_number) ml->data_attached = NULL_GENERAL_POINTER; } -#line 628 "inform7/Chapter 16/Meaning Lists.w" +#line 624 "inform7/Chapter 16/Meaning Lists.w" ; no_permanent_MLs++; return ml; } -#line 650 "inform7/Chapter 16/Meaning Lists.w" +#line 646 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__new_with_words(unsigned int code_number, int w1, int w2) { meaning_list *ml = Parser__SP__MeaningLists__new(code_number); Parser__SP__MeaningLists__set_text(ml, w1, w2); return ml; } -#line 659 "inform7/Chapter 16/Meaning Lists.w" +#line 655 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__from_nametag(nametag *nt) { meaning_list *ml = Parser__SP__MeaningLists__new(NAMETAG_MC); ml->em = Nametags__get_principal_meaning(nt); @@ -52790,21 +53194,21 @@ meaning_list *Parser__SP__MeaningLists__from_nametag(nametag *nt) { return ml; } -#line 672 "inform7/Chapter 16/Meaning Lists.w" +#line 668 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__type_from_ID(int ID_number) { meaning_list *ml = Parser__SP__MeaningLists__new(TYPE_ML); ml->type_spec = Specifications__new_generic_from_type_ID(ID_number); return ml; } -#line 681 "inform7/Chapter 16/Meaning Lists.w" +#line 677 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__type_from_kind(kind *K) { meaning_list *ml = Parser__SP__MeaningLists__new(TYPE_ML); ml->type_spec = Specifications__Values__new_generic_CONSTANT(K); return ml; } -#line 692 "inform7/Chapter 16/Meaning Lists.w" +#line 688 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__determiner(quantifier *quant, int parameter, int w1, int w2) { meaning_list *ml = Parser__SP__MeaningLists__new_with_words(DETERMINER_ML, w1, w2); ml->data_attached = STORE_POINTER_quantifier(quant); @@ -52812,35 +53216,35 @@ meaning_list *Parser__SP__MeaningLists__determiner(quantifier *quant, int parame return ml; } -#line 706 "inform7/Chapter 16/Meaning Lists.w" +#line 702 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__time(time_period tp) { meaning_list *ml = Parser__SP__MeaningLists__new(TIME_ML); ml->type_spec = Specifications__Conditions__new(TimePeriods__store(tp)); return ml; } -#line 715 "inform7/Chapter 16/Meaning Lists.w" +#line 711 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__verb(verb_usage *vu) { meaning_list *ml = Parser__SP__MeaningLists__new(VERB_ML); Parser__SP__MeaningLists__attach_data(ml, STORE_POINTER_verb_usage(vu)); return ml; } -#line 724 "inform7/Chapter 16/Meaning Lists.w" +#line 720 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__preposition(preposition_usage *pu) { meaning_list *ml = Parser__SP__MeaningLists__new(PREP_ML); Parser__SP__MeaningLists__attach_data(ml, STORE_POINTER_preposition_usage(pu)); return ml; } -#line 733 "inform7/Chapter 16/Meaning Lists.w" +#line 729 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__option(int opt_num) { meaning_list *ml = Parser__SP__MeaningLists__new(OPTION_ML); ml->type_spec = Specifications__Conditions__new_TEST_PHRASE_OPTION(opt_num); return ml; } -#line 744 "inform7/Chapter 16/Meaning Lists.w" +#line 740 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__action(action_pattern *ap) { meaning_list *ml = Parser__SP__MeaningLists__new(ACTION_ML); ml->type_spec = Specifications__Conditions__new_TEST_ACTION(ap); @@ -52853,7 +53257,7 @@ meaning_list *Parser__SP__MeaningLists__pastaction(action_pattern *ap) { return ml; } -#line 759 "inform7/Chapter 16/Meaning Lists.w" +#line 755 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__say_verb(verb_conjugation *vc, int neg) { meaning_list *ml = Parser__SP__MeaningLists__new(SAY_VERB_ML); Parser__SP__MeaningLists__attach_data(ml, STORE_POINTER_verb_conjugation(vc)); @@ -52861,21 +53265,21 @@ meaning_list *Parser__SP__MeaningLists__say_verb(verb_conjugation *vc, int neg) return ml; } -#line 769 "inform7/Chapter 16/Meaning Lists.w" +#line 765 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__say_modal_verb(verb_conjugation *vc) { meaning_list *ml = Parser__SP__MeaningLists__new(SAY_MODAL_VERB_ML); Parser__SP__MeaningLists__attach_data(ml, STORE_POINTER_verb_conjugation(vc)); return ml; } -#line 779 "inform7/Chapter 16/Meaning Lists.w" +#line 775 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__say_adjective(adjectival_phrase *aph) { meaning_list *ml = Parser__SP__MeaningLists__new(SAY_ADJECTIVE_ML); Parser__SP__MeaningLists__attach_data(ml, STORE_POINTER_adjectival_phrase(aph)); return ml; } -#line 790 "inform7/Chapter 16/Meaning Lists.w" +#line 786 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__copy(meaning_list *ml_to, meaning_list *ml_from) { ml_to->em = ml_from->em; ml_to->next_alternative = ml_from->next_alternative; @@ -52889,7 +53293,7 @@ void Parser__SP__MeaningLists__copy(meaning_list *ml_to, meaning_list *ml_from) ml_to->data_attached = ml_from->data_attached; } -#line 806 "inform7/Chapter 16/Meaning Lists.w" +#line 802 "inform7/Chapter 16/Meaning Lists.w" unsigned int Parser__SP__MeaningLists__production(meaning_list *ml) { return ml->production; } @@ -52897,7 +53301,7 @@ void Parser__SP__MeaningLists__set_production(meaning_list *ml, unsigned int pr) ml->production = pr; } -#line 816 "inform7/Chapter 16/Meaning Lists.w" +#line 812 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__right(meaning_list *ml) { return ml->sibling; } @@ -52911,7 +53315,7 @@ void Parser__SP__MeaningLists__set_down(meaning_list *ml, meaning_list *ml2) { ml->child = ml2; } -#line 832 "inform7/Chapter 16/Meaning Lists.w" +#line 828 "inform7/Chapter 16/Meaning Lists.w" meaning_list *Parser__SP__MeaningLists__sideways(meaning_list *ml) { return ml->next_alternative; } @@ -52922,7 +53326,7 @@ void Parser__SP__MeaningLists__set_score(meaning_list *ml, int s) { ml->score = s; } -#line 849 "inform7/Chapter 16/Meaning Lists.w" +#line 845 "inform7/Chapter 16/Meaning Lists.w" void Parser__SP__MeaningLists__set_text(meaning_list *ml, int w1, int w2) { if (w1<0) { ml->word_ref1 = -1; ml->word_ref2 = -1; } else { ml->word_ref1 = w1; ml->word_ref2 = w2; } @@ -52932,7 +53336,7 @@ void Parser__SP__MeaningLists__get_text(meaning_list *ml, int *w1, int *w2) { *w1 = ml->word_ref1; *w2 = ml->word_ref2; } -#line 861 "inform7/Chapter 16/Meaning Lists.w" +#line 857 "inform7/Chapter 16/Meaning Lists.w" excerpt_meaning *Parser__SP__MeaningLists__meaning(meaning_list *ml) { return ml->em; } @@ -52940,7 +53344,7 @@ void Parser__SP__MeaningLists__set_meaning(meaning_list *ml, excerpt_meaning *em ml->em = em; } -#line 871 "inform7/Chapter 16/Meaning Lists.w" +#line 867 "inform7/Chapter 16/Meaning Lists.w" specification *Parser__SP__MeaningLists__get_attached_spec(meaning_list *ml) { return ml->type_spec; } @@ -52948,7 +53352,7 @@ void Parser__SP__MeaningLists__attach_spec(meaning_list *ml, specification *spec ml->type_spec = spec; } -#line 882 "inform7/Chapter 16/Meaning Lists.w" +#line 878 "inform7/Chapter 16/Meaning Lists.w" general_pointer Parser__SP__MeaningLists__get_attached_data(meaning_list *ml) { return ml->data_attached; } @@ -53817,7 +54221,7 @@ int literal_unit_notation_NTMR(int w1, int w2, int *X, void **XP) { literal_pattern *lp; LOOP_OVER(lp, literal_pattern) { int val; - kind *K = Semantics__Nouns__LiteralPatterns__match(lp, w1, w2, &val); + kind *K = LiteralPatterns__match(lp, w1, w2, &val); if (K) { *X = val; *XP = K; return TRUE; } } return FALSE; @@ -56645,7 +57049,7 @@ break; } #line 362 "inform7/Chapter 16/Conditions and Phrases.w" -#line 93 "inform7/Chapter 16/Meaning List Conversions.w" +#line 91 "inform7/Chapter 16/Meaning List Conversions.w" int PHRASE_subtree_to_type_nesting = 0; specification *Parser__SP__Conversion__CMD_subtree_to_spec(meaning_list *ml) { @@ -56680,7 +57084,7 @@ specification *Parser__SP__Conversion__CMD_subtree_to_spec(meaning_list *ml) { return spec; } -#line 130 "inform7/Chapter 16/Meaning List Conversions.w" +#line 128 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_subtree_to_spec(meaning_list *ml) { if (ml == NULL) return Specifications__Unknown__new(-1, -1); NOW_CONVERTING_SUBTREE(COND_ML); @@ -56706,7 +57110,7 @@ specification *Parser__SP__Conversion__COND_subtree_to_spec(meaning_list *ml) { return spec; } -#line 158 "inform7/Chapter 16/Meaning List Conversions.w" +#line 156 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_subtree_to_spec(meaning_list *ml) { if (ml == NULL) return Specifications__Unknown__new(-1, -1); /* note that no problem message is issued */ @@ -56758,7 +57162,7 @@ specification *Parser__SP__Conversion__TE_subtree_to_spec(meaning_list *ml) { return spec; } -#line 212 "inform7/Chapter 16/Meaning List Conversions.w" +#line 210 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_subtree_to_spec(meaning_list *ml) { if (ml == NULL) return Specifications__Unknown__new(-1, -1); NOW_CONVERTING_SUBTREE(VAL_ML); @@ -56812,21 +57216,21 @@ specification *Parser__SP__Conversion__VAL_subtree_to_spec(meaning_list *ml) { return spec; } -#line 272 "inform7/Chapter 16/Meaning List Conversions.w" +#line 270 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__ACTION_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(ACTION_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 281 "inform7/Chapter 16/Meaning List Conversions.w" +#line 279 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__AP_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(AP_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 290 "inform7/Chapter 16/Meaning List Conversions.w" +#line 288 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__CASE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(CASE_ML); ml = Parser__SP__MeaningLists__down(ml); @@ -56841,7 +57245,7 @@ specification *Parser__SP__Conversion__CASE_subtree_to_spec(meaning_list *ml) { return spec; } -#line 307 "inform7/Chapter 16/Meaning List Conversions.w" +#line 305 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_AND_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(COND_AND_ML); spec = Specifications__Conditions__new_LOGICAL_AND( @@ -56850,7 +57254,7 @@ specification *Parser__SP__Conversion__COND_AND_subtree_to_spec(meaning_list *ml return spec; } -#line 318 "inform7/Chapter 16/Meaning List Conversions.w" +#line 316 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_OR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(COND_OR_ML); spec = Specifications__Conditions__new_LOGICAL_OR( @@ -56859,7 +57263,7 @@ specification *Parser__SP__Conversion__COND_OR_subtree_to_spec(meaning_list *ml) return spec; } -#line 329 "inform7/Chapter 16/Meaning List Conversions.w" +#line 327 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_NOT_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(COND_NOT_ML); spec = Parser__SP__Conversion__COND_subtree_to_spec(Parser__SP__MeaningLists__down(ml)); @@ -56870,7 +57274,7 @@ specification *Parser__SP__Conversion__COND_NOT_subtree_to_spec(meaning_list *ml return spec; } -#line 342 "inform7/Chapter 16/Meaning List Conversions.w" +#line 340 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_PAST_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(COND_PAST_ML); spec = Parser__SP__Conversion__COND_subtree_to_spec(Parser__SP__MeaningLists__down(ml)); @@ -56882,14 +57286,14 @@ specification *Parser__SP__Conversion__COND_PAST_subtree_to_spec(meaning_list *m return spec; } -#line 356 "inform7/Chapter 16/Meaning List Conversions.w" +#line 354 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__COND_PHRASE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(COND_PHRASE_ML); spec = Parser__SP__Conversion__general_phrase_to_spec(ml); return spec; } -#line 366 "inform7/Chapter 16/Meaning List Conversions.w" +#line 364 "inform7/Chapter 16/Meaning List Conversions.w" parse_node *PM_SpecificCalling_last_issued = NULL; specification *Parser__SP__Conversion__DC_subtree_to_spec(meaning_list *ml, int construed_as_noun) { @@ -56940,7 +57344,7 @@ specification *Parser__SP__Conversion__DC_subtree_to_spec(meaning_list *ml, int case DETERMINER_ML: { -#line 429 "inform7/Chapter 16/Meaning List Conversions.w" +#line 427 "inform7/Chapter 16/Meaning List Conversions.w" quantifier *quant = RETRIEVE_POINTER_quantifier( Parser__SP__MeaningLists__get_attached_data(annotation)); if (Specifications__species_is(spec, DESCRIPTION_SPC)) @@ -56951,7 +57355,7 @@ specification *Parser__SP__Conversion__DC_subtree_to_spec(meaning_list *ml, int Specifications__Unknown__coerce(spec); } -#line 414 "inform7/Chapter 16/Meaning List Conversions.w" +#line 412 "inform7/Chapter 16/Meaning List Conversions.w" ; break; default: CHILD_UNCONVERTIBLE(DC_ML); @@ -56961,7 +57365,7 @@ specification *Parser__SP__Conversion__DC_subtree_to_spec(meaning_list *ml, int return spec; } -#line 441 "inform7/Chapter 16/Meaning List Conversions.w" +#line 439 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__DC_ADJS_subtree_to_spec(meaning_list *ml, int construed_as_noun) { NOW_CONVERTING_SUBTREE(DC_ADJS_ML); if ((Parser__SP__MeaningLists__right(Parser__SP__MeaningLists__down(Parser__SP__MeaningLists__down(ml))) == NULL) && (construed_as_noun)) { @@ -56982,35 +57386,35 @@ specification *Parser__SP__Conversion__DC_ADJS_subtree_to_spec(meaning_list *ml, return spec; } -#line 464 "inform7/Chapter 16/Meaning List Conversions.w" +#line 462 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__DC_NOUN_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(DC_NOUN_ML); spec = Parser__SP__Conversion__qualified_noun_to_spec(NULL, Parser__SP__MeaningLists__down(ml)); return spec; } -#line 473 "inform7/Chapter 16/Meaning List Conversions.w" +#line 471 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__DC_ADJSNOUN_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(DC_ADJSNOUN_ML); spec = Parser__SP__Conversion__qualified_noun_to_spec(Parser__SP__MeaningLists__down(ml), Parser__SP__MeaningLists__right(Parser__SP__MeaningLists__down(ml))); return spec; } -#line 482 "inform7/Chapter 16/Meaning List Conversions.w" +#line 480 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__LITERAL_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(LITERAL_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 491 "inform7/Chapter 16/Meaning List Conversions.w" +#line 489 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__LOCAL_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(LOCAL_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 500 "inform7/Chapter 16/Meaning List Conversions.w" +#line 498 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__MEMBER_OF_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(MEMBER_OF_ML); spec = Parser__SP__Conversion__NP_subtree_to_spec(Parser__SP__MeaningLists__down(ml)); @@ -57022,7 +57426,7 @@ specification *Parser__SP__Conversion__MEMBER_OF_subtree_to_spec(meaning_list *m return spec; } -#line 515 "inform7/Chapter 16/Meaning List Conversions.w" +#line 513 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__NP_subtree_to_spec(meaning_list *ml) { if (ml == NULL) internal_error("missing NP"); RECORD_MLC_BACKTRACE; @@ -57037,49 +57441,49 @@ specification *Parser__SP__Conversion__NP_subtree_to_spec(meaning_list *ml) { return spec; } -#line 532 "inform7/Chapter 16/Meaning List Conversions.w" +#line 530 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__OPTION_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(OPTION_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 541 "inform7/Chapter 16/Meaning List Conversions.w" +#line 539 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__OTHERWISE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(OTHERWISE_ML); spec = Specifications__Commands__new_OTHERWISE(); return spec; } -#line 550 "inform7/Chapter 16/Meaning List Conversions.w" +#line 548 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__PHRASE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(PHRASE_ML); spec = Parser__SP__Conversion__general_phrase_to_spec(ml); return spec; } -#line 559 "inform7/Chapter 16/Meaning List Conversions.w" +#line 557 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__SN_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(SN_ML); spec = Parser__SP__Conversion__general_sentence_to_spec(ml); return spec; } -#line 568 "inform7/Chapter 16/Meaning List Conversions.w" +#line 566 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__STV_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(STV_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); return spec; } -#line 577 "inform7/Chapter 16/Meaning List Conversions.w" +#line 575 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__SV_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(SV_ML); spec = Parser__SP__Conversion__general_sentence_to_spec(ml); return spec; } -#line 586 "inform7/Chapter 16/Meaning List Conversions.w" +#line 584 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_CALLED_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TE_CALLED_ML); spec = Parser__SP__Conversion__TE_subtree_to_spec(Parser__SP__MeaningLists__down(ml)); @@ -57090,7 +57494,7 @@ specification *Parser__SP__Conversion__TE_CALLED_subtree_to_spec(meaning_list *m return spec; } -#line 599 "inform7/Chapter 16/Meaning List Conversions.w" +#line 597 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_EX_VAR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(TE_EX_VAR_ML); kind *K = Parser__SP__Conversion__police_te(Parser__SP__MeaningLists__down(ml)); @@ -57098,7 +57502,7 @@ specification *Parser__SP__Conversion__TE_EX_VAR_subtree_to_spec(meaning_list *m return spec; } -#line 609 "inform7/Chapter 16/Meaning List Conversions.w" +#line 607 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_GL_VAR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(TE_GL_VAR_ML); Parser__SP__Conversion__police_te(Parser__SP__MeaningLists__down(ml)); @@ -57106,7 +57510,7 @@ specification *Parser__SP__Conversion__TE_GL_VAR_subtree_to_spec(meaning_list *m return spec; } -#line 619 "inform7/Chapter 16/Meaning List Conversions.w" +#line 617 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_NEW_VAR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(TE_NEW_VAR_ML); kind *K = Parser__SP__Conversion__police_te(Parser__SP__MeaningLists__down(ml)); @@ -57114,7 +57518,7 @@ specification *Parser__SP__Conversion__TE_NEW_VAR_subtree_to_spec(meaning_list * return spec; } -#line 629 "inform7/Chapter 16/Meaning List Conversions.w" +#line 627 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TE_VAR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(TE_VAR_ML); kind *K = Parser__SP__Conversion__police_te(Parser__SP__MeaningLists__down(ml)); @@ -57122,7 +57526,7 @@ specification *Parser__SP__Conversion__TE_VAR_subtree_to_spec(meaning_list *ml) return spec; } -#line 639 "inform7/Chapter 16/Meaning List Conversions.w" +#line 637 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_ML); ml = Parser__SP__MeaningLists__down(ml); @@ -57137,7 +57541,7 @@ specification *Parser__SP__Conversion__TR_subtree_to_spec(meaning_list *ml) { return spec; } -#line 656 "inform7/Chapter 16/Meaning List Conversions.w" +#line 654 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_CORR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_CORR_ML); spec = Specifications__Storage__new_TABLE_ENTRY(); @@ -57150,7 +57554,7 @@ specification *Parser__SP__Conversion__TR_CORR_subtree_to_spec(meaning_list *ml) return spec; } -#line 671 "inform7/Chapter 16/Meaning List Conversions.w" +#line 669 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_ENTRY_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_ENTRY_ML); spec = Specifications__Storage__new_TABLE_ENTRY(); @@ -57173,7 +57577,7 @@ specification *Parser__SP__Conversion__TR_ENTRY_subtree_to_spec(meaning_list *ml return spec; } -#line 696 "inform7/Chapter 16/Meaning List Conversions.w" +#line 694 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_IN_ROW_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_IN_ROW_ML); spec = Specifications__Storage__new_TABLE_ENTRY(); @@ -57183,7 +57587,7 @@ specification *Parser__SP__Conversion__TR_IN_ROW_subtree_to_spec(meaning_list *m return spec; } -#line 708 "inform7/Chapter 16/Meaning List Conversions.w" +#line 706 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_LISTED_IN_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_LISTED_IN_ML); spec = Specifications__Storage__new_TABLE_ENTRY(); @@ -57192,7 +57596,7 @@ specification *Parser__SP__Conversion__TR_LISTED_IN_subtree_to_spec(meaning_list return spec; } -#line 719 "inform7/Chapter 16/Meaning List Conversions.w" +#line 717 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TR_OF_IN_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(TR_OF_IN_ML); spec = Specifications__Storage__new_TABLE_ENTRY(); @@ -57203,7 +57607,7 @@ specification *Parser__SP__Conversion__TR_OF_IN_subtree_to_spec(meaning_list *ml return spec; } -#line 732 "inform7/Chapter 16/Meaning List Conversions.w" +#line 730 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__TYPE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(TYPE_ML); spec = Parser__SP__MeaningLists__get_attached_spec(ml); @@ -57215,7 +57619,7 @@ specification *Parser__SP__Conversion__TYPE_subtree_to_spec(meaning_list *ml) { return spec; } -#line 746 "inform7/Chapter 16/Meaning List Conversions.w" +#line 744 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_LIST_ENTRY_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(VAL_LIST_ENTRY_ML); spec = Specifications__Storage__new_LIST_ENTRY( @@ -57224,14 +57628,14 @@ specification *Parser__SP__Conversion__VAL_LIST_ENTRY_subtree_to_spec(meaning_li return spec; } -#line 757 "inform7/Chapter 16/Meaning List Conversions.w" +#line 755 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_NOTHING_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(VAL_NOTHING_ML); spec = Specifications__Values__new_nothing_object_constant(); return spec; } -#line 766 "inform7/Chapter 16/Meaning List Conversions.w" +#line 764 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_PAIR_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(VAL_PAIR_ML); specification *X = Parser__SP__Conversion__NP_subtree_to_spec( @@ -57242,7 +57646,7 @@ specification *Parser__SP__Conversion__VAL_PAIR_subtree_to_spec(meaning_list *ml return spec; } -#line 779 "inform7/Chapter 16/Meaning List Conversions.w" +#line 777 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_PROP_OF_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING_SUBTREE(VAL_PROP_OF_ML); if (Parser__SP__MeaningLists__right(Parser__SP__MeaningLists__down(ml))) { @@ -57266,14 +57670,14 @@ specification *Parser__SP__Conversion__VAL_PROP_OF_subtree_to_spec(meaning_list return spec; } -#line 805 "inform7/Chapter 16/Meaning List Conversions.w" +#line 803 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VALUE_PHRASE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(VALUE_PHRASE_ML); spec = Parser__SP__Conversion__general_phrase_to_spec(ml); return spec; } -#line 814 "inform7/Chapter 16/Meaning List Conversions.w" +#line 812 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__VAL_RESPONSE_subtree_to_spec(meaning_list *ml) { NOW_CONVERTING(VAL_RESPONSE_ML); int c = Parser__SP__MeaningLists__match_score(ml); @@ -57293,7 +57697,7 @@ specification *Parser__SP__Conversion__VAL_RESPONSE_subtree_to_spec(meaning_list return spec; } -#line 840 "inform7/Chapter 16/Meaning List Conversions.w" +#line 838 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__ACTION_NAME_SMC_to_spec(meaning_list *ml) { NOW_CONVERTING_LEAF(MISCELLANEOUS_MC); action_name *an = RETRIEVE_POINTER_action_name(Semantics__Nouns__ExcerptMeanings__data(Parser__SP__MeaningLists__meaning(ml))); @@ -57435,7 +57839,7 @@ specification *Parser__SP__Conversion__NAMETAG_MC_to_spec(meaning_list *ml) { return spec; } -#line 986 "inform7/Chapter 16/Meaning List Conversions.w" +#line 984 "inform7/Chapter 16/Meaning List Conversions.w" kind *Parser__SP__Conversion__police_te(meaning_list *ml) { kind *K = NULL; if (ml != NULL) { @@ -57445,7 +57849,7 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { if (Specifications__Conditions__get_described_instance(spec) != NULL) { -#line 1012 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1010 "inform7/Chapter 16/Meaning List Conversions.w" Problems__quote_source(1, current_sentence); Problems__Issue__handmade_problem(_P_(PM_TypeCantVary)); Problems__issue_problem_segment( @@ -57455,13 +57859,13 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { return K_object; /* to prevent further errors */ } -#line 993 "inform7/Chapter 16/Meaning List Conversions.w" +#line 991 "inform7/Chapter 16/Meaning List Conversions.w" ; if ((Specifications__Conditions__number_of_adjectives_applied_to(spec) > 0) || (Specifications__Conditions__get_described_kind(spec) == NULL)) { -#line 1023 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1021 "inform7/Chapter 16/Meaning List Conversions.w" Problems__quote_source(1, current_sentence); Problems__Issue__handmade_problem(_P_(PM_TypeUnmaintainable)); Problems__issue_problem_segment( @@ -57472,14 +57876,14 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { return K_object; /* to prevent further errors */ } -#line 996 "inform7/Chapter 16/Meaning List Conversions.w" +#line 994 "inform7/Chapter 16/Meaning List Conversions.w" ; K = Specifications__Conditions__get_described_kind(spec); } else { if (Specifications__is_actual(spec)) { -#line 1012 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1010 "inform7/Chapter 16/Meaning List Conversions.w" Problems__quote_source(1, current_sentence); Problems__Issue__handmade_problem(_P_(PM_TypeCantVary)); Problems__issue_problem_segment( @@ -57489,12 +57893,12 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { return K_object; /* to prevent further errors */ } -#line 1000 "inform7/Chapter 16/Meaning List Conversions.w" +#line 998 "inform7/Chapter 16/Meaning List Conversions.w" ; if (Specifications__get_kind(spec) == NULL) { -#line 1035 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1033 "inform7/Chapter 16/Meaning List Conversions.w" Problems__Issue__handmade_problem(_P_(BelievedImpossible)); Problems__quote_source(1, current_sentence); Problems__issue_problem_segment( @@ -57505,7 +57909,7 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { return K_number; /* to prevent further errors */ } -#line 1002 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1000 "inform7/Chapter 16/Meaning List Conversions.w" ; K = Specifications__get_kind(spec); } @@ -57513,7 +57917,7 @@ kind *Parser__SP__Conversion__police_te(meaning_list *ml) { return K; } -#line 1057 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1055 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) { int instead_flag = FALSE, group_count = 0, mw1, mw2; specification *spec; @@ -57537,12 +57941,12 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) switch(Parser__SP__MeaningLists__production(ml)) { case SAY_ML: { -#line 1116 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1114 "inform7/Chapter 16/Meaning List Conversions.w" for (ml=Parser__SP__MeaningLists__down(ml); ml; group_count++, ml=Parser__SP__MeaningLists__right(ml)) { specification *this_group = Specifications__Commands__new_TO_PHRASE(); { -#line 1131 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1129 "inform7/Chapter 16/Meaning List Conversions.w" meaning_list *ml2; for (ml2 = ml; ml2; ml2 = Parser__SP__MeaningLists__sideways(ml2)) { if (Parser__SP__MeaningLists__production(ml2) == SAY_VERB_ML) { @@ -57584,11 +57988,11 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) } } -#line 1118 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1116 "inform7/Chapter 16/Meaning List Conversions.w" ; { -#line 1174 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1172 "inform7/Chapter 16/Meaning List Conversions.w" INVOCATION_VARIABLE(inv); LOOP_THROUGH_INVOCATION_LIST(inv, Specifications__invocation_list(this_group)) Invocations__set_group(inv, group_count); @@ -57596,24 +58000,24 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) Invocations__append_list(Specifications__invocation_list(spec), Specifications__invocation_list(this_group)); } -#line 1119 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1117 "inform7/Chapter 16/Meaning List Conversions.w" ; } } -#line 1078 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1076 "inform7/Chapter 16/Meaning List Conversions.w" ; break; case END_PHRASE_MC: { -#line 1184 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1182 "inform7/Chapter 16/Meaning List Conversions.w" spec = Specifications__Commands__new_END_BLOCK(RETRIEVE_POINTER_phrase(Semantics__Nouns__ExcerptMeanings__data(Parser__SP__MeaningLists__meaning(ml)))); } -#line 1079 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1077 "inform7/Chapter 16/Meaning List Conversions.w" ; break; default: { -#line 1098 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1096 "inform7/Chapter 16/Meaning List Conversions.w" for (; ml; ml = Parser__SP__MeaningLists__sideways(ml)) { phrase *ph; if (Parser__SP__MeaningLists__meaning(ml) == NULL) internal_error("Blank phrase meaning"); @@ -57624,7 +58028,7 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) group_count = 1; /* since just one group was added */ } -#line 1080 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1078 "inform7/Chapter 16/Meaning List Conversions.w" ; break; } @@ -57632,7 +58036,7 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) if (len >= MAX_INVOCATIONS_PER_PHRASE) { -#line 1210 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1208 "inform7/Chapter 16/Meaning List Conversions.w" Invocations__log_list(Specifications__invocation_list(spec)); Specifications__Unknown__coerce(spec); spec->word_ref1 = current_sentence->word_ref1; spec->word_ref2 = current_sentence->word_ref2; @@ -57651,26 +58055,26 @@ specification *Parser__SP__Conversion__general_phrase_to_spec(meaning_list *ml) return spec; } -#line 1085 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1083 "inform7/Chapter 16/Meaning List Conversions.w" ; if (len > 0) { { -#line 1197 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1195 "inform7/Chapter 16/Meaning List Conversions.w" INVOCATION_VARIABLE(inv); LOOP_THROUGH_INVOCATION_LIST(inv, Specifications__invocation_list(spec)) if (Invocations__get_group(inv) == group_count-1) Invocations__set_instead_flag(inv, instead_flag); } -#line 1087 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1085 "inform7/Chapter 16/Meaning List Conversions.w" ; Invocations__sort_list(Specifications__invocation_list(spec)); } return spec; } -#line 1232 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1230 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjlist, meaning_list *noun) { specification *spec = NULL; if (noun) { @@ -57680,7 +58084,7 @@ specification *Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjl case NAMETAG_MC: { -#line 1259 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1257 "inform7/Chapter 16/Meaning List Conversions.w" nametag *nt = Nametags__disambiguate(noun, MAX_NAMETAG_PRIORITY); if (nt == NULL) { LOG("At: $m\n", noun); @@ -57700,18 +58104,18 @@ specification *Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjl } } -#line 1239 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1237 "inform7/Chapter 16/Meaning List Conversions.w" ; break; case TYPE_ML: { -#line 1281 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1279 "inform7/Chapter 16/Meaning List Conversions.w" kind *K = Specifications__get_kind(Parser__SP__MeaningLists__get_attached_spec(noun)); spec = Specifications__Conditions__new_DESCRIPTION_of(K, composited); } -#line 1242 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1240 "inform7/Chapter 16/Meaning List Conversions.w" ; break; default: internal_error("Unknown noun production type"); @@ -57719,7 +58123,7 @@ specification *Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjl } else spec = Specifications__Conditions__new_DESCRIPTION(NULL); if (adjlist) { -#line 1287 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1285 "inform7/Chapter 16/Meaning List Conversions.w" meaning_list *ml = adjlist; int mw1, mw2; Parser__SP__MeaningLists__get_text(ml, &mw1, &mw2); if (Parser__SP__MeaningLists__production(ml) != AL_ML) internal_error("Non-AL production"); @@ -57732,12 +58136,12 @@ specification *Parser__SP__Conversion__qualified_noun_to_spec(meaning_list *adjl } } -#line 1247 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1245 "inform7/Chapter 16/Meaning List Conversions.w" ; return spec; } -#line 1302 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1300 "inform7/Chapter 16/Meaning List Conversions.w" adjective_usage *Parser__SP__Conversion__adj_to_adjective_usage(meaning_list *ml) { adjective_usage *ale = NULL; int negate = FALSE; @@ -57758,7 +58162,7 @@ adjective_usage *Parser__SP__Conversion__adj_to_adjective_usage(meaning_list *ml return ale; } -#line 1325 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1323 "inform7/Chapter 16/Meaning List Conversions.w" specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml) { specification *spec; meaning_list *subject_noun_phrase = NULL, *verb_phrase = NULL; @@ -57770,7 +58174,7 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml { -#line 1361 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1359 "inform7/Chapter 16/Meaning List Conversions.w" if (Parser__SP__MeaningLists__right(Parser__SP__MeaningLists__down(ml)) == NULL) { switch(Parser__SP__MeaningLists__production(Parser__SP__MeaningLists__down(ml))) { case DC_ML: { @@ -57793,11 +58197,11 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml } } -#line 1334 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1332 "inform7/Chapter 16/Meaning List Conversions.w" ; { -#line 1386 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1384 "inform7/Chapter 16/Meaning List Conversions.w" subject_noun_phrase = Parser__SP__MeaningLists__down(ml); verb_phrase = Parser__SP__MeaningLists__right(Parser__SP__MeaningLists__down(ml)); @@ -57822,7 +58226,7 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml } } -#line 1335 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1333 "inform7/Chapter 16/Meaning List Conversions.w" ; switch(Parser__SP__MeaningLists__production(ml)) { @@ -57831,7 +58235,7 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml Calculus__Propositions__FromSentences__S_subtree(ml, NULL)); { -#line 1433 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1431 "inform7/Chapter 16/Meaning List Conversions.w" specification *subtree_spec; if (Parser__SP__MeaningLists__production(ml) == DC_ML) subtree_spec = Parser__SP__Conversion__DC_subtree_to_spec(Parser__SP__MeaningLists__down(ml), FALSE); @@ -57845,7 +58249,7 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml Specifications__Unknown__coerce(spec); } -#line 1341 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1339 "inform7/Chapter 16/Meaning List Conversions.w" ; break; case SV_ML: @@ -57858,7 +58262,7 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml if (Verbs__get_tense_used(vu) != IS_TENSE) { -#line 1413 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1411 "inform7/Chapter 16/Meaning List Conversions.w" if (Parser__SP__MeaningLists__production(ml) == SN_ML) { Problems__Issue__sentence_problem(_P_(PM_DescSubordinatePast), "subordinate clauses have to be in the present tense", @@ -57875,17 +58279,17 @@ specification *Parser__SP__Conversion__general_sentence_to_spec(meaning_list *ml } else Specifications__Conditions__attach_tense(spec, Verbs__get_tense_used(vu)); } -#line 1351 "inform7/Chapter 16/Meaning List Conversions.w" +#line 1349 "inform7/Chapter 16/Meaning List Conversions.w" ; LOGIF(CONDITIONS, "Parser__SP__Conversion__general_sentence_to_spec result:\n$S", spec); return spec; } -#line 92 "inform7/Chapter 17/Terms.w" +#line 73 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__new_variable(int v) { pcalc_term pt; { -#line 116 "inform7/Chapter 17/Terms.w" +#line 97 "inform7/Chapter 17/Terms.w" pt.variable = -1; pt.constant = NULL; pt.function = NULL; @@ -57893,7 +58297,7 @@ pcalc_term Calculus__Terms__new_variable(int v) { pt.term_checked_as_kind = NULL; } -#line 93 "inform7/Chapter 17/Terms.w" +#line 74 "inform7/Chapter 17/Terms.w" ; if ((v < 0) || (v >= 26)) internal_error("bad variable term created"); pt.variable = v; @@ -57903,7 +58307,7 @@ pcalc_term Calculus__Terms__new_variable(int v) { pcalc_term Calculus__Terms__new_constant(specification *c) { pcalc_term pt; { -#line 116 "inform7/Chapter 17/Terms.w" +#line 97 "inform7/Chapter 17/Terms.w" pt.variable = -1; pt.constant = NULL; pt.function = NULL; @@ -57911,7 +58315,7 @@ pcalc_term Calculus__Terms__new_constant(specification *c) { pt.term_checked_as_kind = NULL; } -#line 100 "inform7/Chapter 17/Terms.w" +#line 81 "inform7/Chapter 17/Terms.w" ; pt.constant = c; return pt; @@ -57920,7 +58324,7 @@ pcalc_term Calculus__Terms__new_constant(specification *c) { pcalc_term Calculus__Terms__new_function(binary_predicate *bp, pcalc_term ptof, int t) { pcalc_term pt; { -#line 116 "inform7/Chapter 17/Terms.w" +#line 97 "inform7/Chapter 17/Terms.w" pt.variable = -1; pt.constant = NULL; pt.function = NULL; @@ -57928,7 +58332,7 @@ pcalc_term Calculus__Terms__new_function(binary_predicate *bp, pcalc_term ptof, pt.term_checked_as_kind = NULL; } -#line 106 "inform7/Chapter 17/Terms.w" +#line 87 "inform7/Chapter 17/Terms.w" ; pcalc_func *pf = CREATE(pcalc_func); pf->bp = bp; pf->fn_of = ptof; pf->from_term = t; @@ -57936,10 +58340,10 @@ pcalc_term Calculus__Terms__new_function(binary_predicate *bp, pcalc_term ptof, return pt; } -#line 142 "inform7/Chapter 17/Terms.w" +#line 123 "inform7/Chapter 17/Terms.w" char *pcalc_vars = "xyzabcdefghijklmnopqrstuvw"; -#line 149 "inform7/Chapter 17/Terms.w" +#line 130 "inform7/Chapter 17/Terms.w" specification *Calculus__Terms__constant_underlying(pcalc_term *t) { if (t == NULL) internal_error("null term"); if (t->constant) return t->constant; @@ -57954,7 +58358,7 @@ int Calculus__Terms__variable_underlying(pcalc_term *t) { return -1; } -#line 175 "inform7/Chapter 17/Terms.w" +#line 156 "inform7/Chapter 17/Terms.w" pcalc_term Calculus__Terms__adj_to_noun_conversion(adjective_usage *tr) { adjectival_phrase *aph = Adjectives__Usages__get_aph(tr); instance *I = Adjectives__Phrases__has_ENUMERATIVE_meaning(aph); @@ -57964,7 +58368,7 @@ pcalc_term Calculus__Terms__adj_to_noun_conversion(adjective_usage *tr) { return Calculus__Terms__new_variable(0); } -#line 187 "inform7/Chapter 17/Terms.w" +#line 168 "inform7/Chapter 17/Terms.w" adjective_usage *Calculus__Terms__noun_to_adj_conversion(pcalc_term pt) { kind *K; adjectival_phrase *aph; @@ -57980,7 +58384,7 @@ adjective_usage *Calculus__Terms__noun_to_adj_conversion(pcalc_term pt) { return NULL; } -#line 220 "inform7/Chapter 17/Terms.w" +#line 201 "inform7/Chapter 17/Terms.w" void Calculus__Terms__compile(OUTPUT_STREAM, pcalc_term pt) { if (logging_to_I6_text) { Calculus__Terms__log(&pt); return; } if (pt.variable >= 0) { @@ -58009,7 +58413,7 @@ void Calculus__Terms__compile(OUTPUT_STREAM, pcalc_term pt) { internal_error("Broken pcalc term"); } -#line 254 "inform7/Chapter 17/Terms.w" +#line 235 "inform7/Chapter 17/Terms.w" void Calculus__Terms__log(pcalc_term *pt) { if (pt == NULL) { LOG(""); @@ -58041,7 +58445,7 @@ void Calculus__Terms__log(pcalc_term *pt) { } } -#line 84 "inform7/Chapter 17/Atomic Propositions.w" +#line 74 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__element_get_group(int element) { if (element <= 0) return 0; if (element < STRUCTURAL_GROUP) return STRUCTURAL_GROUP; @@ -58051,7 +58455,7 @@ int Calculus__Atoms__element_get_group(int element) { return 0; } -#line 98 "inform7/Chapter 17/Atomic Propositions.w" +#line 88 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__element_get_match(int element) { switch (element) { case NEGATION_OPEN_ATOM: return NEGATION_CLOSE_ATOM; @@ -58062,7 +58466,7 @@ int Calculus__Atoms__element_get_match(int element) { } } -#line 112 "inform7/Chapter 17/Atomic Propositions.w" +#line 102 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__new(int element) { pcalc_prop *prop = CREATE(pcalc_prop); prop->next = NULL; @@ -58075,7 +58479,7 @@ pcalc_prop *Calculus__Atoms__new(int element) { return prop; } -#line 144 "inform7/Chapter 17/Atomic Propositions.w" +#line 134 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__QUANTIFIER_new(quantifier *quant, int v, int parameter) { pcalc_prop *prop = Calculus__Atoms__new(QUANTIFIER_ATOM); prop->arity = 1; @@ -58085,7 +58489,7 @@ pcalc_prop *Calculus__Atoms__QUANTIFIER_new(quantifier *quant, int v, int parame return prop; } -#line 156 "inform7/Chapter 17/Atomic Propositions.w" +#line 146 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_quantifier(pcalc_prop *prop) { if ((prop) && (prop->element == QUANTIFIER_ATOM)) return TRUE; return FALSE; @@ -58136,13 +58540,13 @@ int Calculus__Atoms__is_for_all_x(pcalc_prop *prop) { return FALSE; } -#line 209 "inform7/Chapter 17/Atomic Propositions.w" +#line 199 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_now_assertable_quantifier(pcalc_prop *prop) { if (prop->element != QUANTIFIER_ATOM) return FALSE; return Quantifiers__is_now_assertable(RETRIEVE_POINTER_quantifier(prop->predicate)); } -#line 218 "inform7/Chapter 17/Atomic Propositions.w" +#line 208 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__EVERYWHERE_new(pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(EVERYWHERE_ATOM); prop->arity = 1; @@ -58150,7 +58554,7 @@ pcalc_prop *Calculus__Atoms__EVERYWHERE_new(pcalc_term pt) { return prop; } -#line 228 "inform7/Chapter 17/Atomic Propositions.w" +#line 218 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__NOWHERE_new(pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(NOWHERE_ATOM); prop->arity = 1; @@ -58158,7 +58562,7 @@ pcalc_prop *Calculus__Atoms__NOWHERE_new(pcalc_term pt) { return prop; } -#line 238 "inform7/Chapter 17/Atomic Propositions.w" +#line 228 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__HERE_new(pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(HERE_ATOM); prop->arity = 1; @@ -58166,7 +58570,7 @@ pcalc_prop *Calculus__Atoms__HERE_new(pcalc_term pt) { return prop; } -#line 248 "inform7/Chapter 17/Atomic Propositions.w" +#line 238 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__ISAKIND_new(pcalc_term pt, kind *K) { pcalc_prop *prop = Calculus__Atoms__new(ISAKIND_ATOM); prop->arity = 1; @@ -58175,7 +58579,7 @@ pcalc_prop *Calculus__Atoms__ISAKIND_new(pcalc_term pt, kind *K) { return prop; } -#line 259 "inform7/Chapter 17/Atomic Propositions.w" +#line 249 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__ISAVAR_new(pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(ISAVAR_ATOM); prop->arity = 1; @@ -58183,7 +58587,7 @@ pcalc_prop *Calculus__Atoms__ISAVAR_new(pcalc_term pt) { return prop; } -#line 269 "inform7/Chapter 17/Atomic Propositions.w" +#line 259 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__ISACONST_new(pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(ISACONST_ATOM); prop->arity = 1; @@ -58191,7 +58595,7 @@ pcalc_prop *Calculus__Atoms__ISACONST_new(pcalc_term pt) { return prop; } -#line 291 "inform7/Chapter 17/Atomic Propositions.w" +#line 281 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__CALLED_new(int w1, int w2, pcalc_term pt, kind *K) { pcalc_prop *prop = Calculus__Atoms__new(CALLED_ATOM); prop->arity = 1; @@ -58206,7 +58610,7 @@ void Calculus__Atoms__CALLED_get_name(pcalc_prop *prop, int *w1, int *w2) { *w2 = (prop->calling_data >> 20) + *w1; } -#line 330 "inform7/Chapter 17/Atomic Propositions.w" +#line 320 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__KIND_new(kind *K, pcalc_term pt) { pcalc_prop *prop = Calculus__Atoms__new(KIND_ATOM); prop->arity = 1; @@ -58238,7 +58642,7 @@ void Calculus__Atoms__set_composited(pcalc_prop *prop, int state) { if (prop) prop->composited = state; } -#line 364 "inform7/Chapter 17/Atomic Propositions.w" +#line 354 "inform7/Chapter 17/Atomic Propositions.w" int Calculus__Atoms__is_unarticled(pcalc_prop *prop) { if ((prop) && (prop->unarticled)) return TRUE; return FALSE; @@ -58248,7 +58652,7 @@ void Calculus__Atoms__set_unarticled(pcalc_prop *prop, int state) { if (prop) prop->unarticled = state; } -#line 378 "inform7/Chapter 17/Atomic Propositions.w" +#line 368 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__unary_PREDICATE_from_aph(adjectival_phrase *aph, int negated) { pcalc_prop *prop = Calculus__Atoms__new(PREDICATE_ATOM); prop->arity = 1; @@ -58262,7 +58666,7 @@ adjective_usage *Calculus__Atoms__au_from_unary_PREDICATE(pcalc_prop *prop) { return RETRIEVE_POINTER_adjective_usage(prop->predicate); } -#line 394 "inform7/Chapter 17/Atomic Propositions.w" +#line 384 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__binary_PREDICATE_new(binary_predicate *bp, pcalc_term pt1, pcalc_term pt2) { pcalc_prop *prop = Calculus__Atoms__new(PREDICATE_ATOM); @@ -58285,20 +58689,20 @@ int Calculus__Atoms__is_equality_predicate(pcalc_prop *prop) { return FALSE; } -#line 419 "inform7/Chapter 17/Atomic Propositions.w" +#line 409 "inform7/Chapter 17/Atomic Propositions.w" pcalc_prop *Calculus__Atoms__prop_x_is_constant(specification *spec) { return Calculus__Atoms__binary_PREDICATE_new(R_equality, Calculus__Terms__new_variable(0), Calculus__Terms__new_constant(spec)); } -#line 427 "inform7/Chapter 17/Atomic Propositions.w" +#line 417 "inform7/Chapter 17/Atomic Propositions.w" pcalc_term *Calculus__Atoms__is_x_equals(pcalc_prop *prop) { if (Calculus__Atoms__is_equality_predicate(prop) == FALSE) return NULL; if (prop->terms[0].variable != 0) return NULL; return &(prop->terms[1]); } -#line 436 "inform7/Chapter 17/Atomic Propositions.w" +#line 426 "inform7/Chapter 17/Atomic Propositions.w" char *Calculus__Atoms__validate(pcalc_prop *prop) { int group; if (prop == NULL) return NULL; @@ -58320,7 +58724,7 @@ char *Calculus__Atoms__validate(pcalc_prop *prop) { return NULL; } -#line 461 "inform7/Chapter 17/Atomic Propositions.w" +#line 451 "inform7/Chapter 17/Atomic Propositions.w" void Calculus__Atoms__log(pcalc_prop *prop) { if (prop == NULL) { LOG(""); return; } switch(prop->element) { @@ -58328,22 +58732,22 @@ void Calculus__Atoms__log(pcalc_prop *prop) { switch(prop->arity) { case 1: { -#line 510 "inform7/Chapter 17/Atomic Propositions.w" +#line 500 "inform7/Chapter 17/Atomic Propositions.w" adjective_usage *tr = RETRIEVE_POINTER_adjective_usage(prop->predicate); if (Adjectives__Usages__get_parity(tr) == FALSE) LOG("not-"); Adjectives__Phrases__log(Adjectives__Usages__get_aph(tr)); } -#line 466 "inform7/Chapter 17/Atomic Propositions.w" +#line 456 "inform7/Chapter 17/Atomic Propositions.w" ; break; case 2: { -#line 517 "inform7/Chapter 17/Atomic Propositions.w" +#line 507 "inform7/Chapter 17/Atomic Propositions.w" binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(prop->predicate); if (bp == NULL) LOG("?bad-bp?"); else LOG(BinaryPredicates__get_log_name(bp)); } -#line 467 "inform7/Chapter 17/Atomic Propositions.w" +#line 457 "inform7/Chapter 17/Atomic Propositions.w" ; break; default: LOG("?exotic-predicate-arity=%d?", prop->arity); break; } @@ -58353,7 +58757,7 @@ void Calculus__Atoms__log(pcalc_prop *prop) { Quantifiers__log(quant, prop->calling_data); LOG(" "); { -#line 525 "inform7/Chapter 17/Atomic Propositions.w" +#line 515 "inform7/Chapter 17/Atomic Propositions.w" int t; for (t=0; tarity; t++) { if (t>0) LOG(", "); @@ -58361,7 +58765,7 @@ void Calculus__Atoms__log(pcalc_prop *prop) { } } -#line 474 "inform7/Chapter 17/Atomic Propositions.w" +#line 464 "inform7/Chapter 17/Atomic Propositions.w" ; return; } @@ -58393,7 +58797,7 @@ void Calculus__Atoms__log(pcalc_prop *prop) { if (prop->arity > 0) { LOG("("); { -#line 525 "inform7/Chapter 17/Atomic Propositions.w" +#line 515 "inform7/Chapter 17/Atomic Propositions.w" int t; for (t=0; tarity; t++) { if (t>0) LOG(", "); @@ -58401,7 +58805,7 @@ void Calculus__Atoms__log(pcalc_prop *prop) { } } -#line 503 "inform7/Chapter 17/Atomic Propositions.w" +#line 493 "inform7/Chapter 17/Atomic Propositions.w" ; LOG(")"); } } @@ -60189,7 +60593,7 @@ pcalc_prop *Calculus__Simplifications__region_containment(pcalc_prop *prop, int return prop; } -#line 763 "inform7/Chapter 17/Simplifications.w" +#line 762 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__reduce_predicates(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); @@ -60211,7 +60615,7 @@ pcalc_prop *Calculus__Simplifications__reduce_predicates(pcalc_prop *prop, int * return prop; } -#line 795 "inform7/Chapter 17/Simplifications.w" +#line 794 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); int level, binding_status[26], binding_level[26], binding_sequence[26]; @@ -60222,7 +60626,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop EliminateVariables: { -#line 846 "inform7/Chapter 17/Simplifications.w" +#line 845 "inform7/Chapter 17/Simplifications.w" int j, c = 0, level = 0; for (j=0; j<26; j++) { @@ -60245,7 +60649,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop } } -#line 803 "inform7/Chapter 17/Simplifications.w" +#line 802 "inform7/Chapter 17/Simplifications.w" ; level = 0; TRAVERSE_PROPOSITION(pl, prop) { @@ -60259,7 +60663,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop int var_is_redundant = FALSE, value_can_be_subbed = FALSE; { -#line 893 "inform7/Chapter 17/Simplifications.w" +#line 892 "inform7/Chapter 17/Simplifications.w" if ((var_to_sub >= 0) && (binding_status[var_to_sub] == BOUND_BY_EXISTS) && (binding_level[var_to_sub] == level)) @@ -60271,7 +60675,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop value_can_be_subbed = TRUE; } -#line 814 "inform7/Chapter 17/Simplifications.w" +#line 813 "inform7/Chapter 17/Simplifications.w" ; if ((var_is_redundant) && (value_can_be_subbed)) { int permitted; @@ -60301,7 +60705,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_redundant_variables(pcalc_prop return prop; } -#line 927 "inform7/Chapter 17/Simplifications.w" +#line 926 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__not_related_to_something(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); @@ -60335,7 +60739,7 @@ pcalc_prop *Calculus__Simplifications__not_related_to_something(pcalc_prop *prop return prop; } -#line 974 "inform7/Chapter 17/Simplifications.w" +#line 973 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__convert_gerunds(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); @@ -60353,7 +60757,7 @@ pcalc_prop *Calculus__Simplifications__convert_gerunds(pcalc_prop *prop, int *ch return prop; } -#line 1016 "inform7/Chapter 17/Simplifications.w" +#line 1015 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__eliminate_to_have(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); @@ -60370,7 +60774,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_to_have(pcalc_prop *prop, int * if (Specifications__Values__is_actual_CONSTANT_construction(spec, CON_property)) { -#line 1043 "inform7/Chapter 17/Simplifications.w" +#line 1042 "inform7/Chapter 17/Simplifications.w" property *prn = Properties__from_specification(spec); specification *po_spec = Specifications__Storage__new_PROPERTY_VALUE(spec, pl->terms[1-i].constant); @@ -60383,7 +60787,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_to_have(pcalc_prop *prop, int * } } -#line 1030 "inform7/Chapter 17/Simplifications.w" +#line 1029 "inform7/Chapter 17/Simplifications.w" ; } } @@ -60392,7 +60796,7 @@ pcalc_prop *Calculus__Simplifications__eliminate_to_have(pcalc_prop *prop, int * return prop; } -#line 1061 "inform7/Chapter 17/Simplifications.w" +#line 1060 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__prop_substitute_prop_cons(pcalc_prop *prop, property *prn, specification *po_spec, int *count, pcalc_prop *not_this) { TRAVERSE_VARIABLE(pl); @@ -60416,7 +60820,7 @@ pcalc_prop *Calculus__Simplifications__prop_substitute_prop_cons(pcalc_prop *pro return prop; } -#line 1108 "inform7/Chapter 17/Simplifications.w" +#line 1107 "inform7/Chapter 17/Simplifications.w" pcalc_prop *Calculus__Simplifications__is_all_rooms(pcalc_prop *prop, int *changed) { TRAVERSE_VARIABLE(pl); @@ -60534,7 +60938,7 @@ pcalc_prop *Calculus__Simplifications__everywhere_and_nowhere(pcalc_prop *prop, return prop; } -#line 53 "inform7/Chapter 17/Type Check Propositions.w" +#line 49 "inform7/Chapter 17/Type Check Propositions.w" tc_problem_kit Calculus__Propositions__Checker__tc_no_problem_reporting(void) { tc_problem_kit tck; tck.issue_error = FALSE; tck.ew1 = -1; tck.ew2 = -1; tck.intention = "be silent checking"; @@ -60547,13 +60951,13 @@ tc_problem_kit Calculus__Propositions__Checker__tc_problem_reporting(int w1, int return tck; } -#line 69 "inform7/Chapter 17/Type Check Propositions.w" +#line 65 "inform7/Chapter 17/Type Check Propositions.w" tc_problem_kit Calculus__Propositions__Checker__tc_problem_logging(void) { tc_problem_kit tck = Calculus__Propositions__Checker__tc_no_problem_reporting(); tck.intention = "be internal testing"; tck.log_to_I6_text = TRUE; return tck; } -#line 84 "inform7/Chapter 17/Type Check Propositions.w" +#line 80 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit tck_s) { TRAVERSE_VARIABLE(pl); variable_type_assignment vta; @@ -60566,7 +60970,7 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit { -#line 143 "inform7/Chapter 17/Type Check Propositions.w" +#line 139 "inform7/Chapter 17/Type Check Propositions.w" TRAVERSE_PROPOSITION(pl, prop) { int j; for (j=0; jarity; j++) { @@ -60577,7 +60981,7 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit (Specifications__Checking__check_without_expectations(spec) == NEVER_MATCH))) { -#line 237 "inform7/Chapter 17/Type Check Propositions.w" +#line 233 "inform7/Chapter 17/Type Check Propositions.w" if (problem_count == 0) { if (tck->log_to_I6_text) LOG("Atom $o contains failed constant\n", pl); if (tck->issue_error == FALSE) return NEVER_MATCH; @@ -60593,20 +60997,20 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit return NEVER_MATCH; } -#line 151 "inform7/Chapter 17/Type Check Propositions.w" +#line 147 "inform7/Chapter 17/Type Check Propositions.w" ; } } } } -#line 94 "inform7/Chapter 17/Type Check Propositions.w" +#line 90 "inform7/Chapter 17/Type Check Propositions.w" ; for (j=0; j<26; j++) vta.assigned_kinds[j] = NULL; { -#line 169 "inform7/Chapter 17/Type Check Propositions.w" +#line 165 "inform7/Chapter 17/Type Check Propositions.w" TRAVERSE_PROPOSITION(pl, prop) if (pl->element == KIND_ATOM) { int v = pl->terms[0].variable; @@ -60628,11 +61032,11 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 97 "inform7/Chapter 17/Type Check Propositions.w" +#line 93 "inform7/Chapter 17/Type Check Propositions.w" ; { -#line 194 "inform7/Chapter 17/Type Check Propositions.w" +#line 190 "inform7/Chapter 17/Type Check Propositions.w" TRAVERSE_PROPOSITION(pl, prop) if ((pl->element == KIND_ATOM) && (pl->unarticled)) { if (tck->log_to_I6_text) @@ -60652,18 +61056,18 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 98 "inform7/Chapter 17/Type Check Propositions.w" +#line 94 "inform7/Chapter 17/Type Check Propositions.w" ; { -#line 228 "inform7/Chapter 17/Type Check Propositions.w" +#line 224 "inform7/Chapter 17/Type Check Propositions.w" int j; for (j=0; j<26; j++) if (vta.assigned_kinds[j] == NULL) vta.assigned_kinds[j] = K_object; } -#line 99 "inform7/Chapter 17/Type Check Propositions.w" +#line 95 "inform7/Chapter 17/Type Check Propositions.w" ; TRAVERSE_PROPOSITION(pl, prop) { @@ -60672,7 +61076,7 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit if (pl->element == KIND_ATOM) { -#line 265 "inform7/Chapter 17/Type Check Propositions.w" +#line 261 "inform7/Chapter 17/Type Check Propositions.w" kind *need_to_find = pl->assert_kind; if (Kinds__Compare__le(need_to_find, K_object)) need_to_find = K_object; kind *actually_find = Calculus__Propositions__Checker__kind_of_term(&(pl->terms[0]), &vta, tck); @@ -60684,12 +61088,12 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 105 "inform7/Chapter 17/Type Check Propositions.w" +#line 101 "inform7/Chapter 17/Type Check Propositions.w" ; if ((pl->element == PREDICATE_ATOM) && (pl->arity == 2)) { -#line 294 "inform7/Chapter 17/Type Check Propositions.w" +#line 290 "inform7/Chapter 17/Type Check Propositions.w" binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(pl->predicate); if (BinaryPredicates__is_the_wrong_way_round(bp)) internal_error("BP wrong way round"); if (Calculus__Propositions__Checker__type_check_binary_predicate(pl, &vta, tck) == NEVER_MATCH) { @@ -60702,54 +61106,54 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit if (Calculus__Propositions__Checker__type_check_unary_predicate(&test_unary, &vta, tck) == NEVER_MATCH) { -#line 314 "inform7/Chapter 17/Type Check Propositions.w" +#line 310 "inform7/Chapter 17/Type Check Propositions.w" + if (tck->log_to_I6_text) LOG("BP $o cannot be applied\n", pl); + return NEVER_MATCH; + +} +#line 300 "inform7/Chapter 17/Type Check Propositions.w" +; + pl->arity = 1; + pl->predicate = STORE_POINTER_adjective_usage(alt); + } else +{ +#line 310 "inform7/Chapter 17/Type Check Propositions.w" + if (tck->log_to_I6_text) LOG("BP $o cannot be applied\n", pl); + return NEVER_MATCH; + +} +#line 303 "inform7/Chapter 17/Type Check Propositions.w" +; + } else +{ +#line 310 "inform7/Chapter 17/Type Check Propositions.w" if (tck->log_to_I6_text) LOG("BP $o cannot be applied\n", pl); return NEVER_MATCH; } #line 304 "inform7/Chapter 17/Type Check Propositions.w" -; - pl->arity = 1; - pl->predicate = STORE_POINTER_adjective_usage(alt); - } else -{ -#line 314 "inform7/Chapter 17/Type Check Propositions.w" - if (tck->log_to_I6_text) LOG("BP $o cannot be applied\n", pl); - return NEVER_MATCH; - -} -#line 307 "inform7/Chapter 17/Type Check Propositions.w" -; - } else -{ -#line 314 "inform7/Chapter 17/Type Check Propositions.w" - if (tck->log_to_I6_text) LOG("BP $o cannot be applied\n", pl); - return NEVER_MATCH; - -} -#line 308 "inform7/Chapter 17/Type Check Propositions.w" ; } } -#line 107 "inform7/Chapter 17/Type Check Propositions.w" +#line 103 "inform7/Chapter 17/Type Check Propositions.w" ; if ((pl->element == PREDICATE_ATOM) && (pl->arity == 1)) { -#line 278 "inform7/Chapter 17/Type Check Propositions.w" +#line 274 "inform7/Chapter 17/Type Check Propositions.w" if (Calculus__Propositions__Checker__type_check_unary_predicate(pl, &vta, tck) == NEVER_MATCH) { if (tck->log_to_I6_text) LOG("Adjective $o cannot be applied\n", pl); return NEVER_MATCH; } } -#line 109 "inform7/Chapter 17/Type Check Propositions.w" +#line 105 "inform7/Chapter 17/Type Check Propositions.w" ; if (pl->element == EVERYWHERE_ATOM) { -#line 327 "inform7/Chapter 17/Type Check Propositions.w" +#line 323 "inform7/Chapter 17/Type Check Propositions.w" kind *actually_find = Calculus__Propositions__Checker__kind_of_term(&(pl->terms[0]), &vta, tck); if (Kinds__Compare__compatible(actually_find, K_object) == NEVER_MATCH) { if (tck->log_to_I6_text) @@ -60765,12 +61169,12 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 111 "inform7/Chapter 17/Type Check Propositions.w" +#line 107 "inform7/Chapter 17/Type Check Propositions.w" ; if (pl->element == NOWHERE_ATOM) { -#line 344 "inform7/Chapter 17/Type Check Propositions.w" +#line 340 "inform7/Chapter 17/Type Check Propositions.w" kind *actually_find = Calculus__Propositions__Checker__kind_of_term(&(pl->terms[0]), &vta, tck); if (Kinds__Compare__compatible(actually_find, K_object) == NEVER_MATCH) { if (tck->log_to_I6_text) @@ -60785,23 +61189,23 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 113 "inform7/Chapter 17/Type Check Propositions.w" +#line 109 "inform7/Chapter 17/Type Check Propositions.w" ; if (pl->element == ISAKIND_ATOM) { -#line 320 "inform7/Chapter 17/Type Check Propositions.w" +#line 316 "inform7/Chapter 17/Type Check Propositions.w" kind *actually_find = Calculus__Propositions__Checker__kind_of_term(&(pl->terms[0]), &vta, tck); if (Kinds__Compare__compatible(actually_find, K_object) == NEVER_MATCH) internal_error("ISAKIND atom misapplied"); } -#line 115 "inform7/Chapter 17/Type Check Propositions.w" +#line 111 "inform7/Chapter 17/Type Check Propositions.w" ; if (pl->element == HERE_ATOM) { -#line 361 "inform7/Chapter 17/Type Check Propositions.w" +#line 357 "inform7/Chapter 17/Type Check Propositions.w" kind *actually_find = Calculus__Propositions__Checker__kind_of_term(&(pl->terms[0]), &vta, tck); if (Kinds__Compare__compatible(actually_find, K_object) == NEVER_MATCH) { if (tck->log_to_I6_text) @@ -60815,13 +61219,13 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit } } -#line 117 "inform7/Chapter 17/Type Check Propositions.w" +#line 113 "inform7/Chapter 17/Type Check Propositions.w" ; } if (tck->log_to_I6_text) { -#line 378 "inform7/Chapter 17/Type Check Propositions.w" +#line 374 "inform7/Chapter 17/Type Check Propositions.w" int j, var_states[26], c=0; Calculus__Variables__determine_status(prop, var_states, NULL); for (j=0; j<26; j++) @@ -60833,12 +61237,12 @@ int Calculus__Propositions__Checker__type_check(pcalc_prop *prop, tc_problem_kit if (c>0) LOG("\n"); } -#line 120 "inform7/Chapter 17/Type Check Propositions.w" +#line 116 "inform7/Chapter 17/Type Check Propositions.w" ; return ALWAYS_MATCH; } -#line 395 "inform7/Chapter 17/Type Check Propositions.w" +#line 391 "inform7/Chapter 17/Type Check Propositions.w" kind *Calculus__Propositions__Checker__kind_of_term(pcalc_term *pt, variable_type_assignment *vta, tc_problem_kit *tck) { kind *K = Calculus__Propositions__Checker__kind_of_term_inner(pt, vta, tck); @@ -60847,7 +61251,7 @@ kind *Calculus__Propositions__Checker__kind_of_term(pcalc_term *pt, variable_typ return K; } -#line 410 "inform7/Chapter 17/Type Check Propositions.w" +#line 406 "inform7/Chapter 17/Type Check Propositions.w" kind *Calculus__Propositions__Checker__kind_of_term_inner(pcalc_term *pt, variable_type_assignment *vta, tc_problem_kit *tck) { if (pt->constant) return Specifications__evaluates_to(pt->constant); @@ -60869,14 +61273,14 @@ kind *Calculus__Propositions__Checker__kind_of_term_inner(pcalc_term *pt, variab return NULL; } -#line 441 "inform7/Chapter 17/Type Check Propositions.w" +#line 437 "inform7/Chapter 17/Type Check Propositions.w" kind *Calculus__Propositions__Checker__approximate_argument_kind(binary_predicate *bp, int i) { kind *K = BinaryPredicates__term_kind(bp, i); if (K == NULL) return K_object; return Kinds__weaken(K); } -#line 453 "inform7/Chapter 17/Type Check Propositions.w" +#line 449 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check_unary_predicate(pcalc_prop *pl, variable_type_assignment *vta, tc_problem_kit *tck) { adjective_usage *tr = RETRIEVE_POINTER_adjective_usage(pl->predicate); @@ -60901,7 +61305,7 @@ int Calculus__Propositions__Checker__type_check_unary_predicate(pcalc_prop *pl, return ALWAYS_MATCH; } -#line 483 "inform7/Chapter 17/Type Check Propositions.w" +#line 479 "inform7/Chapter 17/Type Check Propositions.w" int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, variable_type_assignment *vta, tc_problem_kit *tck) { binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(pl->predicate); @@ -60909,7 +61313,7 @@ int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, { -#line 534 "inform7/Chapter 17/Type Check Propositions.w" +#line 530 "inform7/Chapter 17/Type Check Propositions.w" int i; for (i=0; i<2; i++) { kind *K = Kinds__weaken(BinaryPredicates__term_kind(bp, i)); @@ -60919,7 +61323,7 @@ int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, } } -#line 488 "inform7/Chapter 17/Type Check Propositions.w" +#line 484 "inform7/Chapter 17/Type Check Propositions.w" ; int result = BinaryPredicates__typecheck(bp, kinds_of_terms, kinds_required, tck); @@ -60958,7 +61362,7 @@ int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, { -#line 546 "inform7/Chapter 17/Type Check Propositions.w" +#line 542 "inform7/Chapter 17/Type Check Propositions.w" int i; for (i=0; i<2; i++) if (kinds_required[i]) @@ -60972,13 +61376,13 @@ int Calculus__Propositions__Checker__type_check_binary_predicate(pcalc_prop *pl, } } -#line 524 "inform7/Chapter 17/Type Check Propositions.w" +#line 520 "inform7/Chapter 17/Type Check Propositions.w" ; return ALWAYS_MATCH; } -#line 561 "inform7/Chapter 17/Type Check Propositions.w" +#line 557 "inform7/Chapter 17/Type Check Propositions.w" void Calculus__Propositions__Checker__issue_bp_typecheck_error(binary_predicate *bp, kind *t0, kind *t1, tc_problem_kit *tck) { Problems__quote_kind(4, t0); @@ -62314,7 +62718,7 @@ void Calculus__Schemas__log_applied(i6_schema *sch, pcalc_term *pt1) { Calculus__Schemas__expand(sch, dl, pt1, NULL); } -#line 61 "inform7/Chapter 18/Compile Atoms.w" +#line 56 "inform7/Chapter 18/Compile Atoms.w" void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, int with_semicolon) { i6_schema sch; annotated_i6_schema asch; @@ -62328,13 +62732,13 @@ void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, { -#line 79 "inform7/Chapter 18/Compile Atoms.w" +#line 74 "inform7/Chapter 18/Compile Atoms.w" asch = Calculus__Atoms__Compile__i6_schema_of_atom(&sch, pl, task); if (asch.schema == NULL) { if (problem_count == 0) { -#line 90 "inform7/Chapter 18/Compile Atoms.w" +#line 85 "inform7/Chapter 18/Compile Atoms.w" LOG("Failed on task: $o\n", pl); if (task == TEST_ATOM_TASK) Problems__Issue__sentence_problem(_P_(BelievedImpossible), @@ -62347,13 +62751,13 @@ void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, "need to be arranged."); } -#line 82 "inform7/Chapter 18/Compile Atoms.w" +#line 77 "inform7/Chapter 18/Compile Atoms.w" ; return; } { -#line 104 "inform7/Chapter 18/Compile Atoms.w" +#line 99 "inform7/Chapter 18/Compile Atoms.w" if ((asch.involves_action_variables) && (Frames__used_for_past_tense()) && (suppress_C14ActionVarsPastTense == FALSE)) { @@ -62373,15 +62777,15 @@ void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, } } -#line 85 "inform7/Chapter 18/Compile Atoms.w" +#line 80 "inform7/Chapter 18/Compile Atoms.w" ; } -#line 72 "inform7/Chapter 18/Compile Atoms.w" +#line 67 "inform7/Chapter 18/Compile Atoms.w" ; { -#line 128 "inform7/Chapter 18/Compile Atoms.w" +#line 123 "inform7/Chapter 18/Compile Atoms.w" if (task == TEST_ATOM_TASK) { WRITE("("); if (asch.negate_schema) WRITE("~~("); @@ -62397,11 +62801,11 @@ void Calculus__Atoms__Compile__compile(OUTPUT_STREAM, int task, pcalc_prop *pl, } } -#line 73 "inform7/Chapter 18/Compile Atoms.w" +#line 68 "inform7/Chapter 18/Compile Atoms.w" ; } -#line 145 "inform7/Chapter 18/Compile Atoms.w" +#line 140 "inform7/Chapter 18/Compile Atoms.w" annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, pcalc_prop *pl, int task) { annotated_i6_schema asch; @@ -62414,7 +62818,7 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, switch(pl->element) { case CALLED_ATOM: { -#line 184 "inform7/Chapter 18/Compile Atoms.w" +#line 179 "inform7/Chapter 18/Compile Atoms.w" switch(task) { case TEST_ATOM_TASK: { int w1, w2; @@ -62428,11 +62832,11 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, } } -#line 155 "inform7/Chapter 18/Compile Atoms.w" +#line 150 "inform7/Chapter 18/Compile Atoms.w" ; case KIND_ATOM: { -#line 205 "inform7/Chapter 18/Compile Atoms.w" +#line 200 "inform7/Chapter 18/Compile Atoms.w" switch(task) { case TEST_ATOM_TASK: if (Kinds__Compare__lt(pl->assert_kind, K_object)) @@ -62453,11 +62857,11 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, } } -#line 156 "inform7/Chapter 18/Compile Atoms.w" +#line 151 "inform7/Chapter 18/Compile Atoms.w" ; case EVERYWHERE_ATOM: { -#line 229 "inform7/Chapter 18/Compile Atoms.w" +#line 224 "inform7/Chapter 18/Compile Atoms.w" switch(task) { case TEST_ATOM_TASK: Calculus__Schemas__modify(sch, "BackdropEverywhere(*1)"); @@ -62474,11 +62878,11 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, } } -#line 157 "inform7/Chapter 18/Compile Atoms.w" +#line 152 "inform7/Chapter 18/Compile Atoms.w" ; case NOWHERE_ATOM: { -#line 247 "inform7/Chapter 18/Compile Atoms.w" +#line 242 "inform7/Chapter 18/Compile Atoms.w" switch(task) { case TEST_ATOM_TASK: Calculus__Schemas__modify(sch, "LocationOf(*1) == nothing"); @@ -62492,11 +62896,11 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, } } -#line 158 "inform7/Chapter 18/Compile Atoms.w" +#line 153 "inform7/Chapter 18/Compile Atoms.w" ; case HERE_ATOM: { -#line 263 "inform7/Chapter 18/Compile Atoms.w" +#line 258 "inform7/Chapter 18/Compile Atoms.w" switch(task) { case TEST_ATOM_TASK: Calculus__Schemas__modify(sch, "LocationOf(*1) == location"); @@ -62510,13 +62914,13 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, } } -#line 159 "inform7/Chapter 18/Compile Atoms.w" +#line 154 "inform7/Chapter 18/Compile Atoms.w" ; case PREDICATE_ATOM: switch(pl->arity) { case 1: { -#line 279 "inform7/Chapter 18/Compile Atoms.w" +#line 274 "inform7/Chapter 18/Compile Atoms.w" int atask = 0; /* redundant assignment to appease |gcc -O2| */ adjective_usage *tr = RETRIEVE_POINTER_adjective_usage(pl->predicate); adjectival_phrase *aph = Adjectives__Usages__get_aph(tr); @@ -62537,17 +62941,17 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, return asch; } -#line 162 "inform7/Chapter 18/Compile Atoms.w" +#line 157 "inform7/Chapter 18/Compile Atoms.w" ; case 2: { -#line 301 "inform7/Chapter 18/Compile Atoms.w" +#line 296 "inform7/Chapter 18/Compile Atoms.w" binary_predicate *bp = RETRIEVE_POINTER_binary_predicate(pl->predicate); binary_predicate *bp_to_assert = NULL; { -#line 313 "inform7/Chapter 18/Compile Atoms.w" +#line 308 "inform7/Chapter 18/Compile Atoms.w" if ((task != TEST_ATOM_TASK) && (bp == R_equality)) { if (pl->terms[0].function) { bp_to_assert = pl->terms[0].function->bp; @@ -62562,13 +62966,13 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, if (bp_to_assert == NULL) bp_to_assert = bp; } -#line 304 "inform7/Chapter 18/Compile Atoms.w" +#line 299 "inform7/Chapter 18/Compile Atoms.w" ; asch.schema = BinaryPredicates__get_i6_schema(task, bp_to_assert, &asch); return asch; } -#line 163 "inform7/Chapter 18/Compile Atoms.w" +#line 158 "inform7/Chapter 18/Compile Atoms.w" ; } } @@ -62577,7 +62981,7 @@ annotated_i6_schema Calculus__Atoms__Compile__i6_schema_of_atom(i6_schema *sch, return asch; } -#line 329 "inform7/Chapter 18/Compile Atoms.w" +#line 324 "inform7/Chapter 18/Compile Atoms.w" int Calculus__Atoms__Compile__atom_involves_action_variables(pcalc_prop *pl) { int i; for (i=0; iarity; i++) { @@ -62587,7 +62991,7 @@ int Calculus__Atoms__Compile__atom_involves_action_variables(pcalc_prop *pl) { return FALSE; } -#line 341 "inform7/Chapter 18/Compile Atoms.w" +#line 336 "inform7/Chapter 18/Compile Atoms.w" annotated_i6_schema Calculus__Atoms__Compile__blank_asch(void) { annotated_i6_schema asch; asch.schema = Calculus__Schemas__new(" "); @@ -62598,13 +63002,13 @@ annotated_i6_schema Calculus__Atoms__Compile__blank_asch(void) { return asch; } -#line 52 "inform7/Chapter 18/Deciding to Defer.w" +#line 50 "inform7/Chapter 18/Deciding to Defer.w" int no_further_deferrals = FALSE; void Calculus__Deferrals__allow_no_further_deferrals(void) { no_further_deferrals = TRUE; } -#line 61 "inform7/Chapter 18/Deciding to Defer.w" +#line 59 "inform7/Chapter 18/Deciding to Defer.w" pcalc_prop_deferral *Calculus__Deferrals__new_deferred_proposition(pcalc_prop *prop, int reason) { pcalc_prop_deferral *pdef = CREATE(pcalc_prop_deferral); pdef->proposition_to_defer = prop; @@ -62615,7 +63019,7 @@ pcalc_prop_deferral *Calculus__Deferrals__new_deferred_proposition(pcalc_prop *p return pdef; } -#line 76 "inform7/Chapter 18/Deciding to Defer.w" +#line 74 "inform7/Chapter 18/Deciding to Defer.w" pcalc_prop *cache_loop_proposition = NULL; pcalc_prop_deferral *cache_loop_pdef = NULL; @@ -62628,7 +63032,7 @@ pcalc_prop_deferral *Calculus__Deferrals__defer_loop_domain(pcalc_prop *prop) { return pdef; } -#line 93 "inform7/Chapter 18/Deciding to Defer.w" +#line 91 "inform7/Chapter 18/Deciding to Defer.w" int Calculus__Deferrals__compile_deferred_description_test(specification *spec) { pcalc_prop *prop = Specifications__get_proposition(spec); if (Calculus__Propositions__contains_callings(prop)) { @@ -62643,7 +63047,7 @@ int Calculus__Deferrals__compile_deferred_description_test(specification *spec) } } -#line 117 "inform7/Chapter 18/Deciding to Defer.w" +#line 115 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_test_of_proposition(OUTPUT_STREAM, specification *substitution, pcalc_prop *prop) { LOGIF(PREDICATE_CALCULUS_WORKINGS, "Compiling as test: $D\n", prop); @@ -62656,24 +63060,24 @@ void Calculus__Deferrals__compile_test_of_proposition(OUTPUT_STREAM, } else if (Calculus__Propositions__contains_quantifier(prop)) { { -#line 154 "inform7/Chapter 18/Deciding to Defer.w" +#line 152 "inform7/Chapter 18/Deciding to Defer.w" pcalc_prop_deferral *pdef; LocalVariables__begin_condition(OUT); { -#line 166 "inform7/Chapter 18/Deciding to Defer.w" +#line 164 "inform7/Chapter 18/Deciding to Defer.w" if (Calculus__Propositions__is_a_group(prop, NEGATION_OPEN_ATOM)) { prop = Calculus__Propositions__remove_topmost_group(prop); WRITE("~~"); } } -#line 156 "inform7/Chapter 18/Deciding to Defer.w" +#line 154 "inform7/Chapter 18/Deciding to Defer.w" ; pdef = Calculus__Deferrals__new_deferred_proposition(prop, CONDITION_DEFER); { -#line 196 "inform7/Chapter 18/Deciding to Defer.w" +#line 194 "inform7/Chapter 18/Deciding to Defer.w" WRITE("Prop_%d(", pdef->allocation_id); int cinder_count = Calculus__Deferrals__Cinders__find(OUT, prop, pdef); if (substitution) { @@ -62683,13 +63087,13 @@ void Calculus__Deferrals__compile_test_of_proposition(OUTPUT_STREAM, WRITE(")"); } -#line 158 "inform7/Chapter 18/Deciding to Defer.w" +#line 156 "inform7/Chapter 18/Deciding to Defer.w" ; Calculus__Deferrals__retrieve_callings(OUT, prop, TRUE); LocalVariables__end_condition(OUT); } -#line 127 "inform7/Chapter 18/Deciding to Defer.w" +#line 125 "inform7/Chapter 18/Deciding to Defer.w" ; } else { if (substitution) Calculus__Variables__substitute_var_0_in(prop, substitution); @@ -62709,7 +63113,7 @@ void Calculus__Deferrals__compile_test_of_proposition(OUTPUT_STREAM, WRITE(")"); } -#line 231 "inform7/Chapter 18/Deciding to Defer.w" +#line 229 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int condition_context) { int calling_count=0; TRAVERSE_VARIABLE(pl); @@ -62719,13 +63123,13 @@ void Calculus__Deferrals__retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int local_variable *local; { -#line 267 "inform7/Chapter 18/Deciding to Defer.w" +#line 265 "inform7/Chapter 18/Deciding to Defer.w" int w1, w2; Calculus__Atoms__CALLED_get_name(pl, &w1, &w2); local = LocalVariables__ensure_called_local(w1, w2, pl->assert_kind); } -#line 238 "inform7/Chapter 18/Deciding to Defer.w" +#line 236 "inform7/Chapter 18/Deciding to Defer.w" ; if ((condition_context) && (calling_count == 0)) WRITE(" && ("); if ((condition_context == FALSE) || (calling_count > 0)) WRITE(", "); @@ -62742,14 +63146,14 @@ void Calculus__Deferrals__retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int } } -#line 257 "inform7/Chapter 18/Deciding to Defer.w" +#line 255 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__prepare_to_retrieve_callings(OUTPUT_STREAM, pcalc_prop *prop, int condition_context) { if ((condition_context == FALSE) && (Calculus__Propositions__contains_callings(prop))) { WRITE("deferred_calling_list-->26 = "); } } -#line 275 "inform7/Chapter 18/Deciding to Defer.w" +#line 273 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_test_if_var_matches_description(OUTPUT_STREAM, specification *var, specification *matches) { if (matches == NULL) internal_error("VMD against null description"); @@ -62773,7 +63177,7 @@ void Calculus__Deferrals__compile_test_if_var_matches_description(OUTPUT_STREAM, LOG_OUTDENT; } -#line 320 "inform7/Chapter 18/Deciding to Defer.w" +#line 318 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_now_proposition(OUTPUT_STREAM, pcalc_prop *prop, int with_semicolon) { int quantifier_count = 0; @@ -62782,7 +63186,7 @@ void Calculus__Deferrals__compile_now_proposition(OUTPUT_STREAM, pcalc_prop *pro { -#line 356 "inform7/Chapter 18/Deciding to Defer.w" +#line 354 "inform7/Chapter 18/Deciding to Defer.w" TRAVERSE_VARIABLE(pl); TRAVERSE_PROPOSITION(pl, prop) { switch(pl->element) { @@ -62823,7 +63227,7 @@ void Calculus__Deferrals__compile_now_proposition(OUTPUT_STREAM, pcalc_prop *pro } } -#line 326 "inform7/Chapter 18/Deciding to Defer.w" +#line 324 "inform7/Chapter 18/Deciding to Defer.w" ; if (quantifier_count > 0) { @@ -62848,7 +63252,7 @@ void Calculus__Deferrals__compile_now_proposition(OUTPUT_STREAM, pcalc_prop *pro } } -#line 420 "inform7/Chapter 18/Deciding to Defer.w" +#line 418 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_multiple_use_proposition(OUTPUT_STREAM, specification *spec, kind *K) { int negate = FALSE; @@ -62894,7 +63298,7 @@ void Calculus__Deferrals__compile_multiple_use_proposition(OUTPUT_STREAM, } } -#line 490 "inform7/Chapter 18/Deciding to Defer.w" +#line 488 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_number_of_S(OUTPUT_STREAM, specification *spec) { if (Calculus__Deferrals__spec_is_variable_of_kind_description(spec)) { WRITE("("); @@ -62907,7 +63311,7 @@ void Calculus__Deferrals__compile_number_of_S(OUTPUT_STREAM, specification *spec } } -#line 505 "inform7/Chapter 18/Deciding to Defer.w" +#line 503 "inform7/Chapter 18/Deciding to Defer.w" int Calculus__Deferrals__spec_is_variable_of_kind_description(specification *spec) { if ((Specifications__family_is(spec, STORAGE_FMY)) && (Kinds__get_construct(Specifications__evaluates_to(spec)) == CON_description)) @@ -62934,7 +63338,7 @@ void Calculus__Deferrals__compile_call_to_deferred_desc(OUTPUT_STREAM, pcalc_pro WRITE(")"); } -#line 534 "inform7/Chapter 18/Deciding to Defer.w" +#line 532 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_list_of_S(OUTPUT_STREAM, specification *spec, kind *K) { if (Calculus__Deferrals__spec_is_variable_of_kind_description(spec)) { WRITE("(LIST_OF_TY_Desc("); @@ -62951,7 +63355,7 @@ void Calculus__Deferrals__compile_list_of_S(OUTPUT_STREAM, specification *spec, } } -#line 553 "inform7/Chapter 18/Deciding to Defer.w" +#line 551 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_random_of_S(OUTPUT_STREAM, specification *spec) { if (Specifications__Values__is_actual_CONSTANT_construction(spec, CON_description)) { kind *K = Specifications__get_kind(spec); @@ -62986,7 +63390,7 @@ void Calculus__Deferrals__compile_random_of_S(OUTPUT_STREAM, specification *spec } } -#line 590 "inform7/Chapter 18/Deciding to Defer.w" +#line 588 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_total_of_S(OUTPUT_STREAM, property *prn, specification *spec) { if (prn == NULL) internal_error("total of on non-property"); if (Calculus__Deferrals__spec_is_variable_of_kind_description(spec)) { @@ -63002,7 +63406,7 @@ void Calculus__Deferrals__compile_total_of_S(OUTPUT_STREAM, property *prn, speci } } -#line 609 "inform7/Chapter 18/Deciding to Defer.w" +#line 607 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_substitution_test(OUTPUT_STREAM, specification *in, specification *spec) { if (Calculus__Deferrals__spec_is_variable_of_kind_description(spec)) { @@ -63017,7 +63421,7 @@ void Calculus__Deferrals__compile_substitution_test(OUTPUT_STREAM, specification } } -#line 626 "inform7/Chapter 18/Deciding to Defer.w" +#line 624 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_substitution_now(OUTPUT_STREAM, specification *in, specification *spec) { pcalc_prop *prop = Calculus__Propositions__from_spec(spec); @@ -63030,7 +63434,7 @@ void Calculus__Deferrals__compile_substitution_now(OUTPUT_STREAM, specification suppress_C14CantChangeKind = save_cck; } -#line 646 "inform7/Chapter 18/Deciding to Defer.w" +#line 644 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_extremal_of_S(OUTPUT_STREAM, specification *spec, property *prn, int sign) { if (prn == NULL) internal_error("extremal of on non-property"); @@ -63051,7 +63455,7 @@ void Calculus__Deferrals__compile_extremal_of_S(OUTPUT_STREAM, specification *sp } } -#line 695 "inform7/Chapter 18/Deciding to Defer.w" +#line 693 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_through_domain_S(OUTPUT_STREAM, specification *spec, local_variable *v1) { kind *DK = Specifications__get_kind_referred_to(spec); @@ -63123,7 +63527,7 @@ void Calculus__Deferrals__compile_repeat_through_domain_S(OUTPUT_STREAM, specifi } } -#line 775 "inform7/Chapter 18/Deciding to Defer.w" +#line 773 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_call(OUTPUT_STREAM, specification *spec, local_variable *fromv) { WRITE("("); Specifications__Compiler__compile(OUT, spec); @@ -63132,7 +63536,7 @@ void Calculus__Deferrals__compile_repeat_call(OUTPUT_STREAM, specification *spec WRITE(")"); } -#line 788 "inform7/Chapter 18/Deciding to Defer.w" +#line 786 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_repeat_domain(OUTPUT_STREAM, pcalc_prop *prop, local_variable *fromv) { pcalc_prop_deferral *pdef = Calculus__Deferrals__defer_loop_domain(prop); WRITE("Prop_%d(", pdef->allocation_id); @@ -63142,7 +63546,7 @@ void Calculus__Deferrals__compile_repeat_domain(OUTPUT_STREAM, pcalc_prop *prop, WRITE(")"); } -#line 800 "inform7/Chapter 18/Deciding to Defer.w" +#line 798 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__compile_loop_over_list_S(OUTPUT_STREAM, specification *spec, local_variable *v1) { local_variable *index_in_list = LocalVariables__new(-1, -1, K_number); local_variable *copy_of_list = LocalVariables__new(-1, -1, K_number); @@ -63167,7 +63571,7 @@ void Calculus__Deferrals__compile_loop_over_list_S(OUTPUT_STREAM, specification END_COMPILATION_MODE; } -#line 830 "inform7/Chapter 18/Deciding to Defer.w" +#line 828 "inform7/Chapter 18/Deciding to Defer.w" void Calculus__Deferrals__prop_verify_descriptive(pcalc_prop *prop, char *billing, specification *constructor) { @@ -65197,7 +65601,7 @@ pcalc_prop *Calculus__Propositions__Deferred__compile_loop_header(OUTPUT_STREAM, return proposition; } -#line 283 "inform7/Chapter 19/Kinds.w" +#line 281 "inform7/Chapter 19/Kinds.w" kind *Kinds__base_construction(kind_constructor *con) { if (con == NULL) internal_error("impossible construction"); if ((con == CON_KIND_VARIABLE) || (con == CON_INTERMEDIATE)) @@ -65213,7 +65617,7 @@ kind *Kinds__base_construction(kind_constructor *con) { kind *K; { -#line 380 "inform7/Chapter 19/Kinds.w" +#line 378 "inform7/Chapter 19/Kinds.w" K = CREATE(kind); K->construct = NULL; K->intermediate_result = NULL; @@ -65222,7 +65626,7 @@ kind *Kinds__base_construction(kind_constructor *con) { for (i=0; ikc_args[i] = NULL; } -#line 296 "inform7/Chapter 19/Kinds.w" +#line 294 "inform7/Chapter 19/Kinds.w" ; K->construct = con; if (cache) *cache = K; @@ -65230,13 +65634,13 @@ kind *Kinds__base_construction(kind_constructor *con) { return K; } -#line 313 "inform7/Chapter 19/Kinds.w" +#line 311 "inform7/Chapter 19/Kinds.w" kind *Kinds__intermediate_construction(unit_sequence *ik) { if (ik == NULL) internal_error("made unknown as Kinds__intermediate_construction"); kind *K; { -#line 380 "inform7/Chapter 19/Kinds.w" +#line 378 "inform7/Chapter 19/Kinds.w" K = CREATE(kind); K->construct = NULL; K->intermediate_result = NULL; @@ -65245,7 +65649,7 @@ kind *Kinds__intermediate_construction(unit_sequence *ik) { for (i=0; ikc_args[i] = NULL; } -#line 316 "inform7/Chapter 19/Kinds.w" +#line 314 "inform7/Chapter 19/Kinds.w" ; K->construct = CON_INTERMEDIATE; K->intermediate_result = CREATE(unit_sequence); @@ -65254,13 +65658,13 @@ kind *Kinds__intermediate_construction(unit_sequence *ik) { return K; } -#line 331 "inform7/Chapter 19/Kinds.w" +#line 329 "inform7/Chapter 19/Kinds.w" kind *Kinds__variable_construction(int N, kind *declaration) { if ((N == 0) || (N > MAX_KIND_VARIABLES)) internal_error("bad kind variable"); kind *K; { -#line 380 "inform7/Chapter 19/Kinds.w" +#line 378 "inform7/Chapter 19/Kinds.w" K = CREATE(kind); K->construct = NULL; K->intermediate_result = NULL; @@ -65269,7 +65673,7 @@ kind *Kinds__variable_construction(int N, kind *declaration) { for (i=0; ikc_args[i] = NULL; } -#line 334 "inform7/Chapter 19/Kinds.w" +#line 332 "inform7/Chapter 19/Kinds.w" ; K->construct = CON_KIND_VARIABLE; K->kind_variable_number = N; @@ -65277,13 +65681,13 @@ kind *Kinds__variable_construction(int N, kind *declaration) { return K; } -#line 352 "inform7/Chapter 19/Kinds.w" +#line 350 "inform7/Chapter 19/Kinds.w" kind *Kinds__unary_construction(kind_constructor *con, kind *X) { kind *K; if (Kinds__Constructors__arity(con) != 1) internal_error("bad unary construction"); { -#line 380 "inform7/Chapter 19/Kinds.w" +#line 378 "inform7/Chapter 19/Kinds.w" K = CREATE(kind); K->construct = NULL; K->intermediate_result = NULL; @@ -65292,7 +65696,7 @@ kind *Kinds__unary_construction(kind_constructor *con, kind *X) { for (i=0; ikc_args[i] = NULL; } -#line 355 "inform7/Chapter 19/Kinds.w" +#line 353 "inform7/Chapter 19/Kinds.w" ; K->construct = con; K->kc_args[0] = X; no_constructed_kinds_created++; @@ -65304,7 +65708,7 @@ kind *Kinds__binary_construction(kind_constructor *con, kind *X, kind *Y) { if (Kinds__Constructors__arity(con) != 2) internal_error("bad binary construction"); { -#line 380 "inform7/Chapter 19/Kinds.w" +#line 378 "inform7/Chapter 19/Kinds.w" K = CREATE(kind); K->construct = NULL; K->intermediate_result = NULL; @@ -65313,7 +65717,7 @@ kind *Kinds__binary_construction(kind_constructor *con, kind *X, kind *Y) { for (i=0; ikc_args[i] = NULL; } -#line 364 "inform7/Chapter 19/Kinds.w" +#line 362 "inform7/Chapter 19/Kinds.w" ; K->construct = con; K->kc_args[0] = X; K->kc_args[1] = Y; no_constructed_kinds_created++; @@ -65326,7 +65730,7 @@ kind *Kinds__binary_construction(kind_constructor *con, kind *X, kind *Y) { return K; } -#line 409 "inform7/Chapter 19/Kinds.w" +#line 407 "inform7/Chapter 19/Kinds.w" kind *Kinds__function_kind(int no_args, kind **args, kind *return_K) { kind *arguments_K = K_nil; int i; @@ -65336,12 +65740,12 @@ kind *Kinds__function_kind(int no_args, kind **args, kind *return_K) { return Kinds__binary_construction(CON_phrase, arguments_K, return_K); } -#line 422 "inform7/Chapter 19/Kinds.w" +#line 420 "inform7/Chapter 19/Kinds.w" kind *Kinds__pair_kind(kind *X, kind *Y) { return Kinds__binary_construction(CON_combination, X, Y); } -#line 443 "inform7/Chapter 19/Kinds.w" +#line 441 "inform7/Chapter 19/Kinds.w" kind *Kinds__first_base_k(void) { kind_constructor *con; LOOP_OVER(con, kind_constructor) @@ -65360,13 +65764,13 @@ kind *Kinds__next_base_k(kind *K) { return Kinds__base_construction(con); } -#line 465 "inform7/Chapter 19/Kinds.w" +#line 463 "inform7/Chapter 19/Kinds.w" kind_constructor *Kinds__get_construct(kind *K) { if (K) return K->construct; return NULL; } -#line 473 "inform7/Chapter 19/Kinds.w" +#line 471 "inform7/Chapter 19/Kinds.w" int Kinds__is_intermediate(kind *K) { if ((K) && (K->construct == CON_INTERMEDIATE)) return TRUE; return FALSE; @@ -65382,7 +65786,7 @@ kind *Kinds__get_variable_stipulation(kind *K) { return NULL; } -#line 491 "inform7/Chapter 19/Kinds.w" +#line 489 "inform7/Chapter 19/Kinds.w" int Kinds__is_proper_constructor(kind *K) { if (Kinds__arity_of_constructor(K) > 0) return TRUE; return FALSE; @@ -65393,13 +65797,13 @@ int Kinds__arity_of_constructor(kind *K) { return 0; } -#line 504 "inform7/Chapter 19/Kinds.w" +#line 502 "inform7/Chapter 19/Kinds.w" kind *Kinds__unary_construction_material(kind *K) { if (Kinds__arity_of_constructor(K) != 1) return NULL; return K->kc_args[0]; } -#line 512 "inform7/Chapter 19/Kinds.w" +#line 510 "inform7/Chapter 19/Kinds.w" void Kinds__binary_construction_material(kind *K, kind **X, kind **Y) { if (Kinds__arity_of_constructor(K) != 2) { if (X) *X = NULL; @@ -65410,7 +65814,7 @@ void Kinds__binary_construction_material(kind *K, kind **X, kind **Y) { } } -#line 526 "inform7/Chapter 19/Kinds.w" +#line 524 "inform7/Chapter 19/Kinds.w" int Kinds__contains(kind *K, kind_constructor *con) { if (K == NULL) return FALSE; if (K->construct == con) return TRUE; @@ -65421,7 +65825,7 @@ int Kinds__contains(kind *K, kind_constructor *con) { return FALSE; } -#line 549 "inform7/Chapter 19/Kinds.w" +#line 547 "inform7/Chapter 19/Kinds.w" kind *Kinds__substitute(kind *K, kind **meanings, int *changed) { if (meanings == NULL) meanings = values_of_kind_variables; int N = Kinds__get_variable_number(K); @@ -65453,7 +65857,7 @@ kind *Kinds__substitute(kind *K, kind **meanings, int *changed) { return K; } -#line 585 "inform7/Chapter 19/Kinds.w" +#line 583 "inform7/Chapter 19/Kinds.w" kind *Kinds__weaken(kind *K) { if (Kinds__is_proper_constructor(K)) { kind *X = NULL, *Y = NULL; @@ -65471,7 +65875,7 @@ kind *Kinds__weaken(kind *K) { return K; } -#line 607 "inform7/Chapter 19/Kinds.w" +#line 605 "inform7/Chapter 19/Kinds.w" kind *Kinds__dereference_properties(kind *K) { if ((K) && (K->construct == CON_property)) return Kinds__unary_construction_material(K); @@ -65491,14 +65895,14 @@ kind *Kinds__dereference_properties(kind *K) { return K; } -#line 631 "inform7/Chapter 19/Kinds.w" +#line 629 "inform7/Chapter 19/Kinds.w" int notable_linguistic_kinds_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 637 "inform7/Chapter 19/Kinds.w" +#line 635 "inform7/Chapter 19/Kinds.w" -#line 649 "inform7/Chapter 19/Kinds.w" +#line 647 "inform7/Chapter 19/Kinds.w" int no_kinds_of_object = 1; kind *Kinds__new_base(int w1, int w2, kind *super) { PROTECTED_MODEL_PROCEDURE; @@ -65507,7 +65911,7 @@ kind *Kinds__new_base(int w1, int w2, kind *super) { Kinds__Constructors__new(Kinds__get_construct(super), "", "#NEW")); { -#line 689 "inform7/Chapter 19/Kinds.w" +#line 687 "inform7/Chapter 19/Kinds.w" inference_subject *revised = NULL; if (w1 >= 0) Plugins__Call__name_to_early_infs(w1, w2, &revised); if (revised) { @@ -65517,7 +65921,7 @@ kind *Kinds__new_base(int w1, int w2, kind *super) { } } -#line 655 "inform7/Chapter 19/Kinds.w" +#line 653 "inform7/Chapter 19/Kinds.w" ; if (Kinds__Compare__le(super, K_object)) @@ -65525,7 +65929,7 @@ kind *Kinds__new_base(int w1, int w2, kind *super) { { -#line 700 "inform7/Chapter 19/Kinds.w" +#line 698 "inform7/Chapter 19/Kinds.w" unsigned int mc = KIND_SLOW_MC; if (Kinds__Compare__le(super, K_object)) mc = NAMETAG_MC; nametag *nt = Nametags__new(w1, w2, STORE_POINTER_kind_constructor(K->construct), KIND_PRIORITY, @@ -65536,7 +65940,7 @@ kind *Kinds__new_base(int w1, int w2, kind *super) { Kinds__Constructors__attach_nametag(K->construct, nt); } -#line 660 "inform7/Chapter 19/Kinds.w" +#line 658 "inform7/Chapter 19/Kinds.w" ; if (Preform__parse_nt_against_word_range(notable_linguistic_kinds_NTM, w1, w2, NULL, NULL)) { @@ -65560,7 +65964,7 @@ kind *Kinds__new_base(int w1, int w2, kind *super) { return K; } -#line 724 "inform7/Chapter 19/Kinds.w" +#line 722 "inform7/Chapter 19/Kinds.w" kind_constructor **Kinds__known_constructor_name(char *sn) { IDENTIFIERS_CORRESPOND("ACTIVITY_TY", &CON_activity); IDENTIFIERS_CORRESPOND("COMBINATION_TY", &CON_combination); @@ -65610,7 +66014,7 @@ int Kinds__known_name(char *sn) { return FALSE; } -#line 116 "inform7/Chapter 19/Kind Checking.w" +#line 112 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__le(kind *from, kind *to) { if (Kinds__Compare__test_kind_relation(from, to, FALSE) == ALWAYS_MATCH) return TRUE; return FALSE; @@ -65621,7 +66025,7 @@ int Kinds__Compare__lt(kind *from, kind *to) { return Kinds__Compare__le(from, to); } -#line 145 "inform7/Chapter 19/Kind Checking.w" +#line 141 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__eq(kind *K1, kind *K2) { int i; if (K1 == NULL) { if (K2 == NULL) return TRUE; return FALSE; } @@ -65640,7 +66044,7 @@ int Kinds__Compare__eq(kind *K1, kind *K2) { return TRUE; } -#line 168 "inform7/Chapter 19/Kind Checking.w" +#line 164 "inform7/Chapter 19/Kind Checking.w" kind *Kinds__Compare__super(kind *K) { if (Kinds__Compare__le(K, K_object)) { inference_subject *infs = Kinds__Behaviour__as_subject(K); @@ -65649,7 +66053,7 @@ kind *Kinds__Compare__super(kind *K) { return NULL; } -#line 182 "inform7/Chapter 19/Kind Checking.w" +#line 178 "inform7/Chapter 19/Kind Checking.w" kind *Kinds__Compare__max(kind *K1, kind *K2) { if ((Kinds__FloatingPoint__uses_floating_point(K1) == FALSE) && (Kinds__FloatingPoint__uses_floating_point(K2)) && @@ -65693,7 +66097,7 @@ kind *Kinds__Compare__traverse_kind_poset(kind *K1, kind *K2, int direction) { return K_value; } -#line 231 "inform7/Chapter 19/Kind Checking.w" +#line 227 "inform7/Chapter 19/Kind Checking.w" kind *Kinds__Compare__accumulative_max(kind *K1, kind *K2) { if ((Kinds__Behaviour__definite(K1) == TRUE) && (Kinds__Behaviour__definite(K2) == FALSE) && (Kinds__Compare__compatible(K2, K1) == ALWAYS_MATCH)) return K1; @@ -65702,7 +66106,7 @@ kind *Kinds__Compare__accumulative_max(kind *K1, kind *K2) { return Kinds__Compare__max(K1, K2); } -#line 259 "inform7/Chapter 19/Kind Checking.w" +#line 255 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__compatible(kind *from, kind *to) { if (Kinds__Compare__eq(from, to)) return ALWAYS_MATCH; @@ -65717,13 +66121,13 @@ int Kinds__Compare__compatible(kind *from, kind *to) { internal_error("bad return value from Kinds__Compare__compatible"); return NEVER_MATCH; } -#line 278 "inform7/Chapter 19/Kind Checking.w" +#line 274 "inform7/Chapter 19/Kind Checking.w" int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { if (Kinds__get_variable_number(to) > 0) { kind *var_k = to, *other_k = from; { -#line 366 "inform7/Chapter 19/Kind Checking.w" +#line 362 "inform7/Chapter 19/Kind Checking.w" switch(kind_checker_mode) { case MATCH_KIND_VARIABLES_AS_SYMBOLS: if (Kinds__get_variable_number(other_k) == @@ -65735,7 +66139,7 @@ int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { if (Kinds__get_variable_stipulation(var_k)) { -#line 401 "inform7/Chapter 19/Kind Checking.w" +#line 397 "inform7/Chapter 19/Kind Checking.w" switch(kind_checker_mode) { case MATCH_KIND_VARIABLES_INFERRING_VALUES: if (Kinds__Compare__test_kind_relation(other_k, @@ -65753,12 +66157,12 @@ int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { } } -#line 375 "inform7/Chapter 19/Kind Checking.w" +#line 371 "inform7/Chapter 19/Kind Checking.w" else { -#line 422 "inform7/Chapter 19/Kind Checking.w" +#line 418 "inform7/Chapter 19/Kind Checking.w" switch(kind_checker_mode) { case MATCH_KIND_VARIABLES_INFERRING_VALUES: return ALWAYS_MATCH; case MATCH_KIND_VARIABLES_AS_VALUES: @@ -65771,97 +66175,97 @@ int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { } } -#line 377 "inform7/Chapter 19/Kind Checking.w" +#line 373 "inform7/Chapter 19/Kind Checking.w" +; + } + } + +} +#line 277 "inform7/Chapter 19/Kind Checking.w" +; + } + if (Kinds__get_variable_number(from) > 0) { + kind *var_k = from, *other_k = to; + +{ +#line 362 "inform7/Chapter 19/Kind Checking.w" + switch(kind_checker_mode) { + case MATCH_KIND_VARIABLES_AS_SYMBOLS: + if (Kinds__get_variable_number(other_k) == + Kinds__get_variable_number(var_k)) return ALWAYS_MATCH; + return NEVER_MATCH; + case MATCH_KIND_VARIABLES_AS_UNIVERSAL: return ALWAYS_MATCH; + default: { + int vn = Kinds__get_variable_number(var_k); + if (Kinds__get_variable_stipulation(var_k)) + +{ +#line 397 "inform7/Chapter 19/Kind Checking.w" + switch(kind_checker_mode) { + case MATCH_KIND_VARIABLES_INFERRING_VALUES: + if (Kinds__Compare__test_kind_relation(other_k, + Kinds__get_variable_stipulation(var_k), comp) != ALWAYS_MATCH) + return NEVER_MATCH; + LOGIF(KIND_CHECKING, "Inferring kind variable %d from $u (declaration $u)\n", + vn, other_k, Kinds__get_variable_stipulation(var_k)); + values_of_kind_variables[vn] = other_k; + kind_variable_declaration *kvd = CREATE(kind_variable_declaration); + kvd->kv_number = vn; + kvd->kv_value = other_k; + kvd->next = NULL; + return ALWAYS_MATCH; + case MATCH_KIND_VARIABLES_AS_VALUES: return ALWAYS_MATCH; + } + +} +#line 371 "inform7/Chapter 19/Kind Checking.w" + + else + +{ +#line 418 "inform7/Chapter 19/Kind Checking.w" + switch(kind_checker_mode) { + case MATCH_KIND_VARIABLES_INFERRING_VALUES: return ALWAYS_MATCH; + case MATCH_KIND_VARIABLES_AS_VALUES: + LOGIF(KIND_CHECKING, "Checking $u against kind variable %d (=$u)\n", + other_k, vn, values_of_kind_variables[vn]); + if (Kinds__Compare__test_kind_relation(other_k, values_of_kind_variables[vn], comp) == NEVER_MATCH) + return NEVER_MATCH; + else + return ALWAYS_MATCH; + } + +} +#line 373 "inform7/Chapter 19/Kind Checking.w" ; } } } #line 281 "inform7/Chapter 19/Kind Checking.w" -; - } - if (Kinds__get_variable_number(from) > 0) { - kind *var_k = from, *other_k = to; - -{ -#line 366 "inform7/Chapter 19/Kind Checking.w" - switch(kind_checker_mode) { - case MATCH_KIND_VARIABLES_AS_SYMBOLS: - if (Kinds__get_variable_number(other_k) == - Kinds__get_variable_number(var_k)) return ALWAYS_MATCH; - return NEVER_MATCH; - case MATCH_KIND_VARIABLES_AS_UNIVERSAL: return ALWAYS_MATCH; - default: { - int vn = Kinds__get_variable_number(var_k); - if (Kinds__get_variable_stipulation(var_k)) - -{ -#line 401 "inform7/Chapter 19/Kind Checking.w" - switch(kind_checker_mode) { - case MATCH_KIND_VARIABLES_INFERRING_VALUES: - if (Kinds__Compare__test_kind_relation(other_k, - Kinds__get_variable_stipulation(var_k), comp) != ALWAYS_MATCH) - return NEVER_MATCH; - LOGIF(KIND_CHECKING, "Inferring kind variable %d from $u (declaration $u)\n", - vn, other_k, Kinds__get_variable_stipulation(var_k)); - values_of_kind_variables[vn] = other_k; - kind_variable_declaration *kvd = CREATE(kind_variable_declaration); - kvd->kv_number = vn; - kvd->kv_value = other_k; - kvd->next = NULL; - return ALWAYS_MATCH; - case MATCH_KIND_VARIABLES_AS_VALUES: return ALWAYS_MATCH; - } - -} -#line 375 "inform7/Chapter 19/Kind Checking.w" - - else - -{ -#line 422 "inform7/Chapter 19/Kind Checking.w" - switch(kind_checker_mode) { - case MATCH_KIND_VARIABLES_INFERRING_VALUES: return ALWAYS_MATCH; - case MATCH_KIND_VARIABLES_AS_VALUES: - LOGIF(KIND_CHECKING, "Checking $u against kind variable %d (=$u)\n", - other_k, vn, values_of_kind_variables[vn]); - if (Kinds__Compare__test_kind_relation(other_k, values_of_kind_variables[vn], comp) == NEVER_MATCH) - return NEVER_MATCH; - else - return ALWAYS_MATCH; - } - -} -#line 377 "inform7/Chapter 19/Kind Checking.w" -; - } - } - -} -#line 285 "inform7/Chapter 19/Kind Checking.w" ; } { -#line 305 "inform7/Chapter 19/Kind Checking.w" +#line 301 "inform7/Chapter 19/Kind Checking.w" if (Kinds__Compare__eq(to, K_value)) return ALWAYS_MATCH; if ((comp) && (Kinds__Compare__eq(from, K_value))) return ALWAYS_MATCH; } -#line 287 "inform7/Chapter 19/Kind Checking.w" +#line 283 "inform7/Chapter 19/Kind Checking.w" ; { -#line 312 "inform7/Chapter 19/Kind Checking.w" +#line 308 "inform7/Chapter 19/Kind Checking.w" if ((to == NULL) && (from == NULL)) return ALWAYS_MATCH; if ((to == NULL) || (from == NULL)) return NEVER_MATCH; } -#line 288 "inform7/Chapter 19/Kind Checking.w" +#line 284 "inform7/Chapter 19/Kind Checking.w" ; { -#line 318 "inform7/Chapter 19/Kind Checking.w" +#line 314 "inform7/Chapter 19/Kind Checking.w" inference_subject *from_subj = Kinds__Behaviour__as_subject(from); inference_subject *to_subj = Kinds__Behaviour__as_subject(to); @@ -65876,11 +66280,11 @@ int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { } } -#line 289 "inform7/Chapter 19/Kind Checking.w" +#line 285 "inform7/Chapter 19/Kind Checking.w" ; { -#line 334 "inform7/Chapter 19/Kind Checking.w" +#line 330 "inform7/Chapter 19/Kind Checking.w" if (Kinds__Constructors__compatible(from->construct, to->construct, comp) == FALSE) return NEVER_MATCH; int f_a = Kinds__Constructors__arity(from->construct); @@ -65901,11 +66305,11 @@ int Kinds__Compare__test_kind_relation(kind *from, kind *to, int comp) { return o; } -#line 290 "inform7/Chapter 19/Kind Checking.w" +#line 286 "inform7/Chapter 19/Kind Checking.w" ; } -#line 436 "inform7/Chapter 19/Kind Checking.w" +#line 432 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__show_variables(void) { LOG("Variables: "); int i; @@ -65917,7 +66321,7 @@ void Kinds__Compare__show_variables(void) { LOG("\n"); } -#line 450 "inform7/Chapter 19/Kind Checking.w" +#line 446 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__make_subkind(kind *sub, kind *super) { PROTECTED_MODEL_PROCEDURE; if (sub == NULL) { @@ -65961,12 +66365,12 @@ void Kinds__Compare__make_subkind(kind *sub, kind *super) { } } -#line 497 "inform7/Chapter 19/Kind Checking.w" +#line 493 "inform7/Chapter 19/Kind Checking.w" void Kinds__Compare__log_poset(int n) { switch (n) { case 1: { -#line 511 "inform7/Chapter 19/Kind Checking.w" +#line 507 "inform7/Chapter 19/Kind Checking.w" LOG("The subkind relation on (base) kinds:\n"); kind *A, *B; LOOP_OVER_BASE_KINDS(A) { @@ -65981,11 +66385,11 @@ void Kinds__Compare__log_poset(int n) { } } -#line 499 "inform7/Chapter 19/Kind Checking.w" +#line 495 "inform7/Chapter 19/Kind Checking.w" ; break; case 2: { -#line 527 "inform7/Chapter 19/Kind Checking.w" +#line 523 "inform7/Chapter 19/Kind Checking.w" LOG("The (always) compatibility relation on (base) kinds, where it differs from <=:\n"); kind *A, *B; LOOP_OVER_BASE_KINDS(A) { @@ -66002,11 +66406,11 @@ void Kinds__Compare__log_poset(int n) { } } -#line 500 "inform7/Chapter 19/Kind Checking.w" +#line 496 "inform7/Chapter 19/Kind Checking.w" ; break; case 3: { -#line 545 "inform7/Chapter 19/Kind Checking.w" +#line 541 "inform7/Chapter 19/Kind Checking.w" LOG("The superkind function applied to base kinds:\n"); kind *A, *B; LOOP_OVER_BASE_KINDS(A) { @@ -66016,11 +66420,11 @@ void Kinds__Compare__log_poset(int n) { } } -#line 501 "inform7/Chapter 19/Kind Checking.w" +#line 497 "inform7/Chapter 19/Kind Checking.w" ; break; case 4: { -#line 556 "inform7/Chapter 19/Kind Checking.w" +#line 552 "inform7/Chapter 19/Kind Checking.w" LOG("Looking for partially ordered set violations.\n"); kind *A, *B, *C; LOOP_OVER_BASE_KINDS(A) @@ -66037,11 +66441,11 @@ void Kinds__Compare__log_poset(int n) { LOG("Transitivity violated: $u, $u, $u\n", A, B, C); } -#line 502 "inform7/Chapter 19/Kind Checking.w" +#line 498 "inform7/Chapter 19/Kind Checking.w" ; break; case 5: { -#line 574 "inform7/Chapter 19/Kind Checking.w" +#line 570 "inform7/Chapter 19/Kind Checking.w" LOG("Looking for maximum violations.\n"); kind *A, *B; LOOP_OVER_BASE_KINDS(A) @@ -66063,11 +66467,11 @@ void Kinds__Compare__log_poset(int n) { A, A, Kinds__Compare__max(A, A)); } -#line 503 "inform7/Chapter 19/Kind Checking.w" +#line 499 "inform7/Chapter 19/Kind Checking.w" ; break; case 6: { -#line 599 "inform7/Chapter 19/Kind Checking.w" +#line 595 "inform7/Chapter 19/Kind Checking.w" kind *tests[SIZE_OF_GRAB_BAG]; tests[0] = K_number; tests[1] = K_container; @@ -66092,12 +66496,12 @@ void Kinds__Compare__log_poset(int n) { } } -#line 504 "inform7/Chapter 19/Kind Checking.w" +#line 500 "inform7/Chapter 19/Kind Checking.w" ; break; } } -#line 156 "inform7/Chapter 19/Kind Constructors.w" +#line 154 "inform7/Chapter 19/Kind Constructors.w" kind_constructor *Kinds__Constructors__new(kind_constructor *super, char *source_name, char *initialisation_macro) { kind_constructor *con = CREATE(kind_constructor); @@ -66106,7 +66510,7 @@ kind_constructor *Kinds__Constructors__new(kind_constructor *super, char *source if (super == Kinds__get_construct(K_value)) { -#line 184 "inform7/Chapter 19/Kind Constructors.w" +#line 182 "inform7/Chapter 19/Kind Constructors.w" con->dt_tag = NULL; con->group = 0; /* which is invalid, so the interpreter needs to set it */ @@ -66204,11 +66608,11 @@ kind_constructor *Kinds__Constructors__new(kind_constructor *super, char *source Kinds__Interpreter__parse_kind_macro_name(initialisation_macro), con); } -#line 162 "inform7/Chapter 19/Kind Constructors.w" +#line 160 "inform7/Chapter 19/Kind Constructors.w" else { -#line 290 "inform7/Chapter 19/Kind Constructors.w" +#line 288 "inform7/Chapter 19/Kind Constructors.w" int I = con->allocation_id; void *N = con->next_structure; void *P = con->prev_structure; @@ -66220,7 +66624,7 @@ kind_constructor *Kinds__Constructors__new(kind_constructor *super, char *source con->name_in_template_code[0] = 0; /* otherwise this will be called |OBJECT_TY| by mistake */ } -#line 163 "inform7/Chapter 19/Kind Constructors.w" +#line 161 "inform7/Chapter 19/Kind Constructors.w" ; if (source_name) @@ -66236,7 +66640,7 @@ kind_constructor *Kinds__Constructors__new(kind_constructor *super, char *source return con; } -#line 305 "inform7/Chapter 19/Kind Constructors.w" +#line 303 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__attach_nametag(kind_constructor *con, nametag *nt) { if ((con == NULL) || (nt == NULL)) internal_error("bad nametag attachment"); con->dt_tag = nt; @@ -66263,7 +66667,7 @@ nametag *Kinds__Constructors__get_nametag(kind_constructor *con) { return con->dt_tag; } -#line 338 "inform7/Chapter 19/Kind Constructors.w" +#line 336 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__compile_I6_constants(OUTPUT_STREAM) { WRITE("Constant UNKNOWN_TY = %d;\n", UNKNOWN); kind_constructor *con; @@ -66279,7 +66683,7 @@ char *Kinds__Constructors__name_in_template_code(kind_constructor *con) { return con->name_in_template_code; } -#line 357 "inform7/Chapter 19/Kind Constructors.w" +#line 355 "inform7/Chapter 19/Kind Constructors.w" kind_constructor *Kinds__Constructors__parse(char *sn) { if (sn == NULL) return NULL; kind_constructor *con; @@ -66289,7 +66693,7 @@ kind_constructor *Kinds__Constructors__parse(char *sn) { return NULL; } -#line 371 "inform7/Chapter 19/Kind Constructors.w" +#line 369 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__convert_to_unit(kind_constructor *con) { if (con->is_incompletely_defined == TRUE) { Kinds__Interpreter__play_back_kind_macro( @@ -66313,18 +66717,18 @@ int Kinds__Constructors__convert_to_enumeration(kind_constructor *con) { return FALSE; } -#line 397 "inform7/Chapter 19/Kind Constructors.w" +#line 395 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__convert_to_real(kind_constructor *con) { Kinds__Interpreter__play_back_kind_macro( Kinds__Interpreter__parse_kind_macro_name("#REAL"), con); } -#line 406 "inform7/Chapter 19/Kind Constructors.w" +#line 404 "inform7/Chapter 19/Kind Constructors.w" void Kinds__Constructors__mark_as_linguistic(kind_constructor *con) { con->linguistic = TRUE; } -#line 413 "inform7/Chapter 19/Kind Constructors.w" +#line 411 "inform7/Chapter 19/Kind Constructors.w" kind **Kinds__Constructors__cache_location(kind_constructor *con) { if (con) return &(con->cached_kind); return NULL; @@ -66344,7 +66748,7 @@ int Kinds__Constructors__variance(kind_constructor *con, int b) { return con->variance[b]; } -#line 437 "inform7/Chapter 19/Kind Constructors.w" +#line 435 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__is_definite(kind_constructor *con) { if ((con->group == BASE_CONSTRUCTOR_GRP) || (con->group == PROPER_CONSTRUCTOR_GRP)) @@ -66381,7 +66785,7 @@ int Kinds__Constructors__is_enumeration(kind_constructor *con) { return FALSE; } -#line 478 "inform7/Chapter 19/Kind Constructors.w" +#line 476 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__find_cast(kind_constructor *from, kind_constructor *to) { if (to) { kind_constructor_casting_rule *dtcr; @@ -66398,7 +66802,7 @@ int Kinds__Constructors__find_cast(kind_constructor *from, kind_constructor *to) return FALSE; } -#line 498 "inform7/Chapter 19/Kind Constructors.w" +#line 496 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__find_instance(kind_constructor *from, kind_constructor *to) { kind_constructor_instance *dti; for (dti = from->first_instance_rule; dti; dti = dti->next_instance_rule) { @@ -66412,7 +66816,7 @@ int Kinds__Constructors__find_instance(kind_constructor *from, kind_constructor return FALSE; } -#line 515 "inform7/Chapter 19/Kind Constructors.w" +#line 513 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__compatible(kind_constructor *from, kind_constructor *to, int allow_casts) { if (to == from) return TRUE; if ((to == NULL) || (from == NULL)) return FALSE; @@ -66421,7 +66825,7 @@ int Kinds__Constructors__compatible(kind_constructor *from, kind_constructor *to return FALSE; } -#line 526 "inform7/Chapter 19/Kind Constructors.w" +#line 524 "inform7/Chapter 19/Kind Constructors.w" int Kinds__Constructors__uses_pointer_values(kind_constructor *con) { if (con == NULL) return FALSE; if ((Kinds__Constructors__is_definite(con)) && @@ -66436,19 +66840,19 @@ int Kinds__Constructors__allow_word_as_pointer(kind_constructor *left, kind_cons return FALSE; } -#line 250 "inform7/Chapter 19/Kind Interpreter.w" +#line 247 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__start(void) { Kinds__Interpreter__initialise_kind_text_archiver(); } -#line 266 "inform7/Chapter 19/Kind Interpreter.w" +#line 262 "inform7/Chapter 19/Kind Interpreter.w" kind_constructor *constructor_described = NULL; int total_kind_command_lengths = 0; void Kinds__Interpreter__despatch_kind_command(char *command) { { -#line 295 "inform7/Chapter 19/Kind Interpreter.w" +#line 291 "inform7/Chapter 19/Kind Interpreter.w" total_kind_command_lengths += Platform__strlen(command) + 1; if (total_kind_command_lengths >= MAX_KIND_COMMAND_FILE_LENGTH) Kinds__Interpreter__kind_command_error(command, "too great an extent of kind commands"); @@ -66456,7 +66860,7 @@ void Kinds__Interpreter__despatch_kind_command(char *command) { Kinds__Interpreter__kind_command_error(command, "kind command too long"); } -#line 270 "inform7/Chapter 19/Kind Interpreter.w" +#line 266 "inform7/Chapter 19/Kind Interpreter.w" ; if (Kinds__Interpreter__recording_a_kind_template()) { @@ -66470,7 +66874,7 @@ void Kinds__Interpreter__despatch_kind_command(char *command) { command[Platform__strlen(command)-1] = 0; /* remove the terminal colon */ { -#line 304 "inform7/Chapter 19/Kind Interpreter.w" +#line 300 "inform7/Chapter 19/Kind Interpreter.w" if (command[0] == '#') Kinds__Interpreter__begin_kind_macro(command); else if (command[0] == '*') Kinds__Interpreter__begin_kind_template(command); else { @@ -66490,7 +66894,7 @@ void Kinds__Interpreter__despatch_kind_command(char *command) { } } -#line 281 "inform7/Chapter 19/Kind Interpreter.w" +#line 277 "inform7/Chapter 19/Kind Interpreter.w" ; return; } @@ -66502,14 +66906,14 @@ void Kinds__Interpreter__despatch_kind_command(char *command) { else internal_error("kind command describes unspecified kind"); } -#line 326 "inform7/Chapter 19/Kind Interpreter.w" +#line 322 "inform7/Chapter 19/Kind Interpreter.w" single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { char *argument = NULL; single_kind_command stc; { -#line 365 "inform7/Chapter 19/Kind Interpreter.w" +#line 361 "inform7/Chapter 19/Kind Interpreter.w" int i; for (i=0; command[i]; i++) if (command[i] == ':') { @@ -66521,12 +66925,12 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { if (argument == NULL) Kinds__Interpreter__kind_command_error(command, "kind command without argument"); } -#line 330 "inform7/Chapter 19/Kind Interpreter.w" +#line 326 "inform7/Chapter 19/Kind Interpreter.w" ; { -#line 351 "inform7/Chapter 19/Kind Interpreter.w" +#line 347 "inform7/Chapter 19/Kind Interpreter.w" stc.which_kind_command = NULL; stc.boolean_argument = NOT_APPLICABLE; stc.numeric_argument = 0; @@ -66538,11 +66942,11 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { stc.template_argument = NULL; } -#line 332 "inform7/Chapter 19/Kind Interpreter.w" +#line 328 "inform7/Chapter 19/Kind Interpreter.w" ; { -#line 382 "inform7/Chapter 19/Kind Interpreter.w" +#line 378 "inform7/Chapter 19/Kind Interpreter.w" int i; for (i=0; table_of_kind_commands[i].text_of_command; i++) if (strcmp(command, table_of_kind_commands[i].text_of_command) == 0) @@ -66551,23 +66955,23 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { if (stc.which_kind_command == NULL) Kinds__Interpreter__kind_command_error(command, "no such kind command"); } -#line 333 "inform7/Chapter 19/Kind Interpreter.w" +#line 329 "inform7/Chapter 19/Kind Interpreter.w" ; switch(stc.which_kind_command->operand_type) { case BOOLEAN_KCA: { -#line 392 "inform7/Chapter 19/Kind Interpreter.w" +#line 388 "inform7/Chapter 19/Kind Interpreter.w" if (strcmp(argument, "yes") == 0) stc.boolean_argument = TRUE; else if (strcmp(argument, "no") == 0) stc.boolean_argument = FALSE; else Kinds__Interpreter__kind_command_error(command, "boolean kind command takes yes/no argument"); } -#line 336 "inform7/Chapter 19/Kind Interpreter.w" +#line 332 "inform7/Chapter 19/Kind Interpreter.w" ; break; case CCM_KCA: { -#line 399 "inform7/Chapter 19/Kind Interpreter.w" +#line 395 "inform7/Chapter 19/Kind Interpreter.w" if (strcmp(argument, "none") == 0) stc.ccm_argument = NONE_CCM; else if (strcmp(argument, "literal") == 0) stc.ccm_argument = LITERAL_CCM; else if (strcmp(argument, "quantitative") == 0) stc.ccm_argument = NAMED_CONSTANT_CCM; @@ -66575,11 +66979,11 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { else Kinds__Interpreter__kind_command_error(command, "kind command with unknown constant-compilation-method"); } -#line 337 "inform7/Chapter 19/Kind Interpreter.w" +#line 333 "inform7/Chapter 19/Kind Interpreter.w" ; break; case CONSTRUCTOR_KCA: { -#line 442 "inform7/Chapter 19/Kind Interpreter.w" +#line 438 "inform7/Chapter 19/Kind Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == '>') && (argument[i+1] == '>') && (argument[i+2] == '>')) { @@ -66590,47 +66994,47 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { Extensions__IDs__truncated_strcpy(stc.constructor_argument, argument, 31); } -#line 338 "inform7/Chapter 19/Kind Interpreter.w" +#line 334 "inform7/Chapter 19/Kind Interpreter.w" ; break; case MACRO_KCA: { -#line 461 "inform7/Chapter 19/Kind Interpreter.w" +#line 457 "inform7/Chapter 19/Kind Interpreter.w" stc.macro_argument = Kinds__Interpreter__parse_kind_macro_name(argument); if (stc.macro_argument == NULL) Kinds__Interpreter__kind_command_error(command, "unknown template name in kind command"); } -#line 339 "inform7/Chapter 19/Kind Interpreter.w" +#line 335 "inform7/Chapter 19/Kind Interpreter.w" ; break; case NUMERIC_KCA: { -#line 437 "inform7/Chapter 19/Kind Interpreter.w" +#line 433 "inform7/Chapter 19/Kind Interpreter.w" stc.numeric_argument = atoi(argument); } -#line 340 "inform7/Chapter 19/Kind Interpreter.w" +#line 336 "inform7/Chapter 19/Kind Interpreter.w" ; break; case TEMPLATE_KCA: { -#line 454 "inform7/Chapter 19/Kind Interpreter.w" +#line 450 "inform7/Chapter 19/Kind Interpreter.w" stc.template_argument = Kinds__Interpreter__parse_kind_template_name(argument); if (stc.template_argument == NULL) Kinds__Interpreter__kind_command_error(command, "unknown template name in kind command"); } -#line 341 "inform7/Chapter 19/Kind Interpreter.w" +#line 337 "inform7/Chapter 19/Kind Interpreter.w" ; break; case TEXT_KCA: { -#line 408 "inform7/Chapter 19/Kind Interpreter.w" +#line 404 "inform7/Chapter 19/Kind Interpreter.w" stc.textual_argument = Kinds__Interpreter__archive_kind_text(argument); } -#line 342 "inform7/Chapter 19/Kind Interpreter.w" +#line 338 "inform7/Chapter 19/Kind Interpreter.w" ; break; case VOCABULARY_KCA: { -#line 413 "inform7/Chapter 19/Kind Interpreter.w" +#line 409 "inform7/Chapter 19/Kind Interpreter.w" stc.vocabulary_argument = WordAssemblages__lit_0(); argument = Kinds__Interpreter__archive_kind_text(argument); char *latest_word = argument; @@ -66653,13 +67057,13 @@ single_kind_command Kinds__Interpreter__parse_kind_command(char *command) { Vocabulary__entry_for_text(latest_word))); } -#line 343 "inform7/Chapter 19/Kind Interpreter.w" +#line 339 "inform7/Chapter 19/Kind Interpreter.w" ; break; } return stc; } -#line 504 "inform7/Chapter 19/Kind Interpreter.w" +#line 500 "inform7/Chapter 19/Kind Interpreter.w" kind_template_definition *Kinds__Interpreter__new_kind_template(char *name) { kind_template_definition *ttd = CREATE(kind_template_definition); ttd->template_name = Kinds__Interpreter__archive_kind_text(name); @@ -66673,7 +67077,7 @@ kind_template_definition *Kinds__Interpreter__parse_kind_template_name(char *nam return NULL; } -#line 522 "inform7/Chapter 19/Kind Interpreter.w" +#line 518 "inform7/Chapter 19/Kind Interpreter.w" kind_template_definition *current_kind_template = NULL; /* the one now being recorded */ int Kinds__Interpreter__recording_a_kind_template(void) { @@ -66699,14 +67103,14 @@ void Kinds__Interpreter__end_kind_template(void) { current_kind_template = NULL; } -#line 553 "inform7/Chapter 19/Kind Interpreter.w" +#line 549 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__remember_to_transcribe_spec_template(kind_template_definition *ttd, kind_constructor *C) { kind_template_obligation *tto = CREATE(kind_template_obligation); tto->remembered_template = ttd; tto->remembered_constructor = C; } -#line 562 "inform7/Chapter 19/Kind Interpreter.w" +#line 558 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__include_templates_for_kinds(void) { kind_template_obligation *tto; LOOP_OVER(tto, kind_template_obligation) @@ -66722,7 +67126,7 @@ void Kinds__Interpreter__transcribe_kind_template(kind_template_definition *ttd, if ((p[i] == '\n') || (p[i] == ' ')) { i++; continue; } { -#line 595 "inform7/Chapter 19/Kind Interpreter.w" +#line 591 "inform7/Chapter 19/Kind Interpreter.w" int j=0; while ((p[i] != 0) && (p[i] != '\n')) { if (p[i] == '<') { @@ -66735,57 +67139,57 @@ void Kinds__Interpreter__transcribe_kind_template(kind_template_definition *ttd, i++; { -#line 617 "inform7/Chapter 19/Kind Interpreter.w" +#line 613 "inform7/Chapter 19/Kind Interpreter.w" if (strcmp(template_wildcard_buffer, "kind") == 0) { -#line 633 "inform7/Chapter 19/Kind Interpreter.w" +#line 629 "inform7/Chapter 19/Kind Interpreter.w" Kinds__Interpreter__transcribe_constructor_name(template_line_buffer+j, con, FALSE); } -#line 618 "inform7/Chapter 19/Kind Interpreter.w" +#line 614 "inform7/Chapter 19/Kind Interpreter.w" else if (strcmp(template_wildcard_buffer, "lower-case-kind") == 0) { -#line 638 "inform7/Chapter 19/Kind Interpreter.w" +#line 634 "inform7/Chapter 19/Kind Interpreter.w" Kinds__Interpreter__transcribe_constructor_name(template_line_buffer+j, con, TRUE); } -#line 620 "inform7/Chapter 19/Kind Interpreter.w" +#line 616 "inform7/Chapter 19/Kind Interpreter.w" else if (strcmp(template_wildcard_buffer, "kind-weak-ID") == 0) { -#line 643 "inform7/Chapter 19/Kind Interpreter.w" +#line 639 "inform7/Chapter 19/Kind Interpreter.w" sprintf(template_line_buffer+j, "%d", con->weak_kind_ID); } -#line 622 "inform7/Chapter 19/Kind Interpreter.w" +#line 618 "inform7/Chapter 19/Kind Interpreter.w" else if (strcmp(template_wildcard_buffer, "printing-routine") == 0) { -#line 648 "inform7/Chapter 19/Kind Interpreter.w" +#line 644 "inform7/Chapter 19/Kind Interpreter.w" sprintf(template_line_buffer+j, "%s", con->dt_I6_identifier); } -#line 624 "inform7/Chapter 19/Kind Interpreter.w" +#line 620 "inform7/Chapter 19/Kind Interpreter.w" else if (strcmp(template_wildcard_buffer, "comparison-routine") == 0) { -#line 653 "inform7/Chapter 19/Kind Interpreter.w" +#line 649 "inform7/Chapter 19/Kind Interpreter.w" sprintf(template_line_buffer+j, "%s", con->comparison_routine); } -#line 626 "inform7/Chapter 19/Kind Interpreter.w" +#line 622 "inform7/Chapter 19/Kind Interpreter.w" else internal_error("no such source text template wildcard"); j = Platform__strlen(template_line_buffer); } -#line 605 "inform7/Chapter 19/Kind Interpreter.w" +#line 601 "inform7/Chapter 19/Kind Interpreter.w" ; } else template_line_buffer[j++] = p[i++]; } @@ -66796,7 +67200,7 @@ void Kinds__Interpreter__transcribe_kind_template(kind_template_definition *ttd, } } -#line 575 "inform7/Chapter 19/Kind Interpreter.w" +#line 571 "inform7/Chapter 19/Kind Interpreter.w" ; if (template_line_buffer[0]) { int x1 = lexer_wordcount, x2; @@ -66808,7 +67212,7 @@ void Kinds__Interpreter__transcribe_kind_template(kind_template_definition *ttd, Sentences__RuleSubtrees__register_recently_lexed_phrases(); } -#line 658 "inform7/Chapter 19/Kind Interpreter.w" +#line 654 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__transcribe_constructor_name(char *buffer, kind_constructor *con, int lower_case) { buffer[0] = 0; int w1 = -1, w2 = -1; @@ -66831,7 +67235,7 @@ void Kinds__Interpreter__transcribe_constructor_name(char *buffer, kind_construc } } -#line 685 "inform7/Chapter 19/Kind Interpreter.w" +#line 681 "inform7/Chapter 19/Kind Interpreter.w" kind_macro_definition *current_kind_macro = NULL; /* the one now being recorded */ kind_macro_definition *Kinds__Interpreter__new_kind_macro(char *name) { @@ -66848,7 +67252,7 @@ kind_macro_definition *Kinds__Interpreter__parse_kind_macro_name(char *name) { return NULL; } -#line 704 "inform7/Chapter 19/Kind Interpreter.w" +#line 700 "inform7/Chapter 19/Kind Interpreter.w" int Kinds__Interpreter__recording_a_kind_macro(void) { if (current_kind_macro) return TRUE; return FALSE; @@ -66873,7 +67277,7 @@ void Kinds__Interpreter__end_kind_macro(void) { current_kind_macro = NULL; } -#line 732 "inform7/Chapter 19/Kind Interpreter.w" +#line 728 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__play_back_kind_macro(kind_macro_definition *macro, kind_constructor *con) { int i; if (macro == NULL) internal_error("no such kind macro to play back"); @@ -66881,7 +67285,7 @@ void Kinds__Interpreter__play_back_kind_macro(kind_macro_definition *macro, kind Kinds__Interpreter__apply_kind_command(macro->kind_macro_line[i], con); } -#line 747 "inform7/Chapter 19/Kind Interpreter.w" +#line 743 "inform7/Chapter 19/Kind Interpreter.w" char archive_for_kind_text[MAX_KIND_COMMAND_FILE_LENGTH]; /* text storage area */ char *top_of_afdtt = archive_for_kind_text; /* next free character */ int afdtt_recording_mode = FALSE; @@ -66898,7 +67302,7 @@ char *Kinds__Interpreter__archive_kind_text(char *original) { return new_location; } -#line 766 "inform7/Chapter 19/Kind Interpreter.w" +#line 762 "inform7/Chapter 19/Kind Interpreter.w" char *Kinds__Interpreter__begin_recording_kind_text(void) { top_of_afdtt[0] = 0; afdtt_recording_mode = TRUE; @@ -66915,20 +67319,20 @@ void Kinds__Interpreter__end_recording_kind_text(void) { afdtt_recording_mode = FALSE; } -#line 785 "inform7/Chapter 19/Kind Interpreter.w" +#line 781 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__kind_command_error(char *command, char *error) { LOG("Kind command error found at: %s\n", command); internal_error(error); } -#line 833 "inform7/Chapter 19/Kind Interpreter.w" +#line 829 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constructor *con) { if (stc.which_kind_command == NULL) internal_error("null STC command"); int tcc = stc.which_kind_command->opcode_number; { -#line 849 "inform7/Chapter 19/Kind Interpreter.w" +#line 845 "inform7/Chapter 19/Kind Interpreter.w" switch (tcc) { case apply_template_KCC: if (text_loaded_from_source) Kinds__Interpreter__transcribe_kind_template(stc.template_argument, con); @@ -66940,12 +67344,12 @@ void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constr } } -#line 837 "inform7/Chapter 19/Kind Interpreter.w" +#line 833 "inform7/Chapter 19/Kind Interpreter.w" ; { -#line 867 "inform7/Chapter 19/Kind Interpreter.w" +#line 863 "inform7/Chapter 19/Kind Interpreter.w" switch (tcc) { SET_BOOLEAN_FIELD(can_coincide_with_property) SET_BOOLEAN_FIELD(can_exchange) @@ -66976,11 +67380,11 @@ void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constr } } -#line 839 "inform7/Chapter 19/Kind Interpreter.w" +#line 835 "inform7/Chapter 19/Kind Interpreter.w" ; { -#line 899 "inform7/Chapter 19/Kind Interpreter.w" +#line 895 "inform7/Chapter 19/Kind Interpreter.w" if (tcc == cast_KCC) { kind_constructor_casting_rule *dtcr = CREATE(kind_constructor_casting_rule); dtcr->next_casting_rule = con->first_casting_rule; @@ -67008,16 +67412,16 @@ void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constr } } -#line 840 "inform7/Chapter 19/Kind Interpreter.w" +#line 836 "inform7/Chapter 19/Kind Interpreter.w" ; { -#line 928 "inform7/Chapter 19/Kind Interpreter.w" +#line 924 "inform7/Chapter 19/Kind Interpreter.w" switch (tcc) { case constructor_arity_KCC: { -#line 989 "inform7/Chapter 19/Kind Interpreter.w" +#line 985 "inform7/Chapter 19/Kind Interpreter.w" char *p = stc.textual_argument; int n = 0, c = 0; while (p[n]) { @@ -67044,7 +67448,7 @@ void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constr con->constructor_arity = c+1; } -#line 930 "inform7/Chapter 19/Kind Interpreter.w" +#line 926 "inform7/Chapter 19/Kind Interpreter.w" ; return; case description_KCC: @@ -67102,13 +67506,13 @@ void Kinds__Interpreter__apply_kind_command(single_kind_command stc, kind_constr } } -#line 841 "inform7/Chapter 19/Kind Interpreter.w" +#line 837 "inform7/Chapter 19/Kind Interpreter.w" ; internal_error("unimplemented kind command"); } -#line 1019 "inform7/Chapter 19/Kind Interpreter.w" +#line 1015 "inform7/Chapter 19/Kind Interpreter.w" void Kinds__Interpreter__batch_done(void) { } @@ -67251,7 +67655,7 @@ int Kinds__Behaviour__get_constant_compilation_method(kind *K) { void Kinds__Behaviour__add_literal_pattern(kind *K, literal_pattern *lp) { if (K == NULL) internal_error("can't add LP to null kind"); K->construct->ways_to_write_literals = - Semantics__Nouns__LiteralPatterns__list_add( + LiteralPatterns__list_add( K->construct->ways_to_write_literals, lp, Kinds__FloatingPoint__uses_floating_point(lp->kind_specified)); } @@ -67542,7 +67946,7 @@ int Kinds__Behaviour__scale_factor(kind *K) { if (K == NULL) return 1; if (K->intermediate_result) return Kinds__Dimensions__us_get_scaling_factor(K->intermediate_result); - return Semantics__Nouns__LiteralPatterns__scale_factor(K); + return LiteralPatterns__scale_factor(K); } #line 582 "inform7/Chapter 19/Using Kinds.w" @@ -69197,7 +69601,7 @@ void Kinds__Dimensions__index_dimensional_rules(void) { else { char *p = Kinds__Behaviour__get_index_minimum_value(R); if (p) INDEX("%s", p); - else Semantics__Nouns__LiteralPatterns__index_value( + else LiteralPatterns__index_value( Kinds__Behaviour__list_of_literal_forms(R), 1); } @@ -69216,10 +69620,10 @@ void Kinds__Dimensions__index_dimensional_rules(void) { if (p) INDEX("%s", p); else { if (VirtualMachines__is_16_bit()) - Semantics__Nouns__LiteralPatterns__index_value( + LiteralPatterns__index_value( Kinds__Behaviour__list_of_literal_forms(R), 32767); else - Semantics__Nouns__LiteralPatterns__index_value( + LiteralPatterns__index_value( Kinds__Behaviour__list_of_literal_forms(R), 2147483647); } } @@ -69261,11 +69665,11 @@ void Kinds__Dimensions__index_dimensional_rules(void) { Kinds__Index__index_kind(O, FALSE, FALSE); INDEX("    "); HTML__next_html_column(ifl, 0); - Semantics__Nouns__LiteralPatterns__index_benchmark_value(L); + LiteralPatterns__index_benchmark_value(L); INDEX(" x "); - Semantics__Nouns__LiteralPatterns__index_benchmark_value(R); + LiteralPatterns__index_benchmark_value(R); INDEX(" = "); - Semantics__Nouns__LiteralPatterns__index_benchmark_value(O); + LiteralPatterns__index_benchmark_value(O); HTML__end_html_row(ifl); } if (NP > 0) { HTML__end_html_table(ifl); INDEX("

"); } @@ -70966,7 +71370,7 @@ void Kinds__RunTime__compile_data_type_support_routines(OUTPUT_STREAM) { OUT = Routines__begin(OUT, printing_rule_name); LocalVariables__add_named_call("value"); if (Kinds__Behaviour__list_of_literal_forms(K)) - Semantics__Nouns__LiteralPatterns__printing_routine(OUT, + LiteralPatterns__printing_routine(OUT, Kinds__Behaviour__list_of_literal_forms(K)); else { WRITE(";\n"); INDENT; WRITE("print value;\n"); @@ -71348,7 +71752,7 @@ void Kinds__Index__index_kinds(int pass) { { #line 198 "inform7/Chapter 19/Kinds Index.w" if (Kinds__Behaviour__list_of_literal_forms(K)) { - Semantics__Nouns__LiteralPatterns__index_all(K); + LiteralPatterns__index_all(K); INDEX("
"); } @@ -71505,7 +71909,7 @@ void Kinds__Index__end_chart_row(int shaded, kind *K, { #line 351 "inform7/Chapter 19/Kinds Index.w" if (Kinds__Behaviour__list_of_literal_forms(K)) - Semantics__Nouns__LiteralPatterns__index_value( + LiteralPatterns__index_value( Kinds__Behaviour__list_of_literal_forms(K), 0); else INDEX("--"); @@ -78777,7 +79181,7 @@ break; } #line 3478 "inform7/Chapter 20/Type Checking.w" -#line 96 "inform7/Chapter 21/Properties.w" +#line 93 "inform7/Chapter 21/Properties.w" property *Properties__obtain(int w1, int w2, int valued) { meaning_list *ml = Parser__SP__parse_excerpt(PROPERTY_MC, w1, w2); property *prn; @@ -78800,12 +79204,12 @@ property *Properties__obtain(int w1, int w2, int valued) { return prn; } -#line 121 "inform7/Chapter 21/Properties.w" +#line 118 "inform7/Chapter 21/Properties.w" property *Properties__create(int w1, int w2) { Articles__remove_article(&w1, &w2); { -#line 144 "inform7/Chapter 21/Properties.w" +#line 141 "inform7/Chapter 21/Properties.w" int unfortunate = FALSE; if ((Preform__parse_nt_against_word_range(k_kind_NTM, w1, w2, NULL, NULL)) && (most_recent_result_p == K_value)) { unfortunate = TRUE; @@ -78836,11 +79240,11 @@ property *Properties__create(int w1, int w2) { } } -#line 123 "inform7/Chapter 21/Properties.w" +#line 120 "inform7/Chapter 21/Properties.w" ; { -#line 178 "inform7/Chapter 21/Properties.w" +#line 175 "inform7/Chapter 21/Properties.w" if (Preform__parse_nt_against_word_range(spec_type_expression_or_value_NTM, w1, w2, NULL, NULL)) { int okay = FALSE; specification *spec = most_recent_result_p; @@ -78863,13 +79267,13 @@ property *Properties__create(int w1, int w2) { } } -#line 124 "inform7/Chapter 21/Properties.w" +#line 121 "inform7/Chapter 21/Properties.w" ; property *prn = CREATE(property); { -#line 204 "inform7/Chapter 21/Properties.w" +#line 201 "inform7/Chapter 21/Properties.w" prn->word_ref1 = w1; prn->word_ref2 = w2; prn->ambiguous_name = Preform__parse_nt_against_word_range(name_looking_like_property_test_NTM, w1, w2, NULL, NULL); @@ -78885,23 +79289,23 @@ property *Properties__create(int w1, int w2) { Properties__Valued__initialise(prn); } -#line 127 "inform7/Chapter 21/Properties.w" +#line 124 "inform7/Chapter 21/Properties.w" ; { -#line 221 "inform7/Chapter 21/Properties.w" +#line 218 "inform7/Chapter 21/Properties.w" if (Preform__parse_nt_against_word_range(k_kind_NTM, w1, w2, NULL, NULL)) Properties__Valued__make_coincide_with_kind(prn, most_recent_result_p); } -#line 128 "inform7/Chapter 21/Properties.w" +#line 125 "inform7/Chapter 21/Properties.w" ; Identifiers__compose(prn->original_name, 'p', prn->allocation_id, w1, w2); strcpy(prn->translated_name, prn->original_name); { -#line 239 "inform7/Chapter 21/Properties.w" +#line 236 "inform7/Chapter 21/Properties.w" if (Preform__parse_nt_against_word_range(notable_properties_NTM, w1, w2, NULL, NULL)) { switch (most_recent_result) { case 0: P_description = prn; @@ -78930,12 +79334,12 @@ property *Properties__create(int w1, int w2) { Plugins__Call__new_property_notify(prn); } -#line 132 "inform7/Chapter 21/Properties.w" +#line 129 "inform7/Chapter 21/Properties.w" ; if (w1 >= 0) { -#line 277 "inform7/Chapter 21/Properties.w" +#line 274 "inform7/Chapter 21/Properties.w" Semantics__Nouns__ExcerptMeanings__register( PROPERTY_MC, 0, w1, w2, STORE_POINTER_property(prn)); Semantics__Nouns__ExcerptMeanings__register_assemblage( @@ -78945,7 +79349,7 @@ property *Properties__create(int w1, int w2) { STORE_POINTER_property(prn)); } -#line 134 "inform7/Chapter 21/Properties.w" +#line 131 "inform7/Chapter 21/Properties.w" else Properties__exclude_from_index(prn); @@ -78953,21 +79357,21 @@ property *Properties__create(int w1, int w2) { return prn; } -#line 230 "inform7/Chapter 21/Properties.w" +#line 227 "inform7/Chapter 21/Properties.w" int notable_properties_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 235 "inform7/Chapter 21/Properties.w" +#line 232 "inform7/Chapter 21/Properties.w" -#line 271 "inform7/Chapter 21/Properties.w" +#line 268 "inform7/Chapter 21/Properties.w" int property_name_construction_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 273 "inform7/Chapter 21/Properties.w" +#line 270 "inform7/Chapter 21/Properties.w" -#line 288 "inform7/Chapter 21/Properties.w" +#line 285 "inform7/Chapter 21/Properties.w" specification *Properties__to_specification(property *prn) { if (prn == NULL) internal_error("converted null property to value"); kind *stored = prn->property_value_kind; @@ -78988,9 +79392,9 @@ property *Properties__from_specification(specification *spec) { return prn; } -#line 313 "inform7/Chapter 21/Properties.w" +#line 310 "inform7/Chapter 21/Properties.w" int property_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 314 "inform7/Chapter 21/Properties.w" +#line 311 "inform7/Chapter 21/Properties.w" Articles__remove_the(&w1, &w2); property *prn; LOOP_OVER(prn, property) { @@ -79003,9 +79407,9 @@ int property_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 329 "inform7/Chapter 21/Properties.w" +#line 326 "inform7/Chapter 21/Properties.w" int either_or_property_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 330 "inform7/Chapter 21/Properties.w" +#line 327 "inform7/Chapter 21/Properties.w" Articles__remove_the(&w1, &w2); property *prn; LOOP_OVER(prn, property) @@ -79020,7 +79424,7 @@ int either_or_property_name_NTMR(int w1, int w2, int *X, void **XP) { } int value_property_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 344 "inform7/Chapter 21/Properties.w" +#line 341 "inform7/Chapter 21/Properties.w" Articles__remove_the(&w1, &w2); property *prn; LOOP_OVER(prn, property) @@ -79034,9 +79438,9 @@ int value_property_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 361 "inform7/Chapter 21/Properties.w" +#line 358 "inform7/Chapter 21/Properties.w" int property_name_v_NTMR(int w1, int w2, int *X, void **XP) { -#line 362 "inform7/Chapter 21/Properties.w" +#line 359 "inform7/Chapter 21/Properties.w" property *prn; LOOP_OVER(prn, property) { int pn1 = prn->word_ref1, pn2 = prn->word_ref2; @@ -79048,16 +79452,16 @@ int property_name_v_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 379 "inform7/Chapter 21/Properties.w" +#line 376 "inform7/Chapter 21/Properties.w" int name_looking_like_property_test_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 381 "inform7/Chapter 21/Properties.w" +#line 378 "inform7/Chapter 21/Properties.w" -#line 386 "inform7/Chapter 21/Properties.w" +#line 383 "inform7/Chapter 21/Properties.w" int ambiguous_property_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 387 "inform7/Chapter 21/Properties.w" +#line 384 "inform7/Chapter 21/Properties.w" property *prn; LOOP_OVER(prn, property) if (prn->ambiguous_name) { @@ -79070,7 +79474,7 @@ int ambiguous_property_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 404 "inform7/Chapter 21/Properties.w" +#line 401 "inform7/Chapter 21/Properties.w" int Properties__match_longest(int w1, int w2) { int maxlen = -1; property *prn; @@ -79088,7 +79492,7 @@ int Properties__match_longest(int w1, int w2) { return maxlen; } -#line 425 "inform7/Chapter 21/Properties.w" +#line 422 "inform7/Chapter 21/Properties.w" property *Properties__fast_property_parse(int w1, int w2) { meaning_list *ml; ml = Parser__SP__parse_excerpt(PROPERTY_MC, w1, w2); @@ -79097,7 +79501,7 @@ property *Properties__fast_property_parse(int w1, int w2) { Semantics__Nouns__ExcerptMeanings__data(Parser__SP__MeaningLists__meaning(ml))); } -#line 438 "inform7/Chapter 21/Properties.w" +#line 435 "inform7/Chapter 21/Properties.w" property_permission *Properties__permission_list(property *prn) { return prn->applicable_to; } @@ -79105,7 +79509,7 @@ void Properties__set_permission_list(property *prn, property_permission *pp) { prn->applicable_to = pp; } -#line 448 "inform7/Chapter 21/Properties.w" +#line 445 "inform7/Chapter 21/Properties.w" void Properties__log(property *prn) { Properties__log_basic_pname(prn); if ((logging_to_I6_text) || (prn == NULL)) return; @@ -79123,7 +79527,7 @@ void Properties__log_basic_pname(property *prn) { else { LOG("'%s'", prn->translated_name); } } -#line 471 "inform7/Chapter 21/Properties.w" +#line 468 "inform7/Chapter 21/Properties.w" int Properties__is_either_or(property *prn) { return prn->either_or; } @@ -79132,13 +79536,13 @@ int Properties__is_value_property(property *prn) { return FALSE; } -#line 485 "inform7/Chapter 21/Properties.w" +#line 482 "inform7/Chapter 21/Properties.w" int Properties__can_be_compiled(property *prn) { if ((prn == NULL) || (prn->do_not_compile)) return FALSE; return TRUE; } -#line 494 "inform7/Chapter 21/Properties.w" +#line 491 "inform7/Chapter 21/Properties.w" int Properties__is_shown_in_index(property *prn) { return prn->include_in_index; } @@ -79146,7 +79550,7 @@ void Properties__exclude_from_index(property *prn) { prn->include_in_index = FALSE; } -#line 504 "inform7/Chapter 21/Properties.w" +#line 501 "inform7/Chapter 21/Properties.w" void Properties__set_indexed_already_flag(property *prn, int state) { prn->indexed_already = state; } @@ -79154,7 +79558,7 @@ int Properties__get_indexed_already_flag(property *prn) { return prn->indexed_already; } -#line 514 "inform7/Chapter 21/Properties.w" +#line 511 "inform7/Chapter 21/Properties.w" void Properties__offset_in_runtime_metadata_table_is(property *prn, int pos) { prn->metadata_table_offset = pos; } @@ -79162,7 +79566,7 @@ int Properties__get_offset_in_runtime_metadata_table(property *prn) { return prn->metadata_table_offset; } -#line 531 "inform7/Chapter 21/Properties.w" +#line 528 "inform7/Chapter 21/Properties.w" void Properties__set_translation(property *prn, char *t) { if (prn == NULL) internal_error("translation set for null property"); int i; char *to = prn->translated_name; @@ -79183,7 +79587,7 @@ int Properties__has_been_translated(property *prn) { return prn->translated; } -#line 557 "inform7/Chapter 21/Properties.w" +#line 554 "inform7/Chapter 21/Properties.w" void Properties__translates(int w1, int w2, parse_node *p2) { property *prn = NULL; if (Preform__parse_nt_against_word_range(property_name_NTM, w1, w2, NULL, NULL)) prn = most_recent_result_p; @@ -79191,7 +79595,7 @@ void Properties__translates(int w1, int w2, parse_node *p2) { { -#line 574 "inform7/Chapter 21/Properties.w" +#line 571 "inform7/Chapter 21/Properties.w" if (prn == NULL) { Problems__Issue__sentence_problem(_P_(PM_NonPropertyTranslated), "this property does not exist", @@ -79206,7 +79610,7 @@ void Properties__translates(int w1, int w2, parse_node *p2) { } } -#line 562 "inform7/Chapter 21/Properties.w" +#line 559 "inform7/Chapter 21/Properties.w" ; Properties__set_translation(prn, text); @@ -79215,7 +79619,7 @@ void Properties__translates(int w1, int w2, parse_node *p2) { if (prn->either_or) { -#line 604 "inform7/Chapter 21/Properties.w" +#line 601 "inform7/Chapter 21/Properties.w" property *neg = Properties__EitherOr__get_negation(prn); if (neg) { Properties__EitherOr__make_stored_in_negation(neg); @@ -79223,11 +79627,11 @@ void Properties__translates(int w1, int w2, parse_node *p2) { } } -#line 568 "inform7/Chapter 21/Properties.w" +#line 565 "inform7/Chapter 21/Properties.w" ; } -#line 614 "inform7/Chapter 21/Properties.w" +#line 611 "inform7/Chapter 21/Properties.w" void Properties__alias_translations(OUTPUT_STREAM) { property *prn; LOOP_OVER(prn, property) @@ -79236,7 +79640,7 @@ void Properties__alias_translations(OUTPUT_STREAM) { prn->original_name, prn->translated_name); } -#line 628 "inform7/Chapter 21/Properties.w" +#line 625 "inform7/Chapter 21/Properties.w" int property_traverse_count = 0; void Properties__begin_traverse(void) { property_traverse_count++; @@ -79252,12 +79656,12 @@ int Properties__visited_in_traverse(property *prn) { return FALSE; } -#line 648 "inform7/Chapter 21/Properties.w" +#line 645 "inform7/Chapter 21/Properties.w" possession_marker *Properties__get_possession_marker(property *prn) { return &(prn->pom); } -#line 659 "inform7/Chapter 21/Properties.w" +#line 656 "inform7/Chapter 21/Properties.w" void Properties__compile_inferred_value(OUTPUT_STREAM, inference_subject *infs, property *prn) { if ((prn == NULL) || (Properties__can_be_compiled(prn) == FALSE)) return; while (infs) { @@ -79270,7 +79674,7 @@ void Properties__compile_inferred_value(OUTPUT_STREAM, inference_subject *infs, Properties__Valued__compile_default_value(OUT, prn); } -#line 676 "inform7/Chapter 21/Properties.w" +#line 673 "inform7/Chapter 21/Properties.w" int Properties__compile_property_value_inner(OUTPUT_STREAM, inference_subject *infs, property *prn) { inference *inf; KNOWLEDGE_LOOP(inf, infs, PROPERTY_INF) { @@ -89950,7 +90354,7 @@ action_name *Rules__Bookings__br_required_action(booking *br) { return NULL; } -#line 160 "inform7/Chapter 27/Rulebooks.w" +#line 159 "inform7/Chapter 27/Rulebooks.w" int new_rulebook_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[2]; @@ -89965,7 +90369,7 @@ break; #pragma clang diagnostic pop case 2: { -#line 171 "inform7/Chapter 27/Rulebooks.w" +#line 170 "inform7/Chapter 27/Rulebooks.w" Problems__Issue__sentence_problem(_P_(PM_RulebookWithAt), "this would create a rulebook whose name begins with 'at'", "which is forbidden since it would lead to ambiguities in " @@ -89976,7 +90380,7 @@ break; "a rule inscrutable."); } -#line 163 "inform7/Chapter 27/Rulebooks.w" +#line 162 "inform7/Chapter 27/Rulebooks.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -89984,7 +90388,7 @@ break; #pragma clang diagnostic pop case 3: { -#line 183 "inform7/Chapter 27/Rulebooks.w" +#line 182 "inform7/Chapter 27/Rulebooks.w" Problems__Issue__sentence_problem(_P_(PM_RulebookWithTo), "this would create a rulebook whose name begins with 'to'", "which is forbidden since it would lead to ambiguities in " @@ -89995,7 +90399,7 @@ break; "a rule inscrutable."); } -#line 164 "inform7/Chapter 27/Rulebooks.w" +#line 163 "inform7/Chapter 27/Rulebooks.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -90003,7 +90407,7 @@ break; #pragma clang diagnostic pop case 4: { -#line 195 "inform7/Chapter 27/Rulebooks.w" +#line 194 "inform7/Chapter 27/Rulebooks.w" Problems__Issue__sentence_problem(_P_(PM_RulebookWithDefinition), "this would create a rulebook whose name begins with 'definition'", "which is forbidden since it would lead to ambiguities in " @@ -90014,7 +90418,7 @@ break; "a rule inscrutable."); } -#line 165 "inform7/Chapter 27/Rulebooks.w" +#line 164 "inform7/Chapter 27/Rulebooks.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -90029,16 +90433,16 @@ break; } return TRUE; } -#line 167 "inform7/Chapter 27/Rulebooks.w" +#line 166 "inform7/Chapter 27/Rulebooks.w" -#line 209 "inform7/Chapter 27/Rulebooks.w" +#line 208 "inform7/Chapter 27/Rulebooks.w" int rulebook_name_construction_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 212 "inform7/Chapter 27/Rulebooks.w" +#line 211 "inform7/Chapter 27/Rulebooks.w" -#line 222 "inform7/Chapter 27/Rulebooks.w" +#line 221 "inform7/Chapter 27/Rulebooks.w" rulebook *Rulebooks__new(kind *create_as, int w1, int w2) { rulebook *rb = CREATE(rulebook); @@ -90151,7 +90555,7 @@ int Rulebooks__requires_specific_action(rulebook *rb) { return FALSE; } -#line 338 "inform7/Chapter 27/Rulebooks.w" +#line 337 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__affected_by_placement(rulebook *rb, parse_node *where) { placement_affecting *npl = CREATE(placement_affecting); npl->placement_sentence = where; @@ -90177,7 +90581,7 @@ void Rulebooks__rb_index_placements(rulebook *rb) { } } -#line 367 "inform7/Chapter 27/Rulebooks.w" +#line 366 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__focus(rulebook *rb) { return Rulebooks__Outcomes__get_focus(&(rb->my_focus)); } @@ -90214,12 +90618,12 @@ int Rulebooks__runs_during_activities(rulebook *rb) { return rb->runs_during_activities; } -#line 407 "inform7/Chapter 27/Rulebooks.w" +#line 406 "inform7/Chapter 27/Rulebooks.w" int rulebook_variable_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 414 "inform7/Chapter 27/Rulebooks.w" +#line 413 "inform7/Chapter 27/Rulebooks.w" *X = NOT_APPLICABLE; Problems__quote_source(1, current_sentence); Problems__quote_words(2, w1, w2); @@ -90233,7 +90637,7 @@ int rulebook_variable_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, in Problems__issue_problem_end(); } -#line 408 "inform7/Chapter 27/Rulebooks.w" +#line 407 "inform7/Chapter 27/Rulebooks.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -90248,9 +90652,9 @@ break; } return TRUE; } -#line 410 "inform7/Chapter 27/Rulebooks.w" +#line 409 "inform7/Chapter 27/Rulebooks.w" -#line 429 "inform7/Chapter 27/Rulebooks.w" +#line 428 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__add_variable(rulebook *rb, parse_node *cnode) { specification *spec; int nw1, nw2, tw1, tw2; @@ -90364,7 +90768,7 @@ void Rulebooks__rulebook_var_creators_lookup(OUTPUT_STREAM) { WRITE("#endif;\n"); } -#line 545 "inform7/Chapter 27/Rulebooks.w" +#line 544 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__log_name_only(rulebook *rb) { LOG("Rulebook %d ($W)", rb->allocation_id, rb->word_ref1, rb->word_ref2); } @@ -90402,16 +90806,16 @@ void Rulebooks__index_action_rules(action_name *an, rulebook *rb, if (t > 0) INDEX("
"); } -#line 593 "inform7/Chapter 27/Rulebooks.w" +#line 592 "inform7/Chapter 27/Rulebooks.w" int rulebook_stem_NTMR(int w1, int w2, int *X, void **XP) { -#line 594 "inform7/Chapter 27/Rulebooks.w" +#line 593 "inform7/Chapter 27/Rulebooks.w" rulebook_match rm = Rulebooks__rb_match_from_description(w1, w2); if (rm.matched_rulebook == NULL) return FALSE; parsed_rm = rm; return w1 + rm.advance_words - 1; } -#line 621 "inform7/Chapter 27/Rulebooks.w" +#line 620 "inform7/Chapter 27/Rulebooks.w" int rulebook_stem_inner_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = INDEF_ART; place_NTMV = R[2]; @@ -90433,7 +90837,7 @@ break; } return TRUE; } -#line 625 "inform7/Chapter 27/Rulebooks.w" +#line 624 "inform7/Chapter 27/Rulebooks.w" int rulebook_stem_inner_unarticled_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -90466,7 +90870,7 @@ break; } return TRUE; } -#line 632 "inform7/Chapter 27/Rulebooks.w" +#line 631 "inform7/Chapter 27/Rulebooks.w" int rulebook_stem_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -90489,9 +90893,9 @@ break; } return TRUE; } -#line 637 "inform7/Chapter 27/Rulebooks.w" +#line 636 "inform7/Chapter 27/Rulebooks.w" -#line 641 "inform7/Chapter 27/Rulebooks.w" +#line 640 "inform7/Chapter 27/Rulebooks.w" rulebook_match Rulebooks__rb_match_from_description(int w1, int w2) { int initial_w1 = w1, modifier_words; int art = NO_ART, pl = MIDDLE_PLACEMENT; @@ -90563,7 +90967,7 @@ rulebook_match Rulebooks__rb_match_from_description(int w1, int w2) { return rm; } -#line 731 "inform7/Chapter 27/Rulebooks.w" +#line 730 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__attach_rule(rulebook *rb, booking *the_new_rule, int placing, int side, rule *ref_rule) { LOGIF(RULE_ATTACHMENTS, "Attaching booked rule $b at sentence:\n $T", @@ -90628,7 +91032,7 @@ void Rulebooks__detach_rule(rulebook *rb, rule *the_new_rule) { Rules__Bookings__list_remove(rb->rule_list, the_new_rule); } -#line 801 "inform7/Chapter 27/Rulebooks.w" +#line 800 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__compile_rule_phrases(rulebook *rb, OUTPUT_STREAM, int *i, int max_i) { Rules__Bookings__list_judge_ordering(rb->rule_list); if (Rules__Bookings__list_is_empty_of_i7_rules(rb->rule_list)) return; @@ -90680,7 +91084,7 @@ void Rulebooks__RulebookNames_array(OUTPUT_STREAM) { OUTDENT; WRITE(";\n\n"); } -#line 863 "inform7/Chapter 27/Rulebooks.w" +#line 862 "inform7/Chapter 27/Rulebooks.w" int rulebook_property_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRUE; @@ -90695,14 +91099,14 @@ break; #pragma clang diagnostic pop case 2: { -#line 871 "inform7/Chapter 27/Rulebooks.w" +#line 870 "inform7/Chapter 27/Rulebooks.w" *X = NOT_APPLICABLE; Problems__Issue__sentence_problem(_P_(PM_NonOutcomeProperty), "the only properties of a rulebook are its outcomes", "for the time being at least."); } -#line 866 "inform7/Chapter 27/Rulebooks.w" +#line 865 "inform7/Chapter 27/Rulebooks.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -90712,9 +91116,9 @@ break; } return TRUE; } -#line 867 "inform7/Chapter 27/Rulebooks.w" +#line 866 "inform7/Chapter 27/Rulebooks.w" -#line 879 "inform7/Chapter 27/Rulebooks.w" +#line 878 "inform7/Chapter 27/Rulebooks.w" outcomes *outcomes_being_parsed = NULL; void Rulebooks__parse_properties(rulebook *rb, int w1, int w2) { @@ -90732,12 +91136,12 @@ kind *Rulebooks__kind_from_context(void) { return NULL; } -#line 901 "inform7/Chapter 27/Rulebooks.w" +#line 900 "inform7/Chapter 27/Rulebooks.w" void Rulebooks__index_page(int n) { if (n == 1) { { -#line 985 "inform7/Chapter 27/Rulebooks.w" +#line 984 "inform7/Chapter 27/Rulebooks.w" INDEX("

Rules governing actions

"); INDEX("

These rules are the ones which tell Inform how actions work, " "and which affect how they happen in particular cases.

"); @@ -90764,11 +91168,11 @@ void Rulebooks__index_page(int n) { "to index here.", 1, TRUE); } -#line 903 "inform7/Chapter 27/Rulebooks.w" +#line 902 "inform7/Chapter 27/Rulebooks.w" ; { -#line 947 "inform7/Chapter 27/Rulebooks.w" +#line 946 "inform7/Chapter 27/Rulebooks.w" INDEX("

Rules added to the sequence of play

"); INDEX("

These rulebooks are the best places to put rules timed to happen " "at the start, at the end, or once each turn. (Each is run through at " @@ -90784,11 +91188,11 @@ void Rulebooks__index_page(int n) { built_in_rulebooks[WHEN_PLAY_ENDS_RB], NULL, NULL, 1, TRUE); } -#line 904 "inform7/Chapter 27/Rulebooks.w" +#line 903 "inform7/Chapter 27/Rulebooks.w" ; { -#line 964 "inform7/Chapter 27/Rulebooks.w" +#line 963 "inform7/Chapter 27/Rulebooks.w" INDEX("

How commands are understood

"); INDEX("

'Understanding' here means turning a typed command, like GET FISH, " "into one or more actions, like taking the red herring. This is all handled " @@ -90808,11 +91212,11 @@ void Rulebooks__index_page(int n) { Activities__index_by_number(IMPLICITLY_TAKING_ACT, 1); } -#line 905 "inform7/Chapter 27/Rulebooks.w" +#line 904 "inform7/Chapter 27/Rulebooks.w" ; { -#line 1058 "inform7/Chapter 27/Rulebooks.w" +#line 1057 "inform7/Chapter 27/Rulebooks.w" INDEX("

How things are described

"); INDEX("

These activities control what is printed when naming rooms or " "things, and their descriptions.

"); @@ -90830,11 +91234,11 @@ void Rulebooks__index_page(int n) { Activities__index_by_number(PRINTING_LOCALE_PARAGRAPH_ACT, 1); } -#line 906 "inform7/Chapter 27/Rulebooks.w" +#line 905 "inform7/Chapter 27/Rulebooks.w" ; { -#line 1034 "inform7/Chapter 27/Rulebooks.w" +#line 1033 "inform7/Chapter 27/Rulebooks.w" INDEX("

How accessibility is judged

"); INDEX("

These rulebooks are used when deciding who can reach what, and " "who can see what.

"); @@ -90846,11 +91250,11 @@ void Rulebooks__index_page(int n) { built_in_rulebooks[VISIBILITY_RB], NULL, NULL, 1, TRUE); } -#line 907 "inform7/Chapter 27/Rulebooks.w" +#line 906 "inform7/Chapter 27/Rulebooks.w" ; { -#line 1047 "inform7/Chapter 27/Rulebooks.w" +#line 1046 "inform7/Chapter 27/Rulebooks.w" INDEX("

Light and darkness

"); INDEX("

These activities control how we describe darkness.

"); Activities__index_by_number(PRINTING_NAME_OF_DARK_ROOM_ACT, 1); @@ -90860,11 +91264,11 @@ void Rulebooks__index_page(int n) { Activities__index_by_number(REFUSAL_TO_ACT_IN_DARK_ACT, 1); } -#line 908 "inform7/Chapter 27/Rulebooks.w" +#line 907 "inform7/Chapter 27/Rulebooks.w" ; { -#line 926 "inform7/Chapter 27/Rulebooks.w" +#line 925 "inform7/Chapter 27/Rulebooks.w" INDEX("

The top level

"); INDEX("

An Inform story file spends its whole time working through " "these three master rulebooks. They can be altered, just as all " @@ -90884,11 +91288,11 @@ void Rulebooks__index_page(int n) { } -#line 909 "inform7/Chapter 27/Rulebooks.w" +#line 908 "inform7/Chapter 27/Rulebooks.w" ; { -#line 1013 "inform7/Chapter 27/Rulebooks.w" +#line 1012 "inform7/Chapter 27/Rulebooks.w" INDEX("

How actions are processed

"); INDEX("

These form the technical machinery for dealing with actions, and are " "called on at least once every turn. They seldom need to be changed.

"); @@ -90900,29 +91304,29 @@ void Rulebooks__index_page(int n) { built_in_rulebooks[PLAYERS_ACTION_AWARENESS_RB], NULL, NULL, 3, TRUE); } -#line 910 "inform7/Chapter 27/Rulebooks.w" +#line 909 "inform7/Chapter 27/Rulebooks.w" ; { -#line 1026 "inform7/Chapter 27/Rulebooks.w" +#line 1025 "inform7/Chapter 27/Rulebooks.w" INDEX("

How responses are printed

"); INDEX("

The Standard Rules, and some extensions, reply to the player's " "commands with messages which are able to be modified.

"); Activities__index_by_number(PRINTING_RESPONSE_ACT, 1); } -#line 911 "inform7/Chapter 27/Rulebooks.w" +#line 910 "inform7/Chapter 27/Rulebooks.w" ; } else { if (Rulebooks__noteworthy_rulebooks(NULL) > 0) { -#line 1077 "inform7/Chapter 27/Rulebooks.w" +#line 1076 "inform7/Chapter 27/Rulebooks.w" INDEX("

From the source text

"); extension_file *ef = NULL; /* that is, not in an extension at all */ { -#line 1092 "inform7/Chapter 27/Rulebooks.w" +#line 1091 "inform7/Chapter 27/Rulebooks.w" activity *av; rulebook *rb; LOOP_OVER(rb, rulebook) { @@ -90940,11 +91344,11 @@ void Rulebooks__index_page(int n) { } } -#line 1079 "inform7/Chapter 27/Rulebooks.w" +#line 1078 "inform7/Chapter 27/Rulebooks.w" ; } -#line 914 "inform7/Chapter 27/Rulebooks.w" +#line 913 "inform7/Chapter 27/Rulebooks.w" ; extension_file *ef; LOOP_OVER(ef, extension_file) @@ -90952,13 +91356,13 @@ void Rulebooks__index_page(int n) { if (Rulebooks__noteworthy_rulebooks(ef) > 0) { -#line 1084 "inform7/Chapter 27/Rulebooks.w" +#line 1083 "inform7/Chapter 27/Rulebooks.w" INDEX("

From the extension "); Extensions__IDs__write_to_HTML_file(ifl, Extensions__Files__get_eid(ef), FALSE); INDEX("

"); { -#line 1092 "inform7/Chapter 27/Rulebooks.w" +#line 1091 "inform7/Chapter 27/Rulebooks.w" activity *av; rulebook *rb; LOOP_OVER(rb, rulebook) { @@ -90976,16 +91380,16 @@ void Rulebooks__index_page(int n) { } } -#line 1087 "inform7/Chapter 27/Rulebooks.w" +#line 1086 "inform7/Chapter 27/Rulebooks.w" ; } -#line 919 "inform7/Chapter 27/Rulebooks.w" +#line 918 "inform7/Chapter 27/Rulebooks.w" ; } } -#line 1111 "inform7/Chapter 27/Rulebooks.w" +#line 1110 "inform7/Chapter 27/Rulebooks.w" int Rulebooks__noteworthy_rulebooks(extension_file *ef) { int nb = 0; activity *av; @@ -91037,7 +91441,7 @@ void Rulebooks__index_rules_box(char *name, int w1, int w2, char *doc_link, INDEX("%s", textual_name); { -#line 1225 "inform7/Chapter 27/Rulebooks.w" +#line 1224 "inform7/Chapter 27/Rulebooks.w" if (doc_link) Index__DocReferences__link(doc_link); INDEX(" ... "); if (av) INDEX(" activity"); else { @@ -91054,7 +91458,7 @@ void Rulebooks__index_rules_box(char *name, int w1, int w2, char *doc_link, if (wn >= 0) Index__link(wn); } -#line 1160 "inform7/Chapter 27/Rulebooks.w" +#line 1159 "inform7/Chapter 27/Rulebooks.w" ; INDEX(" (%d rule%s)", n, (n==1)?"":"s"); if (n == 0) INDEX(""); @@ -91074,7 +91478,7 @@ void Rulebooks__index_rules_box(char *name, int w1, int w2, char *doc_link, INDEX("%s", textual_name); { -#line 1225 "inform7/Chapter 27/Rulebooks.w" +#line 1224 "inform7/Chapter 27/Rulebooks.w" if (doc_link) Index__DocReferences__link(doc_link); INDEX(" ... "); if (av) INDEX(" activity"); else { @@ -91091,7 +91495,7 @@ void Rulebooks__index_rules_box(char *name, int w1, int w2, char *doc_link, if (wn >= 0) Index__link(wn); } -#line 1177 "inform7/Chapter 27/Rulebooks.w" +#line 1176 "inform7/Chapter 27/Rulebooks.w" ; INDEX("

"); @@ -93452,7 +93856,7 @@ void Phrases__Manager__compile_as_needed(OUTPUT_STREAM) { } } -#line 105 "inform7/Chapter 28/Phrases.w" +#line 87 "inform7/Chapter 28/Phrases.w" void Phrases__create_from_preamble(parse_node *p) { if ((p == NULL) || (ParseTree__type(p) != ROUTINE_NT)) internal_error("a phrase preamble should be at a ROUTINE_NT node"); @@ -93463,7 +93867,7 @@ void Phrases__create_from_preamble(parse_node *p) { { -#line 142 "inform7/Chapter 28/Phrases.w" +#line 124 "inform7/Chapter 28/Phrases.w" if ((p->down) && (p->down->next == NULL)) Phrases__parse_possible_inline_defn( p->down->word_ref1, p->down->word_ref2, &inline_wn, &mor); @@ -93472,7 +93876,7 @@ void Phrases__create_from_preamble(parse_node *p) { if (Platform__strlen(inline_defn) >= MAX_INLINE_DEFN_LENGTH) { -#line 283 "inform7/Chapter 28/Phrases.w" +#line 265 "inform7/Chapter 28/Phrases.w" LOG("Inline definition: <%s>\n", inline_defn); Problems__Issue__sentence_problem(_P_(PM_InlineTooLong), "the inline definition of this 'to...' phrase is too long", @@ -93482,12 +93886,12 @@ void Phrases__create_from_preamble(parse_node *p) { inline_defn[MAX_INLINE_DEFN_LENGTH-1] = 0; } -#line 148 "inform7/Chapter 28/Phrases.w" +#line 130 "inform7/Chapter 28/Phrases.w" ; } } -#line 113 "inform7/Chapter 28/Phrases.w" +#line 95 "inform7/Chapter 28/Phrases.w" ; ph_options_data phod; @@ -93498,40 +93902,40 @@ void Phrases__create_from_preamble(parse_node *p) { { -#line 154 "inform7/Chapter 28/Phrases.w" +#line 136 "inform7/Chapter 28/Phrases.w" phud = Phrases__Usage__new(p->word_ref1, p->word_ref2, FALSE); } -#line 121 "inform7/Chapter 28/Phrases.w" +#line 103 "inform7/Chapter 28/Phrases.w" ; int effect = Phrases__Usage__get_effect(&phud); if ((inline_wn >= 0) && (effect != TO_PHRASE_EFF)) { -#line 294 "inform7/Chapter 28/Phrases.w" +#line 276 "inform7/Chapter 28/Phrases.w" Problems__Issue__sentence_problem(_P_(PM_InlineRule), "only 'to...' phrases can be given inline Inform 6 definitions", "and in particular rules and adjective definitions can't."); } -#line 124 "inform7/Chapter 28/Phrases.w" +#line 106 "inform7/Chapter 28/Phrases.w" ; if ((effect != DEFINITIONAL_PHRASE_EFF) && (p->down == NULL)) { -#line 276 "inform7/Chapter 28/Phrases.w" +#line 258 "inform7/Chapter 28/Phrases.w" Problems__Issue__sentence_problem(_P_(PM_Undefined), "there doesn't seem to be any definition here", "so I can't see what this rule or phrase would do."); } -#line 127 "inform7/Chapter 28/Phrases.w" +#line 109 "inform7/Chapter 28/Phrases.w" ; { -#line 159 "inform7/Chapter 28/Phrases.w" +#line 141 "inform7/Chapter 28/Phrases.w" int x1 = -1, x2 = -1; Phrases__Usage__get_preamble_text(&phud, &x1, &x2); phtd = Phrases__TypeData__new(); @@ -93550,19 +93954,19 @@ void Phrases__create_from_preamble(parse_node *p) { } } -#line 129 "inform7/Chapter 28/Phrases.w" +#line 111 "inform7/Chapter 28/Phrases.w" ; { -#line 179 "inform7/Chapter 28/Phrases.w" +#line 161 "inform7/Chapter 28/Phrases.w" phod = Phrases__Options__parse_declared_options(ow1, ow2); } -#line 130 "inform7/Chapter 28/Phrases.w" +#line 112 "inform7/Chapter 28/Phrases.w" ; { -#line 191 "inform7/Chapter 28/Phrases.w" +#line 173 "inform7/Chapter 28/Phrases.w" phsf = Frames__new(); Phrases__TypeData__into_stack_frame(&phsf, &phtd, Phrases__TypeData__kind(&phtd), TRUE); @@ -93570,21 +93974,21 @@ void Phrases__create_from_preamble(parse_node *p) { LocalVariables__options_parameter_is_needed(&phsf); } -#line 131 "inform7/Chapter 28/Phrases.w" +#line 113 "inform7/Chapter 28/Phrases.w" ; { -#line 200 "inform7/Chapter 28/Phrases.w" +#line 182 "inform7/Chapter 28/Phrases.w" phrcd = Phrases__Context__new(); } -#line 132 "inform7/Chapter 28/Phrases.w" +#line 114 "inform7/Chapter 28/Phrases.w" ; phrase *new_ph; { -#line 244 "inform7/Chapter 28/Phrases.w" +#line 226 "inform7/Chapter 28/Phrases.w" int x1 = -1, x2 = -1; Phrases__Usage__get_preamble_text(&phud, &x1, &x2); LOGIF(PHRASE_CREATIONS, "Creating phrase: <$W>\n$U", x1, x2, &phud); @@ -93615,11 +94019,11 @@ void Phrases__create_from_preamble(parse_node *p) { new_ph->ph_documentation_symbol_wn = documentation_wn; } -#line 135 "inform7/Chapter 28/Phrases.w" +#line 117 "inform7/Chapter 28/Phrases.w" ; { -#line 205 "inform7/Chapter 28/Phrases.w" +#line 187 "inform7/Chapter 28/Phrases.w" switch (effect) { case TO_PHRASE_EFF: Routines__ToPhrases__new(new_ph); @@ -93627,14 +94031,14 @@ void Phrases__create_from_preamble(parse_node *p) { case DEFINITIONAL_PHRASE_EFF: { -#line 236 "inform7/Chapter 28/Phrases.w" +#line 218 "inform7/Chapter 28/Phrases.w" int cw1 = -1, cw2 = -1; kind *K = NULL; Phrases__Phrasal__define_adjective_by_phrase(p, new_ph, &cw1, &cw2, &K); LocalVariables__add_pronoun(&(new_ph->stack_frame), cw1, cw2, K); } -#line 210 "inform7/Chapter 28/Phrases.w" +#line 192 "inform7/Chapter 28/Phrases.w" ; break; case RULE_IN_RULEBOOK_EFF: @@ -93649,11 +94053,11 @@ void Phrases__create_from_preamble(parse_node *p) { } } -#line 136 "inform7/Chapter 28/Phrases.w" +#line 118 "inform7/Chapter 28/Phrases.w" ; } -#line 307 "inform7/Chapter 28/Phrases.w" +#line 289 "inform7/Chapter 28/Phrases.w" int inline_phrase_definition_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = DECIDES_NOTHING_MOR; inlinecode_NTMV = inline_phrase_definition_NTM->range_result_w1[1]; @@ -93678,7 +94082,7 @@ break; #pragma clang diagnostic pop case 4: *X = UNKNOWN; inlinecode_NTMV = inline_phrase_definition_NTM->range_result_w1[1]; { -#line 317 "inform7/Chapter 28/Phrases.w" +#line 299 "inform7/Chapter 28/Phrases.w" *X = UNKNOWN; Problems__Issue__sentence_problem(_P_(PM_TailAfterInline), "some unexpected text appears after the tail of an inline definition", @@ -93686,7 +94090,7 @@ break; "Inform 6. Here, there seems to be something extra after the '-)'."); } -#line 312 "inform7/Chapter 28/Phrases.w" +#line 294 "inform7/Chapter 28/Phrases.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93696,16 +94100,16 @@ break; } return TRUE; } -#line 313 "inform7/Chapter 28/Phrases.w" +#line 295 "inform7/Chapter 28/Phrases.w" -#line 326 "inform7/Chapter 28/Phrases.w" +#line 308 "inform7/Chapter 28/Phrases.w" void Phrases__parse_possible_inline_defn(int w1, int w2, int *wn, int *mor) { LOGIF(MATCHING, "form of inline: $W\n", w1, w2); *wn = -1; if (Preform__parse_nt_against_word_range(inline_phrase_definition_NTM, w1, w2, NULL, NULL)) { *wn = inlinecode_NTMV; *mor = most_recent_result; } } -#line 336 "inform7/Chapter 28/Phrases.w" +#line 318 "inform7/Chapter 28/Phrases.w" void Phrases__log(phrase *ph) { if (ph == NULL) { LOG("RULE:NULL"); return; } LOG("%s", ph->ph_I6_identifier); @@ -93716,12 +94120,12 @@ void Phrases__log_briefly(phrase *ph) { Phrases__TypeData__Textual__log_briefly(&(ph->type_data)); } -#line 349 "inform7/Chapter 28/Phrases.w" +#line 331 "inform7/Chapter 28/Phrases.w" void Phrases__write_HTML_representation(OUTPUT_STREAM, phrase *ph, int format) { Phrases__TypeData__Textual__write_HTML_representation(OUT, &(ph->type_data), format, NULL); } -#line 356 "inform7/Chapter 28/Phrases.w" +#line 338 "inform7/Chapter 28/Phrases.w" char *Phrases__get_inline_definition(phrase *ph) { if (ph->inline_wn < 0) internal_error("tried to access inline definition of non-inline phrase"); @@ -93736,7 +94140,7 @@ parse_node *Phrases__declaration_node(phrase *ph) { return ph->declaration_node; } -#line 377 "inform7/Chapter 28/Phrases.w" +#line 359 "inform7/Chapter 28/Phrases.w" void Phrases__compile(OUTPUT_STREAM, phrase *ph, int *i, int max_i, stacked_variable_owner_list *legible, to_phrase_request *req, applicability_condition *acl) { @@ -93745,7 +94149,7 @@ void Phrases__compile(OUTPUT_STREAM, phrase *ph, int *i, int max_i, Routines__Compile__routine(OUT, ph, legible, req, acl); { -#line 395 "inform7/Chapter 28/Phrases.w" +#line 377 "inform7/Chapter 28/Phrases.w" if (ph->at_least_one_compiled_form_needed) { ph->at_least_one_compiled_form_needed = FALSE; (*i)++; @@ -93753,14 +94157,14 @@ void Phrases__compile(OUTPUT_STREAM, phrase *ph, int *i, int max_i, } } -#line 383 "inform7/Chapter 28/Phrases.w" +#line 365 "inform7/Chapter 28/Phrases.w" ; } else { if (ph->at_least_one_compiled_form_needed) { Routines__Compile__routine(OUT, ph, legible, NULL, acl); { -#line 395 "inform7/Chapter 28/Phrases.w" +#line 377 "inform7/Chapter 28/Phrases.w" if (ph->at_least_one_compiled_form_needed) { ph->at_least_one_compiled_form_needed = FALSE; (*i)++; @@ -93768,25 +94172,25 @@ void Phrases__compile(OUTPUT_STREAM, phrase *ph, int *i, int max_i, } } -#line 387 "inform7/Chapter 28/Phrases.w" +#line 369 "inform7/Chapter 28/Phrases.w" ; } } } -#line 54 "inform7/Chapter 28/Phrase Usage.w" +#line 53 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__predeclare_name_in(parse_node *p) { ph_usage_data phud = Phrases__Usage__new(p->word_ref1, p->word_ref2, TRUE); if (phud.explicit_name_w1 >= 0) Rules__new(phud.explicit_name_w1, phud.explicit_name_w2, TRUE); } -#line 75 "inform7/Chapter 28/Phrase Usage.w" +#line 74 "inform7/Chapter 28/Phrase Usage.w" rule *Phrases__Usage__to_rule(ph_usage_data *phud, phrase *ph) { int rw1 = -1, rw2 = -1, explicitly = FALSE; { -#line 93 "inform7/Chapter 28/Phrase Usage.w" +#line 92 "inform7/Chapter 28/Phrase Usage.w" if (phud->event_name_w1 >= 0) { rw1 = phud->event_name_w1; rw2 = phud->event_name_w2; } else { @@ -93796,14 +94200,14 @@ rule *Phrases__Usage__to_rule(ph_usage_data *phud, phrase *ph) { if (rw1 >= 0) Articles__remove_the(&rw1, &rw2); } -#line 77 "inform7/Chapter 28/Phrase Usage.w" +#line 76 "inform7/Chapter 28/Phrase Usage.w" ; rule *R = NULL; if (rw1 >= 0) R = Rules__by_name(rw1, rw2); if (R) { -#line 104 "inform7/Chapter 28/Phrase Usage.w" +#line 103 "inform7/Chapter 28/Phrase Usage.w" phrase *ph_found = Rules__get_I7_definition(R); if ((ph_found) && (ph_found != ph)) { Problems__quote_source(1, current_sentence); @@ -93816,14 +94220,14 @@ rule *Phrases__Usage__to_rule(ph_usage_data *phud, phrase *ph) { } } -#line 81 "inform7/Chapter 28/Phrase Usage.w" +#line 80 "inform7/Chapter 28/Phrase Usage.w" else R = Rules__new(rw1, rw2, explicitly); Rules__set_I7_definition(R, ph); { -#line 118 "inform7/Chapter 28/Phrase Usage.w" +#line 117 "inform7/Chapter 28/Phrase Usage.w" int ix1 = phud->rule_parameter_w1, ix2 = phud->rule_parameter_w2; if (phud->whenwhile_w1 >= 0) { if (phud->whenwhile_w1 == phud->rule_parameter_w2 + 1) { @@ -93835,13 +94239,13 @@ rule *Phrases__Usage__to_rule(ph_usage_data *phud, phrase *ph) { Rules__set_italicised_index_text(R, ix1, ix2); } -#line 85 "inform7/Chapter 28/Phrase Usage.w" +#line 84 "inform7/Chapter 28/Phrase Usage.w" ; return R; } -#line 137 "inform7/Chapter 28/Phrase Usage.w" +#line 136 "inform7/Chapter 28/Phrase Usage.w" int rule_preamble_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = DEFINITIONAL_PHRASE_EFF; @@ -93856,14 +94260,14 @@ break; #pragma clang diagnostic pop case 2: { -#line 157 "inform7/Chapter 28/Phrase Usage.w" +#line 156 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_NamelessRule), "there are many rules in Inform", "so you need to give a name: 'this is the abolish dancing rule', say, " "not just 'this is the rule'."); } -#line 140 "inform7/Chapter 28/Phrase Usage.w" +#line 139 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93871,7 +94275,7 @@ break; #pragma clang diagnostic pop case 3: { -#line 165 "inform7/Chapter 28/Phrase Usage.w" +#line 164 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_UnarticledRule), "a rule must be given a definite name", "which begins with 'the', just to emphasise that it is the only one " @@ -93879,7 +94283,7 @@ break; "'this is promote dancing rule'."); } -#line 141 "inform7/Chapter 28/Phrase Usage.w" +#line 140 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93892,13 +94296,13 @@ break; #pragma clang diagnostic pop case 5: { -#line 174 "inform7/Chapter 28/Phrase Usage.w" +#line 173 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_BareTo), "'to' what? No name is given", "which means that this would not define a new phrase."); } -#line 143 "inform7/Chapter 28/Phrase Usage.w" +#line 142 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93906,14 +94310,14 @@ break; #pragma clang diagnostic pop case 6: { -#line 181 "inform7/Chapter 28/Phrase Usage.w" +#line 180 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_DontCallPhrasesWithCalled), "phrases aren't named using 'called'", "and instead use 'this is...'. For example, 'To salute (called saluting)' " "isn't allowed, but 'To salute (this is saluting)' is."); } -#line 144 "inform7/Chapter 28/Phrase Usage.w" +#line 143 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93946,14 +94350,14 @@ break; #pragma clang diagnostic pop case 12: { -#line 157 "inform7/Chapter 28/Phrase Usage.w" +#line 156 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_NamelessRule), "there are many rules in Inform", "so you need to give a name: 'this is the abolish dancing rule', say, " "not just 'this is the rule'."); } -#line 150 "inform7/Chapter 28/Phrase Usage.w" +#line 149 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93961,7 +94365,7 @@ break; #pragma clang diagnostic pop case 13: { -#line 165 "inform7/Chapter 28/Phrase Usage.w" +#line 164 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_UnarticledRule), "a rule must be given a definite name", "which begins with 'the', just to emphasise that it is the only one " @@ -93969,7 +94373,7 @@ break; "'this is promote dancing rule'."); } -#line 151 "inform7/Chapter 28/Phrase Usage.w" +#line 150 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -93984,16 +94388,16 @@ break; } return TRUE; } -#line 153 "inform7/Chapter 28/Phrase Usage.w" +#line 152 "inform7/Chapter 28/Phrase Usage.w" -#line 191 "inform7/Chapter 28/Phrase Usage.w" +#line 190 "inform7/Chapter 28/Phrase Usage.w" int now_phrase_preamble_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 193 "inform7/Chapter 28/Phrase Usage.w" +#line 192 "inform7/Chapter 28/Phrase Usage.w" -#line 201 "inform7/Chapter 28/Phrase Usage.w" +#line 200 "inform7/Chapter 28/Phrase Usage.w" int rule_preamble_fine_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; specification_scenes_NTMV = RP[2]; @@ -94010,7 +94414,7 @@ break; } return TRUE; } -#line 204 "inform7/Chapter 28/Phrase Usage.w" +#line 203 "inform7/Chapter 28/Phrase Usage.w" int rule_preamble_finer_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -94033,7 +94437,7 @@ break; } return TRUE; } -#line 209 "inform7/Chapter 28/Phrase Usage.w" +#line 208 "inform7/Chapter 28/Phrase Usage.w" int rulebook_stem_embellished_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -94056,7 +94460,7 @@ break; } return TRUE; } -#line 214 "inform7/Chapter 28/Phrase Usage.w" +#line 213 "inform7/Chapter 28/Phrase Usage.w" int rulebook_bud_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -94079,16 +94483,16 @@ break; } return TRUE; } -#line 219 "inform7/Chapter 28/Phrase Usage.w" +#line 218 "inform7/Chapter 28/Phrase Usage.w" -#line 233 "inform7/Chapter 28/Phrase Usage.w" +#line 232 "inform7/Chapter 28/Phrase Usage.w" int no_now_phrases = 0; ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { ph_usage_data phud; { -#line 262 "inform7/Chapter 28/Phrase Usage.w" +#line 261 "inform7/Chapter 28/Phrase Usage.w" phud.full_preamble_w1 = w1; phud.full_preamble_w2 = w2; phud.constant_phrase_holder = NULL; phud.phrase_effect = AS_YET_UNKNOWN_EFF; @@ -94106,7 +94510,7 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { phud.explicit_name_for_inverse = -1; } -#line 237 "inform7/Chapter 28/Phrase Usage.w" +#line 236 "inform7/Chapter 28/Phrase Usage.w" ; if (Preform__parse_nt_against_word_range(rule_preamble_NTM, w1, w2, NULL, NULL)) { @@ -94115,13 +94519,13 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { case TO_PHRASE_EFF: { -#line 281 "inform7/Chapter 28/Phrase Usage.w" +#line 280 "inform7/Chapter 28/Phrase Usage.w" phud.rule_preamble_w1 = w1; phud.rule_preamble_w2 = w2; if (named_NTMV) { -#line 301 "inform7/Chapter 28/Phrase Usage.w" +#line 300 "inform7/Chapter 28/Phrase Usage.w" int n1 = -1, n2 = -1, r1 = -1, r2 = -1; GET_RW(rule_preamble_NTM, 1, r1, r2); GET_RW(rule_preamble_NTM, 2, n1, n2); @@ -94168,7 +94572,7 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { phud.rule_preamble_w2 = r2; } -#line 284 "inform7/Chapter 28/Phrase Usage.w" +#line 283 "inform7/Chapter 28/Phrase Usage.w" ; if (Preform__parse_nt_against_word_range(now_phrase_preamble_NTM, w1, w2, NULL, NULL)) { if ((coarse_mode) && (no_now_phrases++ == 1)) { @@ -94182,7 +94586,7 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { } } -#line 243 "inform7/Chapter 28/Phrase Usage.w" +#line 242 "inform7/Chapter 28/Phrase Usage.w" ; break; case DEFINITIONAL_PHRASE_EFF: @@ -94190,14 +94594,14 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { case RULE_IN_RULEBOOK_EFF: { -#line 349 "inform7/Chapter 28/Phrase Usage.w" +#line 348 "inform7/Chapter 28/Phrase Usage.w" if (named_NTMV) { GET_RW(rule_preamble_NTM, 1, w1, w2); GET_RW(rule_preamble_NTM, 2, (phud.explicit_name_w1), (phud.explicit_name_w2)); } if (coarse_mode == FALSE) { -#line 375 "inform7/Chapter 28/Phrase Usage.w" +#line 374 "inform7/Chapter 28/Phrase Usage.w" Preform__parse_nt_against_word_range(rule_preamble_fine_NTM, w1, w2, NULL, NULL); GET_RW(rule_preamble_finer_NTM, 1, w1, w2); if (most_recent_result == NOT_APPLICABLE) { @@ -94211,7 +94615,7 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { phud.owning_rulebook_placement = parsed_rm.placement_requested; { -#line 498 "inform7/Chapter 28/Phrase Usage.w" +#line 495 "inform7/Chapter 28/Phrase Usage.w" if ((parsed_rm.article_used == DEF_ART) && (parsed_rm.placement_requested == MIDDLE_PLACEMENT)) Problems__Issue__sentence_problem(_P_(PM_RuleWithDefiniteArticle), @@ -94220,11 +94624,11 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { "write 'a before rule: ...' instead."); } -#line 386 "inform7/Chapter 28/Phrase Usage.w" +#line 385 "inform7/Chapter 28/Phrase Usage.w" ; { -#line 396 "inform7/Chapter 28/Phrase Usage.w" +#line 395 "inform7/Chapter 28/Phrase Usage.w" int b1 = bud1_NTMV, b2 = bud2_NTMV; if ((b1 == -1) || (b1 > b2)) { b1 = parsed_rm.match_from + parsed_rm.advance_words; @@ -94263,8 +94667,6 @@ ph_usage_data Phrases__Usage__new(int w1, int w2, int coarse_mode) { c1 = b1; c2 = b2; } -LOG("So, bud = $W\n", c1, c2); - if (c1 <= c2) { phud.rule_parameter_w1 = c1; phud.rule_parameter_w2 = c2; @@ -94280,24 +94682,24 @@ LOG("So, bud = $W\n", c1, c2); } } -#line 387 "inform7/Chapter 28/Phrase Usage.w" +#line 386 "inform7/Chapter 28/Phrase Usage.w" ; } phud.rule_preamble_w1 = w1; phud.rule_preamble_w2 = w2; } -#line 353 "inform7/Chapter 28/Phrase Usage.w" +#line 352 "inform7/Chapter 28/Phrase Usage.w" ; } -#line 248 "inform7/Chapter 28/Phrase Usage.w" +#line 247 "inform7/Chapter 28/Phrase Usage.w" ; break; case RULE_NOT_IN_RULEBOOK_EFF: { -#line 358 "inform7/Chapter 28/Phrase Usage.w" +#line 357 "inform7/Chapter 28/Phrase Usage.w" if (event_time_NTMV == NOT_AN_EVENT) { GET_RW(rule_preamble_NTM, 1, (phud.explicit_name_w1), (phud.explicit_name_w2)); Rules__vet_name(phud.explicit_name_w1, phud.explicit_name_w2); @@ -94308,7 +94710,7 @@ LOG("So, bud = $W\n", c1, c2); } } -#line 251 "inform7/Chapter 28/Phrase Usage.w" +#line 250 "inform7/Chapter 28/Phrase Usage.w" ; break; } @@ -94317,12 +94719,12 @@ LOG("So, bud = $W\n", c1, c2); return phud; } -#line 453 "inform7/Chapter 28/Phrase Usage.w" +#line 450 "inform7/Chapter 28/Phrase Usage.w" int unrecognised_rule_stem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 460 "inform7/Chapter 28/Phrase Usage.w" +#line 457 "inform7/Chapter 28/Phrase Usage.w" Problems__quote_source(1, current_sentence); Problems__Issue__handmade_problem(_P_(PM_BadRulePreambleWhen)); Problems__issue_problem_segment( @@ -94346,7 +94748,7 @@ int unrecognised_rule_stem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, Problems__issue_problem_end(); } -#line 454 "inform7/Chapter 28/Phrase Usage.w" +#line 451 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94354,7 +94756,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 485 "inform7/Chapter 28/Phrase Usage.w" +#line 482 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_BadRulePreamble), "the punctuation here ':' makes me think this should be a definition " "of a phrase and it doesn't begin as it should", @@ -94366,7 +94768,7 @@ break; "'Instead of taking something:' or 'Every turn:')."); } -#line 455 "inform7/Chapter 28/Phrase Usage.w" +#line 452 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94376,9 +94778,9 @@ break; } return TRUE; } -#line 456 "inform7/Chapter 28/Phrase Usage.w" +#line 453 "inform7/Chapter 28/Phrase Usage.w" -#line 509 "inform7/Chapter 28/Phrase Usage.w" +#line 506 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__get_preamble_text(ph_usage_data *phud, int *w1, int *w2) { if (phud->phrase_effect == TO_PHRASE_EFF) { *w1 = phud->rule_preamble_w1; *w2 = phud->rule_preamble_w2; @@ -94387,7 +94789,7 @@ void Phrases__Usage__get_preamble_text(ph_usage_data *phud, int *w1, int *w2) { } } -#line 524 "inform7/Chapter 28/Phrase Usage.w" +#line 521 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__get_prewhile_text(ph_usage_data *phud, int *pw1, int *pw2) { int w1 = phud->rule_parameter_w1, w2 = phud->rule_parameter_w2; if (w1 >= 0) { @@ -94402,14 +94804,14 @@ void Phrases__Usage__get_prewhile_text(ph_usage_data *phud, int *pw1, int *pw2) } } -#line 541 "inform7/Chapter 28/Phrase Usage.w" +#line 538 "inform7/Chapter 28/Phrase Usage.w" int when_while_clause_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 543 "inform7/Chapter 28/Phrase Usage.w" +#line 540 "inform7/Chapter 28/Phrase Usage.w" -#line 548 "inform7/Chapter 28/Phrase Usage.w" +#line 545 "inform7/Chapter 28/Phrase Usage.w" int Phrases__Usage__get_effect(ph_usage_data *phud) { return phud->phrase_effect; } @@ -94457,7 +94859,7 @@ phrase *Phrases__Usage__get_equation_inverse(ph_usage_data *phud) { return NULL; } -#line 600 "inform7/Chapter 28/Phrase Usage.w" +#line 597 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__log(ph_usage_data *phud) { char *ram = ""; switch(phud->phrase_effect) { @@ -94514,23 +94916,23 @@ void Phrases__Usage__log_rule_name(ph_usage_data *phud) { } else LOG("($W)", phud->explicit_name_w1, phud->explicit_name_w2); } -#line 659 "inform7/Chapter 28/Phrase Usage.w" +#line 656 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__write_I6_comment_describing(ph_usage_data *phud, OUTPUT_STREAM) { WRITE("! "); Text__print_raw_text_within_i6_literal(OUT, phud->full_preamble_w1, phud->full_preamble_w2); WRITE(":\n"); } -#line 668 "inform7/Chapter 28/Phrase Usage.w" +#line 665 "inform7/Chapter 28/Phrase Usage.w" void Phrases__Usage__index_preamble(ph_usage_data *phud) { Text__print_raw_text_to_stream(phud->full_preamble_w1, phud->full_preamble_w2, ifl); } -#line 682 "inform7/Chapter 28/Phrase Usage.w" +#line 679 "inform7/Chapter 28/Phrase Usage.w" int NAP_problem_explained = FALSE; /* pertains to Named Action Patterns */ int issuing_ANL_problem = FALSE; /* pertains to Action Name Lists */ -#line 688 "inform7/Chapter 28/Phrase Usage.w" +#line 685 "inform7/Chapter 28/Phrase Usage.w" ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *phud) { ph_runtime_context_data phrcd = Phrases__Context__new(); @@ -94540,12 +94942,12 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p if (phud->phrase_effect == RULE_IN_RULEBOOK_EFF) { -#line 703 "inform7/Chapter 28/Phrase Usage.w" +#line 700 "inform7/Chapter 28/Phrase Usage.w" phrcd.compile_for_rulebook = &(phud->owning_rulebook); if (phud->rule_parameter_w1 >= 0) { -#line 718 "inform7/Chapter 28/Phrase Usage.w" +#line 715 "inform7/Chapter 28/Phrase Usage.w" int aw1 = phud->rule_parameter_w1, aw2 = phud->rule_parameter_w2; if (Rulebooks__focus(phud->owning_rulebook) == ACTION_FOCUS) { @@ -94559,7 +94961,7 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p if (PL__Actions__Patterns__is_valid(&(phrcd.ap)) == FALSE) { -#line 756 "inform7/Chapter 28/Phrase Usage.w" +#line 753 "inform7/Chapter 28/Phrase Usage.w" Phrases__Usage__log(phud); LOG("Bad action pattern: $W = $A\nPAP failure reason: %d\n", aw1, aw2, &(phrcd.ap), pap_failure_reason); @@ -94569,7 +94971,7 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p switch(pap_failure_reason) { case MIXEDNOUNS_PAPF: { -#line 773 "inform7/Chapter 28/Phrase Usage.w" +#line 770 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_APWithDisjunction)); Problems__issue_problem_segment( "You wrote %1, which seems to introduce a rule, but the " @@ -94585,11 +94987,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p Problems__issue_problem_end(); } -#line 763 "inform7/Chapter 28/Phrase Usage.w" +#line 760 "inform7/Chapter 28/Phrase Usage.w" ; break; case NOPARTICIPLE_PAPF: { -#line 790 "inform7/Chapter 28/Phrase Usage.w" +#line 787 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_APWithNoParticiple)); Problems__issue_problem_segment( "You wrote %1, which seems to introduce a rule taking effect " @@ -94600,11 +95002,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p Problems__issue_problem_end(); } -#line 764 "inform7/Chapter 28/Phrase Usage.w" +#line 761 "inform7/Chapter 28/Phrase Usage.w" ; break; case IMMISCIBLE_PAPF: { -#line 802 "inform7/Chapter 28/Phrase Usage.w" +#line 799 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_APWithImmiscible)); Problems__issue_problem_segment( "You wrote %1, which seems to introduce a rule taking effect " @@ -94618,11 +95020,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p Problems__issue_problem_end(); } -#line 765 "inform7/Chapter 28/Phrase Usage.w" +#line 762 "inform7/Chapter 28/Phrase Usage.w" ; break; case WHEN_PAPF: { -#line 817 "inform7/Chapter 28/Phrase Usage.w" +#line 814 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_APWithBadWhen)); int qw1 = aw1, qw2 = aw2, diagnosis = 0; if (Preform__parse_nt_against_word_range(action_when_diagnosis_NTM, qw1, qw2, NULL, NULL)) { @@ -94657,11 +95059,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p Problems__issue_problem_end(); } -#line 766 "inform7/Chapter 28/Phrase Usage.w" +#line 763 "inform7/Chapter 28/Phrase Usage.w" ; break; default: { -#line 853 "inform7/Chapter 28/Phrase Usage.w" +#line 850 "inform7/Chapter 28/Phrase Usage.w" Problems__quote_words(2, aw1, aw2); if (pap_failure_reason == WHENOKAY_PAPF) Problems__quote_text(3, @@ -94673,7 +95075,7 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p "action is '%2'. %3 did not make sense as a description of an action."); { -#line 872 "inform7/Chapter 28/Phrase Usage.w" +#line 869 "inform7/Chapter 28/Phrase Usage.w" action_name *an; LOOP_OVER(an, action_name) { int x1 = an->word_ref1, x2 = an->word_ref2; @@ -94689,11 +95091,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p } } -#line 862 "inform7/Chapter 28/Phrase Usage.w" +#line 859 "inform7/Chapter 28/Phrase Usage.w" ; { -#line 889 "inform7/Chapter 28/Phrase Usage.w" +#line 886 "inform7/Chapter 28/Phrase Usage.w" if (pap_failure_reason == WHENOKAY_PAPF) { int c1 = phud->rule_preamble_w1, c2 = phud->rule_preamble_w2; time_period duration = TimePeriods__parse(c1, c2); @@ -94708,11 +95110,11 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p } } -#line 863 "inform7/Chapter 28/Phrase Usage.w" +#line 860 "inform7/Chapter 28/Phrase Usage.w" ; { -#line 912 "inform7/Chapter 28/Phrase Usage.w" +#line 909 "inform7/Chapter 28/Phrase Usage.w" issuing_ANL_problem = FALSE; NAP_problem_explained = FALSE; Preform__parse_nt_against_word_range(anl_diagnosis_NTM, aw1, aw2, NULL, NULL); int N = most_recent_result; @@ -94731,19 +95133,19 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p } } -#line 864 "inform7/Chapter 28/Phrase Usage.w" +#line 861 "inform7/Chapter 28/Phrase Usage.w" ; Problems__issue_problem_segment( " I am unable to place this rule into any rulebook."); Problems__issue_problem_end(); } -#line 767 "inform7/Chapter 28/Phrase Usage.w" +#line 764 "inform7/Chapter 28/Phrase Usage.w" ; break; } } -#line 729 "inform7/Chapter 28/Phrase Usage.w" +#line 726 "inform7/Chapter 28/Phrase Usage.w" ; } else { kind *pk = Rulebooks__get_parameter_kind(phud->owning_rulebook); @@ -94761,7 +95163,7 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p if (PL__Actions__Patterns__is_valid(&(phrcd.ap)) == FALSE) { -#line 933 "inform7/Chapter 28/Phrase Usage.w" +#line 930 "inform7/Chapter 28/Phrase Usage.w" Phrases__Usage__log(phud); Problems__quote_source(1, current_sentence); Problems__quote_words(2, aw1, aw2); @@ -94770,12 +95172,12 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p Preform__parse_nt_against_word_range(parametric_problem_diagnosis_NTM, rp1, rp2, NULL, NULL); } -#line 744 "inform7/Chapter 28/Phrase Usage.w" +#line 741 "inform7/Chapter 28/Phrase Usage.w" ; } } -#line 705 "inform7/Chapter 28/Phrase Usage.w" +#line 702 "inform7/Chapter 28/Phrase Usage.w" ; if (phud->whenwhile_w1 >= 0) { @@ -94787,18 +95189,18 @@ ph_runtime_context_data Phrases__Usage__to_runtime_context_data(ph_usage_data *p if (phud->during_scene_spec) phrcd.during_scene = phud->during_scene_spec; } -#line 695 "inform7/Chapter 28/Phrase Usage.w" +#line 692 "inform7/Chapter 28/Phrase Usage.w" ; return phrcd; } -#line 947 "inform7/Chapter 28/Phrase Usage.w" +#line 944 "inform7/Chapter 28/Phrase Usage.w" int parametric_problem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 954 "inform7/Chapter 28/Phrase Usage.w" +#line 951 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__sentence_problem(_P_(PM_WhenThePlay), "there's no scene called 'the play'", "so I think you need to remove 'the' - Inform has two " @@ -94806,7 +95208,7 @@ int parametric_problem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int "and I think you probably mean to refer to one of those."); } -#line 948 "inform7/Chapter 28/Phrase Usage.w" +#line 945 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94814,7 +95216,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 963 "inform7/Chapter 28/Phrase Usage.w" +#line 960 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_BadParameter)); Problems__issue_problem_segment( "You wrote %1, but the description of the thing(s) to which the rule " @@ -94823,7 +95225,7 @@ break; Problems__issue_problem_end(); } -#line 949 "inform7/Chapter 28/Phrase Usage.w" +#line 946 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94833,14 +95235,14 @@ break; } return TRUE; } -#line 950 "inform7/Chapter 28/Phrase Usage.w" +#line 947 "inform7/Chapter 28/Phrase Usage.w" -#line 974 "inform7/Chapter 28/Phrase Usage.w" +#line 971 "inform7/Chapter 28/Phrase Usage.w" int action_problem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 982 "inform7/Chapter 28/Phrase Usage.w" +#line 979 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_NonActionInPresenceOf)); Problems__issue_problem_segment( "You wrote %1, but 'in the presence of...' is a clause which can " @@ -94855,7 +95257,7 @@ int action_problem_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, Problems__issue_problem_end(); } -#line 975 "inform7/Chapter 28/Phrase Usage.w" +#line 972 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94863,7 +95265,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 998 "inform7/Chapter 28/Phrase Usage.w" +#line 995 "inform7/Chapter 28/Phrase Usage.w" Problems__Issue__handmade_problem(_P_(PM_NonActionIn)); Problems__issue_problem_segment( "You wrote %1, but 'in...' used in this way should really belong " @@ -94874,7 +95276,7 @@ break; Problems__issue_problem_end(); } -#line 976 "inform7/Chapter 28/Phrase Usage.w" +#line 973 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -94884,10 +95286,10 @@ break; } return TRUE; } -#line 977 "inform7/Chapter 28/Phrase Usage.w" +#line 974 "inform7/Chapter 28/Phrase Usage.w" -#line 1013 "inform7/Chapter 28/Phrase Usage.w" +#line 1010 "inform7/Chapter 28/Phrase Usage.w" int action_when_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = 1; cw1_NTMV = action_when_diagnosis_NTM->range_result_w1[2]; cw2_NTMV = action_when_diagnosis_NTM->range_result_w2[2]; @@ -94919,9 +95321,9 @@ break; } return TRUE; } -#line 1019 "inform7/Chapter 28/Phrase Usage.w" +#line 1016 "inform7/Chapter 28/Phrase Usage.w" -#line 1023 "inform7/Chapter 28/Phrase Usage.w" +#line 1020 "inform7/Chapter 28/Phrase Usage.w" int anl_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; @@ -94938,7 +95340,7 @@ break; } return TRUE; } -#line 1026 "inform7/Chapter 28/Phrase Usage.w" +#line 1023 "inform7/Chapter 28/Phrase Usage.w" int anl_inner_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -94956,7 +95358,7 @@ break; } return TRUE; } -#line 1030 "inform7/Chapter 28/Phrase Usage.w" +#line 1027 "inform7/Chapter 28/Phrase Usage.w" int anl_tail_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -94974,13 +95376,13 @@ break; } return TRUE; } -#line 1034 "inform7/Chapter 28/Phrase Usage.w" +#line 1031 "inform7/Chapter 28/Phrase Usage.w" int anl_entry_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 1041 "inform7/Chapter 28/Phrase Usage.w" +#line 1038 "inform7/Chapter 28/Phrase Usage.w" *X = 1; if ((issuing_ANL_problem) && (!preform_lookahead_mode)) { Problems__quote_words(4, w1, w2); @@ -95024,7 +95426,7 @@ int anl_entry_diagnosis_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w } } -#line 1036 "inform7/Chapter 28/Phrase Usage.w" +#line 1033 "inform7/Chapter 28/Phrase Usage.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -95034,9 +95436,9 @@ break; } return TRUE; } -#line 1037 "inform7/Chapter 28/Phrase Usage.w" +#line 1034 "inform7/Chapter 28/Phrase Usage.w" -#line 47 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 46 "inform7/Chapter 28/Phrase Runtime Context Data.w" ph_runtime_context_data Phrases__Context__new(void) { ph_runtime_context_data phrcd; phrcd.activity_context_w1 = -1; phrcd.activity_context_w2 = -1; @@ -95052,7 +95454,7 @@ ph_runtime_context_data Phrases__Context__new(void) { return phrcd; } -#line 66 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 65 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__set_always_test_actor(ph_runtime_context_data *phrcd) { phrcd->always_test_actor = TRUE; } @@ -95073,7 +95475,7 @@ int Phrases__Context__get_marked_for_anyone(ph_runtime_context_data *phrcd) { return phrcd->marked_for_anyone; } -#line 89 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 88 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__within_action_context(ph_runtime_context_data *phrcd, action_name *an) { if (phrcd == NULL) return FALSE; @@ -95090,7 +95492,7 @@ void Phrases__Context__suppress_action_testing(ph_runtime_context_data *phrcd) { PL__Actions__Patterns__suppress_action_testing(&(phrcd->ap)); } -#line 111 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 110 "inform7/Chapter 28/Phrase Runtime Context Data.w" scene *Phrases__Context__get_scene(ph_runtime_context_data *phrcd) { if (phrcd == NULL) return NULL; if (Specifications__family_is(phrcd->during_scene, VALUE_FMY)) { @@ -95100,7 +95502,7 @@ scene *Phrases__Context__get_scene(ph_runtime_context_data *phrcd) { return NULL; } -#line 124 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 123 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__outcome_restrictions_waived(void) { if ((phrase_being_compiled) && (phrase_being_compiled->runtime_context_data.permit_all_outcomes)) @@ -95108,7 +95510,7 @@ int Phrases__Context__outcome_restrictions_waived(void) { return FALSE; } -#line 142 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 141 "inform7/Chapter 28/Phrase Runtime Context Data.w" int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, ph_runtime_context_data *rcd2) { action_pattern *ap1, *ap2; @@ -95116,7 +95518,7 @@ int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, int al1_w1, al1_w2, al2_w1, al2_w2; { -#line 159 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 158 "inform7/Chapter 28/Phrase Runtime Context Data.w" if (rcd1) { ap1 = &(rcd1->ap); sc1 = rcd1->during_scene; al1_w1 = rcd1->activity_context_w1; al1_w2 = rcd1->activity_context_w2; @@ -95131,11 +95533,11 @@ int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, } } -#line 147 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 146 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; { -#line 175 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 174 "inform7/Chapter 28/Phrase Runtime Context Data.w" c_s_stage_law = "I - Number of aspects constrained"; int rct1 = PL__Actions__Patterns__count_aspects(ap1); @@ -95147,22 +95549,22 @@ int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, if (rct1 < rct2) return -1; } -#line 148 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 147 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; { -#line 188 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 187 "inform7/Chapter 28/Phrase Runtime Context Data.w" if ((sc1) && (sc2)) { int rv = Specifications__compare_specificity(sc1, sc2, NULL); if (rv != 0) return rv; } } -#line 149 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 148 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; { -#line 196 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 195 "inform7/Chapter 28/Phrase Runtime Context Data.w" c_s_stage_law = "III - When/while requirement"; if ((al1_w1 >= 0) && (al2_w1 == -1)) return 1; if ((al1_w1 == -1) && (al2_w1 >= 0)) return -1; @@ -95174,32 +95576,32 @@ int Phrases__Context__compare_specificity(ph_runtime_context_data *rcd1, } } -#line 150 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 149 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; { -#line 209 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 208 "inform7/Chapter 28/Phrase Runtime Context Data.w" c_s_stage_law = "IV - Action requirement"; int rv = PL__Actions__Patterns__compare_specificity(ap1, ap2); if (rv != 0) return rv; } -#line 151 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 150 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; { -#line 216 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 215 "inform7/Chapter 28/Phrase Runtime Context Data.w" c_s_stage_law = "V - Scene requirement"; if ((sc1 != NULL) && (sc2 == NULL)) return 1; if ((sc1 == NULL) && (sc2 != NULL)) return -1; } -#line 152 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 151 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; return 0; } -#line 231 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 230 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__ensure_avl(rule *R) { phrase *ph = R->defn_as_phrase; if (ph) { @@ -95220,7 +95622,7 @@ void Phrases__Context__ensure_avl(rule *R) { } } -#line 272 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 271 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, applicability_condition *acl) { char *identifier = Phrases__identifier(ph); @@ -95232,16 +95634,16 @@ void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, if (phrcd->during_scene) { -#line 316 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 315 "inform7/Chapter 28/Phrase Runtime Context Data.w" PL__Scenes__test_during_clause(OUT, phrcd->during_scene); tests++; } -#line 281 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 280 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; if (PL__Actions__Patterns__is_valid(&(phrcd->ap))) { -#line 328 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 327 "inform7/Chapter 28/Phrase Runtime Context Data.w" WRITE("if ("); if (phrcd->never_test_actor) PL__Actions__Patterns__compile_pattern_match(OUT, phrcd->ap, TRUE); @@ -95253,20 +95655,20 @@ void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, WRITE("self = noun;\n"); } -#line 282 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 281 "inform7/Chapter 28/Phrase Runtime Context Data.w" else if (phrcd->always_test_actor == TRUE) { -#line 347 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 346 "inform7/Chapter 28/Phrase Runtime Context Data.w" WRITE("if (actor == player) {\n"); tests++; } -#line 283 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 282 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; if (phrcd->activity_context_w1 >= 0) { -#line 359 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 358 "inform7/Chapter 28/Phrase Runtime Context Data.w" activity_list *avl = phrcd->avl; if (avl == NULL) Problems__Issue__sentence_problem(_P_(PM_BadWhenWhile), @@ -95281,7 +95683,7 @@ void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, } } -#line 284 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 283 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; if ((tests > 0) || (ph->compile_with_run_time_debugging)) { @@ -95289,7 +95691,7 @@ void Phrases__Context__compile_test_head(OUTPUT_STREAM, phrase *ph, } } -#line 295 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 294 "inform7/Chapter 28/Phrase Runtime Context Data.w" void Phrases__Context__compile_test_tail(OUTPUT_STREAM, phrase *ph, applicability_condition *acl) { char *identifier = Phrases__identifier(ph); @@ -95304,43 +95706,43 @@ void Phrases__Context__compile_test_tail(OUTPUT_STREAM, phrase *ph, if (phrcd->activity_context_w1 >= 0) { -#line 375 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 374 "inform7/Chapter 28/Phrase Runtime Context Data.w" WRITE("} else if (debug_rules > 1) DB_Rule(%s, %d, 'context');\n", identifier, ph->allocation_id); } -#line 307 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 306 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; if (PL__Actions__Patterns__is_valid(&(phrcd->ap))) { -#line 341 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 340 "inform7/Chapter 28/Phrase Runtime Context Data.w" WRITE("} else if (debug_rules > 1) DB_Rule(%s, %d, 'action');\n", identifier, ph->allocation_id); } -#line 308 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 307 "inform7/Chapter 28/Phrase Runtime Context Data.w" else if (phrcd->always_test_actor == TRUE) { -#line 353 "inform7/Chapter 28/Phrase Runtime Context Data.w" +#line 352 "inform7/Chapter 28/Phrase Runtime Context Data.w" WRITE("} else if (debug_rules > 1) DB_Rule(%s, %d, 'actor');\n", identifier, ph->allocation_id); +} +#line 308 "inform7/Chapter 28/Phrase Runtime Context Data.w" +; + if (phrcd->during_scene) +{ +#line 321 "inform7/Chapter 28/Phrase Runtime Context Data.w" + WRITE("} else if (debug_rules > 1) DB_Rule(%s, %d, 'scene');\n", + identifier, ph->allocation_id); + } #line 309 "inform7/Chapter 28/Phrase Runtime Context Data.w" -; - if (phrcd->during_scene) -{ -#line 322 "inform7/Chapter 28/Phrase Runtime Context Data.w" - WRITE("} else if (debug_rules > 1) DB_Rule(%s, %d, 'scene');\n", - identifier, ph->allocation_id); - -} -#line 310 "inform7/Chapter 28/Phrase Runtime Context Data.w" ; } -#line 159 "inform7/Chapter 28/Phrase Type Data.w" +#line 155 "inform7/Chapter 28/Phrase Type Data.w" ph_type_data Phrases__TypeData__new(void) { ph_type_data phtd; phtd.register_w1 = -1; phtd.register_w2 = -1; @@ -95358,7 +95760,7 @@ ph_type_data Phrases__TypeData__new(void) { return phtd; } -#line 179 "inform7/Chapter 28/Phrase Type Data.w" +#line 175 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__set_mor(ph_type_data *phtd, int mor, kind *K) { phtd->manner_of_return = mor; phtd->return_kind = K; @@ -95373,7 +95775,7 @@ kind *Phrases__TypeData__get_return_kind(ph_type_data *phtd) { return phtd->return_kind; } -#line 196 "inform7/Chapter 28/Phrase Type Data.w" +#line 192 "inform7/Chapter 28/Phrase Type Data.w" char *Phrases__TypeData__describe_manner_of_return(int mor, ph_type_data *phtd, kind **K) { switch (mor) { case DECIDES_NOTHING_MOR: return "no value resulting"; @@ -95387,7 +95789,7 @@ char *Phrases__TypeData__describe_manner_of_return(int mor, ph_type_data *phtd, return "some phrase"; /* should never actually be needed */ } -#line 248 "inform7/Chapter 28/Phrase Type Data.w" +#line 244 "inform7/Chapter 28/Phrase Type Data.w" kind *Phrases__TypeData__kind(ph_type_data *phtd) { kind *argument_kinds[MAX_TOKENS_PER_PHRASE]; int i, j = 0; @@ -95397,7 +95799,7 @@ kind *Phrases__TypeData__kind(ph_type_data *phtd) { return Kinds__function_kind(j, argument_kinds, R); } -#line 260 "inform7/Chapter 28/Phrase Type Data.w" +#line 256 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__contains_variables(ph_type_data *phtd) { return Kinds__contains( @@ -95405,7 +95807,7 @@ int Phrases__TypeData__contains_variables(ph_type_data *phtd) { CON_KIND_VARIABLE); } -#line 270 "inform7/Chapter 28/Phrase Type Data.w" +#line 266 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__tokens_contain_variable(ph_type_data *phtd, int v) { for (int i=0; ino_tokens; i++) if (Kinds__Behaviour__involves_var(phtd->token_sequence[i].token_kind, v)) @@ -95413,12 +95815,12 @@ int Phrases__TypeData__tokens_contain_variable(ph_type_data *phtd, int v) { return FALSE; } -#line 280 "inform7/Chapter 28/Phrase Type Data.w" +#line 276 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__get_no_tokens(ph_type_data *phtd) { return phtd->no_tokens; } -#line 287 "inform7/Chapter 28/Phrase Type Data.w" +#line 283 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__index_of_token_creating_a_variable(ph_type_data *phtd) { int i; for (i=0; ino_tokens; i++) @@ -95428,7 +95830,7 @@ int Phrases__TypeData__index_of_token_creating_a_variable(ph_type_data *phtd) { return -1; } -#line 302 "inform7/Chapter 28/Phrase Type Data.w" +#line 298 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__preamble_requires_property_value(ph_type_data *phtd) { int i; for (i=0; ino_tokens; i++) { @@ -95439,7 +95841,7 @@ int Phrases__TypeData__preamble_requires_property_value(ph_type_data *phtd) { return TRUE; } -#line 320 "inform7/Chapter 28/Phrase Type Data.w" +#line 316 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__deprecated(ph_type_data *phtd) { return phtd->now_deprecated; } @@ -95448,7 +95850,7 @@ void Phrases__TypeData__deprecate_phrase(ph_type_data *phtd) { phtd->now_deprecated = TRUE; } -#line 359 "inform7/Chapter 28/Phrase Type Data.w" +#line 355 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__into_stack_frame(ph_stack_frame *phsf, ph_type_data *phtd, kind *kind_in_this_compilation, int first) { if (Kinds__get_construct(kind_in_this_compilation) != CON_phrase) @@ -95475,43 +95877,43 @@ void Phrases__TypeData__into_stack_frame(ph_stack_frame *phsf, else Frames__set_kind_returned(phsf, ret); } -#line 390 "inform7/Chapter 28/Phrase Type Data.w" +#line 386 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__comparison(ph_type_data *phtd1, ph_type_data *phtd2) { if (phtd1 == phtd2) return EQUAL_PH; { -#line 406 "inform7/Chapter 28/Phrase Type Data.w" +#line 402 "inform7/Chapter 28/Phrase Type Data.w" int i = Phrases__TypeData__inline_type_data_comparison(phtd1, phtd2); if (i != EQUAL_PH) return i; } -#line 394 "inform7/Chapter 28/Phrase Type Data.w" +#line 390 "inform7/Chapter 28/Phrase Type Data.w" ; { -#line 412 "inform7/Chapter 28/Phrase Type Data.w" +#line 408 "inform7/Chapter 28/Phrase Type Data.w" int fw1 = phtd1->no_words - phtd1->no_tokens; int fw2 = phtd2->no_words - phtd2->no_tokens; if (fw1 > fw2) return BEFORE_PH; if (fw1 < fw2) return AFTER_PH; } -#line 395 "inform7/Chapter 28/Phrase Type Data.w" +#line 391 "inform7/Chapter 28/Phrase Type Data.w" ; { -#line 420 "inform7/Chapter 28/Phrase Type Data.w" +#line 416 "inform7/Chapter 28/Phrase Type Data.w" if (phtd1->no_tokens > phtd2->no_tokens) return BEFORE_PH; if (phtd1->no_tokens < phtd2->no_tokens) return AFTER_PH; } -#line 396 "inform7/Chapter 28/Phrase Type Data.w" +#line 392 "inform7/Chapter 28/Phrase Type Data.w" ; { -#line 433 "inform7/Chapter 28/Phrase Type Data.w" +#line 429 "inform7/Chapter 28/Phrase Type Data.w" int i; for (i=0; ino_words; i++) { if (phtd1->word_sequence[i] < MAX_TOKENS_PER_PHRASE) { @@ -95528,18 +95930,18 @@ int Phrases__TypeData__comparison(ph_type_data *phtd1, ph_type_data *phtd2) { } } -#line 397 "inform7/Chapter 28/Phrase Type Data.w" +#line 393 "inform7/Chapter 28/Phrase Type Data.w" ; { -#line 461 "inform7/Chapter 28/Phrase Type Data.w" +#line 457 "inform7/Chapter 28/Phrase Type Data.w" int i, possibly_subschema = TRUE, possibly_superschema = TRUE; for (i=0; ino_tokens; i++) { specification *spec1 = phtd1->token_sequence[i].to_match; specification *spec2 = phtd2->token_sequence[i].to_match; { -#line 499 "inform7/Chapter 28/Phrase Type Data.w" +#line 495 "inform7/Chapter 28/Phrase Type Data.w" if (((Specifications__get_family(spec1) == MATCHING_FMY) || (Specifications__get_family(spec2) == MATCHING_FMY)) && (Specifications__get_family(spec1) != Specifications__get_family(spec2))) { @@ -95553,32 +95955,32 @@ int Phrases__TypeData__comparison(ph_type_data *phtd1, ph_type_data *phtd2) { } } -#line 465 "inform7/Chapter 28/Phrase Type Data.w" +#line 461 "inform7/Chapter 28/Phrase Type Data.w" ; } if ((possibly_subschema) || (possibly_superschema)) { -#line 482 "inform7/Chapter 28/Phrase Type Data.w" +#line 478 "inform7/Chapter 28/Phrase Type Data.w" if ((phtd1->manner_of_return != phtd2->manner_of_return) || ((Kinds__Compare__eq(phtd1->return_kind, phtd2->return_kind) == FALSE) && (Kinds__Behaviour__definite(phtd1->return_kind)))) return CONFLICTED_PH; } -#line 468 "inform7/Chapter 28/Phrase Type Data.w" +#line 464 "inform7/Chapter 28/Phrase Type Data.w" ; if (possibly_subschema) return SUBSCHEMA_PH; if (possibly_superschema) return SUPERSCHEMA_PH; } -#line 398 "inform7/Chapter 28/Phrase Type Data.w" +#line 394 "inform7/Chapter 28/Phrase Type Data.w" ; return INCOMPARABLE_PH; } -#line 518 "inform7/Chapter 28/Phrase Type Data.w" +#line 514 "inform7/Chapter 28/Phrase Type Data.w" say_details Phrases__TypeData__new_say_details(void) { say_details sd; sd.say_phrase = NOT_A_SAY_PHRASE; @@ -95700,7 +96102,7 @@ int Phrases__TypeData__ssp_matches(ph_type_data *phtd, int ssp_tok, int list_pos return TRUE; } -#line 650 "inform7/Chapter 28/Phrase Type Data.w" +#line 646 "inform7/Chapter 28/Phrase Type Data.w" inline_details Phrases__TypeData__new_inline_details(void) { inline_details id; @@ -95715,7 +96117,7 @@ inline_details Phrases__TypeData__new_inline_details(void) { return id; } -#line 667 "inform7/Chapter 28/Phrase Type Data.w" +#line 663 "inform7/Chapter 28/Phrase Type Data.w" int no_lets_made = 0; void Phrases__TypeData__make_id(inline_details *id, int op, int assgn, int let, int blk, int only_in) { @@ -95728,7 +96130,7 @@ void Phrases__TypeData__make_id(inline_details *id, int op, int assgn, int let, else if (only_in > 0) id->only_in_loop = Lexer__word_text(only_in); } -#line 682 "inform7/Chapter 28/Phrase Type Data.w" +#line 678 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__log_inline_details(inline_details id) { if (id.block_follows) LOG(" block follows\n"); if (id.let_phrase != NOT_A_LET_PHRASE) LOG(" let phrase (%d)\n", id.let_phrase); @@ -95739,7 +96141,7 @@ void Phrases__TypeData__log_inline_details(inline_details id) { } } -#line 695 "inform7/Chapter 28/Phrase Type Data.w" +#line 691 "inform7/Chapter 28/Phrase Type Data.w" void Phrases__TypeData__make_inline(ph_type_data *phtd) { phtd->as_inline.invoked_inline_not_as_call = TRUE; } @@ -95748,7 +96150,7 @@ int Phrases__TypeData__invoked_inline(phrase *ph) { return ph->type_data.as_inline.invoked_inline_not_as_call; } -#line 706 "inform7/Chapter 28/Phrase Type Data.w" +#line 702 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__is_a_let_assignment(phrase *ph) { if (ph->type_data.as_inline.let_phrase == ASSIGNMENT_LET_PHRASE) return TRUE; return FALSE; @@ -95776,14 +96178,14 @@ int Phrases__TypeData__block_follows(phrase *ph) { return ph->type_data.as_inline.block_follows; } -#line 742 "inform7/Chapter 28/Phrase Type Data.w" +#line 738 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__return_decided_dimensionally(ph_type_data *phtd) { if ((phtd->manner_of_return == DECIDES_VALUE_MOR) && (phtd->as_inline.arithmetical_operation >= 0)) return TRUE; return FALSE; } -#line 756 "inform7/Chapter 28/Phrase Type Data.w" +#line 752 "inform7/Chapter 28/Phrase Type Data.w" int Phrases__TypeData__inline_type_data_comparison(ph_type_data *phtd1, ph_type_data *phtd2) { if ((phtd1->as_inline.only_in_loop) && (phtd2->as_inline.only_in_loop == FALSE)) return BEFORE_PH; @@ -99369,31 +99771,31 @@ void LocalVariables__declare(OUTPUT_STREAM, ph_stack_frame *phsf, int call_pars_ if (call_pars_only == FALSE) WRITE(";\n"); OUTDENT; } -#line 52 "inform7/Chapter 30/Phrase Blocks.w" +#line 51 "inform7/Chapter 30/Phrase Blocks.w" block_stack current_block_stack; phrase_block *block_being_compiled = NULL; /* the one being compiled, if any */ phrase_block *block_being_opened = NULL; /* the one about to open, if any */ -#line 60 "inform7/Chapter 30/Phrase Blocks.w" +#line 59 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__empty_stack(void) { current_block_stack.pb_sp = 0; block_being_compiled = NULL; block_being_opened = NULL; } -#line 70 "inform7/Chapter 30/Phrase Blocks.w" +#line 69 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__prepush_stack(void) { block_being_opened = &(current_block_stack.pb_stack[current_block_stack.pb_sp]); } -#line 77 "inform7/Chapter 30/Phrase Blocks.w" +#line 76 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__push_stack(void) { current_block_stack.pb_sp++; block_being_compiled = block_being_opened; block_being_opened = NULL; } -#line 86 "inform7/Chapter 30/Phrase Blocks.w" +#line 85 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__pop_stack(void) { current_block_stack.pb_sp--; if (current_block_stack.pb_sp > 0) @@ -99403,7 +99805,7 @@ void Frames__Blocks__pop_stack(void) { block_being_opened = NULL; /* which should be true anyway */ } -#line 100 "inform7/Chapter 30/Phrase Blocks.w" +#line 99 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__begin_code_blocks(void) { if (Frames__current_stack_frame() == NULL) internal_error("tried to use blocks outside stack frame"); @@ -99413,7 +99815,7 @@ void Frames__Blocks__begin_code_blocks(void) { LOGIF(LOCAL_VARIABLES, "Block stack now active\n"); } -#line 112 "inform7/Chapter 30/Phrase Blocks.w" +#line 111 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__end_code_blocks(void) { while (block_being_compiled) { current_sentence = block_being_compiled->block_location; @@ -99429,7 +99831,7 @@ void Frames__Blocks__end_code_blocks(void) { LOGIF(LOCAL_VARIABLES, "Block stack now inactive\n"); } -#line 139 "inform7/Chapter 30/Phrase Blocks.w" +#line 138 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__beginning_block_phrase(OUTPUT_STREAM, phrase *ph) { if (current_block_stack.pb_sp == MAX_BLOCK_NESTING) { Problems__Issue__sentence_problem(_P_(PM_BlockNestingTooDeep), @@ -99440,7 +99842,7 @@ void Frames__Blocks__beginning_block_phrase(OUTPUT_STREAM, phrase *ph) { Frames__Blocks__prepush_stack(); { -#line 157 "inform7/Chapter 30/Phrase Blocks.w" +#line 156 "inform7/Chapter 30/Phrase Blocks.w" int i; for (i=0; idivision_count[i] = 0; @@ -99451,11 +99853,11 @@ void Frames__Blocks__beginning_block_phrase(OUTPUT_STREAM, phrase *ph) { block_being_opened->label_following = -1; } -#line 147 "inform7/Chapter 30/Phrase Blocks.w" +#line 146 "inform7/Chapter 30/Phrase Blocks.w" ; } -#line 170 "inform7/Chapter 30/Phrase Blocks.w" +#line 169 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__open_code_block(OUTPUT_STREAM, phrase *owner, kind *K, STREAM *TAIL) { block_being_opened->switch_kind = K; @@ -99465,13 +99867,13 @@ void Frames__Blocks__open_code_block(OUTPUT_STREAM, phrase *owner, kind *K, LOGIF(LOCAL_VARIABLES, "Start of block level %d\n", current_block_stack.pb_sp); } -#line 183 "inform7/Chapter 30/Phrase Blocks.w" +#line 182 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__make_indentation_follow_code(OUTPUT_STREAM) { int indent_level = current_block_stack.pb_sp + 1; SET_INDENT(indent_level); } -#line 199 "inform7/Chapter 30/Phrase Blocks.w" +#line 198 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__divide_code_block(int division_form) { if (block_being_compiled == NULL) return; /* for problem recovery only */ LOGIF(LOCAL_VARIABLES, "Division in block level %d\n", current_block_stack.pb_sp); @@ -99484,7 +99886,7 @@ int Frames__Blocks__read_division_count(int division_form) { return block_being_compiled->division_count[division_form]; } -#line 214 "inform7/Chapter 30/Phrase Blocks.w" +#line 213 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__close_code_block(OUTPUT_STREAM) { if (block_being_compiled == NULL) return; /* for problem recovery only */ WRITE("}\n"); @@ -99499,7 +99901,7 @@ void Frames__Blocks__close_code_block(OUTPUT_STREAM) { Frames__Blocks__pop_stack(); } -#line 232 "inform7/Chapter 30/Phrase Blocks.w" +#line 231 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__inside_a_loop_body(void) { int i; for (i = current_block_stack.pb_sp-1; i >= 0; i--) @@ -99510,7 +99912,7 @@ int Frames__Blocks__inside_a_loop_body(void) { return FALSE; } -#line 245 "inform7/Chapter 30/Phrase Blocks.w" +#line 244 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__inside_a_conditional_block(void) { int i; for (i = current_block_stack.pb_sp-1; i >= 0; i--) @@ -99520,7 +99922,7 @@ int Frames__Blocks__inside_a_conditional_block(void) { return FALSE; } -#line 262 "inform7/Chapter 30/Phrase Blocks.w" +#line 261 "inform7/Chapter 30/Phrase Blocks.w" int Frames__Blocks__current_block_level(void) { return current_block_stack.pb_sp; } @@ -99540,7 +99942,7 @@ kind *Frames__Blocks__switch_value_kind(void) { return block_being_compiled->switch_kind; } -#line 289 "inform7/Chapter 30/Phrase Blocks.w" +#line 288 "inform7/Chapter 30/Phrase Blocks.w" int unique_breakage_count = 0; void Frames__Blocks__compile_break(OUTPUT_STREAM) { int i; @@ -99558,14 +99960,14 @@ void Frames__Blocks__compile_break(OUTPUT_STREAM) { internal_error("not inside a loop block"); } -#line 310 "inform7/Chapter 30/Phrase Blocks.w" +#line 309 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__set_variable_scope(local_variable *lvar) { if (Frames__current_stack_frame()) LocalVariables__set_scope_to(lvar, current_block_stack.pb_sp); } -#line 321 "inform7/Chapter 30/Phrase Blocks.w" +#line 320 "inform7/Chapter 30/Phrase Blocks.w" void Frames__Blocks__set_scope_to_block_about_to_open(local_variable *lvar) { if (Frames__current_stack_frame()) LocalVariables__set_scope_to(lvar, @@ -100087,7 +100489,7 @@ void Chronology__chronology_extents_i6_escape(OUTPUT_STREAM) { WRITE("Constant NO_PAST_TENSE_ACTIONS %d;\n", no_past_actions); } -#line 210 "inform7/Chapter 31/Invocations.w" +#line 204 "inform7/Chapter 31/Invocations.w" invocation *Invocations__new(void) { invocation *inv = CREATE(invocation); inv->inv_packed_record = 0; @@ -100106,7 +100508,7 @@ invocation *Invocations__new(void) { return inv; } -#line 231 "inform7/Chapter 31/Invocations.w" +#line 225 "inform7/Chapter 31/Invocations.w" void Invocations__log(invocation *inv) { int i; if (inv == NULL) { LOG(""); return; } @@ -100141,7 +100543,7 @@ void Invocations__log(invocation *inv) { } } -#line 268 "inform7/Chapter 31/Invocations.w" +#line 262 "inform7/Chapter 31/Invocations.w" void Invocations__set_flag(invocation *inv, int flag) { if (inv == NULL) internal_error("tried to set flag for null inv"); inv->inv_packed_record = (inv->inv_packed_record) | flag; @@ -100158,7 +100560,7 @@ int Invocations__test_flag(invocation *inv, int flag) { return FALSE; } -#line 287 "inform7/Chapter 31/Invocations.w" +#line 281 "inform7/Chapter 31/Invocations.w" int Invocations__get_group(invocation *inv) { if (inv == NULL) internal_error("tried to read group of null inv"); return ((inv->inv_packed_record) & GROUP_MASK)/BASE_OF_GROUP; @@ -100171,7 +100573,7 @@ void Invocations__set_group(invocation *inv, int g) { + BASE_OF_GROUP*g; } -#line 302 "inform7/Chapter 31/Invocations.w" +#line 296 "inform7/Chapter 31/Invocations.w" int Invocations__get_unsorted_position(invocation *inv) { if (inv == NULL) internal_error("tried to read USN of null inv"); return ((inv->inv_packed_record) & USN_MASK)/BASE_OF_USN; @@ -100184,13 +100586,13 @@ void Invocations__set_unsorted_position(invocation *inv, int n) { + BASE_OF_USN*n; } -#line 317 "inform7/Chapter 31/Invocations.w" +#line 311 "inform7/Chapter 31/Invocations.w" void Invocations__set_word_range(invocation *inv, int w1, int w2) { if (inv == NULL) internal_error("tried to set word range of null inv"); inv->invocation_w1 = w1; inv->invocation_w2 = w2; } -#line 325 "inform7/Chapter 31/Invocations.w" +#line 319 "inform7/Chapter 31/Invocations.w" void Invocations__set_verb_conjugation(invocation *inv, verb_conjugation *vc, verb_conjugation *modal, int neg) { if (inv == NULL) internal_error("tried to set VC of null inv"); @@ -100199,13 +100601,13 @@ void Invocations__set_verb_conjugation(invocation *inv, inv->say_verb_negated = neg; } -#line 336 "inform7/Chapter 31/Invocations.w" +#line 330 "inform7/Chapter 31/Invocations.w" void Invocations__set_adjectival_phrase(invocation *inv, adjectival_phrase *aph) { if (inv == NULL) internal_error("tried to set ADJ of null inv"); inv->say_adjective = aph; } -#line 345 "inform7/Chapter 31/Invocations.w" +#line 339 "inform7/Chapter 31/Invocations.w" invocation_token_list *Invocations__new_token_list(void) { invocation_token_list *itl = CREATE(invocation_token_list); itl->token_as_parsed = NULL; @@ -100215,7 +100617,7 @@ invocation_token_list *Invocations__new_token_list(void) { return itl; } -#line 358 "inform7/Chapter 31/Invocations.w" +#line 352 "inform7/Chapter 31/Invocations.w" void Invocations__set_token_check_to_do(invocation *inv, int i, specification *spec) { int k; invocation_token_list *itl; @@ -100249,7 +100651,7 @@ void Invocations__set_token_to_be_parsed_against(invocation *inv, int i, specifi } } -#line 394 "inform7/Chapter 31/Invocations.w" +#line 388 "inform7/Chapter 31/Invocations.w" specification *Invocations__get_token_check_to_do(invocation *inv, int i) { int k; invocation_token_list *itl; @@ -100297,7 +100699,7 @@ int Invocations__get_no_tokens(invocation *inv) { return k; } -#line 444 "inform7/Chapter 31/Invocations.w" +#line 438 "inform7/Chapter 31/Invocations.w" phrase *Invocations__get_phrase_invoked(invocation *inv) { if (inv == NULL) return NULL; return inv->phrase_invoked; @@ -100312,14 +100714,14 @@ void Invocations__set_instead_flag(invocation *inv, int t) { else Invocations__clear_flag(inv, INSTEAD_INVFLAG); } -#line 462 "inform7/Chapter 31/Invocations.w" +#line 456 "inform7/Chapter 31/Invocations.w" int Invocations__get_number_tokens(invocation *inv) { if (inv == NULL) internal_error("tried to read NTI of null inv"); if (inv->phrase_invoked) return Phrases__TypeData__get_no_tokens(&(inv->phrase_invoked->type_data)); return 0; } -#line 471 "inform7/Chapter 31/Invocations.w" +#line 465 "inform7/Chapter 31/Invocations.w" void Invocations__set_phrase_options(invocation *inv, int w1, int w2) { if (inv->phrase_options_invoked == NULL) { inv->phrase_options_invoked = CREATE(invocation_options); @@ -100329,7 +100731,7 @@ void Invocations__set_phrase_options(invocation *inv, int w1, int w2) { inv->phrase_options_invoked->options_invoked_w2 = w2; } -#line 483 "inform7/Chapter 31/Invocations.w" +#line 477 "inform7/Chapter 31/Invocations.w" void Invocations__get_phrase_options(invocation *inv, int *w1, int *w2) { if (inv->phrase_options_invoked == NULL) { *w1 = -1; *w2 = -1; } else { @@ -100338,7 +100740,7 @@ void Invocations__get_phrase_options(invocation *inv, int *w1, int *w2) { } } -#line 495 "inform7/Chapter 31/Invocations.w" +#line 489 "inform7/Chapter 31/Invocations.w" int Invocations__get_phrase_options_bitmap(invocation *inv) { if (inv->phrase_options_invoked == NULL) return 0; return inv->phrase_options_invoked->options; @@ -100355,7 +100757,7 @@ void Invocations__set_phrase_options_bitmap(invocation *inv, int further_bits) { inv->phrase_options_invoked->options |= further_bits; } -#line 515 "inform7/Chapter 31/Invocations.w" +#line 509 "inform7/Chapter 31/Invocations.w" int Invocations__implies_newline(invocation *inv) { if (!(Phrases__TypeData__is_a_say_phrase(inv->phrase_invoked))) return FALSE; if (!(TEST_COMPILATION_MODE(IMPLY_NEWLINES_IN_SAY_CMODE))) return FALSE; @@ -100363,21 +100765,21 @@ int Invocations__implies_newline(invocation *inv) { return TRUE; } -#line 527 "inform7/Chapter 31/Invocations.w" +#line 521 "inform7/Chapter 31/Invocations.w" invocation_list *Invocations__new_list(void) { invocation_list *invl = CREATE(invocation_list); invl->list_head = NULL; invl->list_tail = NULL; return invl; } -#line 536 "inform7/Chapter 31/Invocations.w" +#line 530 "inform7/Chapter 31/Invocations.w" void Invocations__append_list(invocation_list *to, invocation_list *from) { invocation_list_entry *ent; for (ent=from->list_head; ent; ent=ent->next) Invocations__add_to_list(to, ent->listed_inv); } -#line 545 "inform7/Chapter 31/Invocations.w" +#line 539 "inform7/Chapter 31/Invocations.w" void Invocations__add_to_list(invocation_list *invl, invocation *inv) { invocation_list_entry *ent = CREATE(invocation_list_entry); ent->listed_inv = inv; ent->next = NULL; @@ -100386,7 +100788,7 @@ void Invocations__add_to_list(invocation_list *invl, invocation *inv) { invl->list_tail = ent; } -#line 556 "inform7/Chapter 31/Invocations.w" +#line 550 "inform7/Chapter 31/Invocations.w" int Invocations__length_of_list(invocation_list *invl) { if (invl == NULL) return 0; int L = 0; @@ -100395,7 +100797,7 @@ int Invocations__length_of_list(invocation_list *invl) { return L; } -#line 571 "inform7/Chapter 31/Invocations.w" +#line 565 "inform7/Chapter 31/Invocations.w" invocation **pigeon_holes = NULL; int number_of_pigeon_holes = 0; @@ -100403,7 +100805,7 @@ void Invocations__sort_list(invocation_list *invl) { int L = Invocations__length_of_list(invl); { -#line 596 "inform7/Chapter 31/Invocations.w" +#line 590 "inform7/Chapter 31/Invocations.w" if (L > number_of_pigeon_holes) { number_of_pigeon_holes = 2*L; if (number_of_pigeon_holes < 1000) @@ -100413,7 +100815,7 @@ void Invocations__sort_list(invocation_list *invl) { } } -#line 576 "inform7/Chapter 31/Invocations.w" +#line 570 "inform7/Chapter 31/Invocations.w" ; int i; @@ -100429,7 +100831,7 @@ void Invocations__sort_list(invocation_list *invl) { ent->listed_inv = pigeon_holes[i]; } -#line 630 "inform7/Chapter 31/Invocations.w" +#line 624 "inform7/Chapter 31/Invocations.w" int Invocations__comparison(const void *i1, const void *i2) { invocation **inv1s = (invocation **) i1; invocation *inv1 = *inv1s; invocation **inv2s = (invocation **) i2; invocation *inv2 = *inv2s; @@ -100446,7 +100848,7 @@ int Invocations__comparison(const void *i1, const void *i2) { return Invocations__get_unsorted_position(inv1) - Invocations__get_unsorted_position(inv2); } -#line 687 "inform7/Chapter 31/Invocations.w" +#line 681 "inform7/Chapter 31/Invocations.w" void Invocations__log_list(invocation_list *invl) { INVOCATION_VARIABLE(inv); LOG("Invocation list (%d):\n", Invocations__length_of_list(invl)); @@ -100454,7 +100856,7 @@ void Invocations__log_list(invocation_list *invl) { LOG("P%d: $e\n", inv_pos, inv); } -#line 698 "inform7/Chapter 31/Invocations.w" +#line 692 "inform7/Chapter 31/Invocations.w" void Invocations__log_list_in_detail(invocation_list *invl) { INVOCATION_VARIABLE(inv); LOG("Invocation list in detail (%d):\n", Invocations__length_of_list(invl)); @@ -105003,17 +105405,15 @@ char uuid_text[MAX_UUID_LENGTH]; int uuid_read = -1; char *PL__Bibliographic__IFID__read_uuid(void) { - FILE *xf; char *fn; - int i=0; int c; if (uuid_read >= 0) return uuid_text; uuid_read = 0; - fn = Filenames__top_level(UUID_LEAFNAME); - xf = Platform__iso_fopen(fn, "r"); + FILE *xf = Platform__iso_fopen(filename_of_uuid, "r"); if (xf == NULL) { uuid_text[0] = 0; /* the UUID is the empty string if the file is missing */ return uuid_text; } + int i=0; int c; while (((c = fgetc(xf)) != EOF) /* the UUID file is plain text, not Unicode */ && (i < MAX_UUID_LENGTH-1)) uuid_text[i++] = (char) toupper(c); @@ -105023,7 +105423,7 @@ char *PL__Bibliographic__IFID__read_uuid(void) { return uuid_text; } -#line 57 "inform7/Chapter 33/Interactive Fiction ID.w" +#line 55 "inform7/Chapter 33/Interactive Fiction ID.w" void PL__Bibliographic__IFID__UUID_ARRAY_array(OUTPUT_STREAM) { int i; char *uuid = PL__Bibliographic__IFID__read_uuid(); @@ -105551,8 +105951,10 @@ void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) Text__dequote_word(leafname_wn); Text__dequote_word(desc_wn); PL__Bibliographic__Release__create_aux_file( - Lexer__word_text(leafname_wn), Lexer__word_text(desc_wn), - "--", payload); + Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], Lexer__word_text(leafname_wn)), + pathname_of_materials_release, + Lexer__word_text(desc_wn), + payload); break; } case CSS_PAYLOAD: case JAVASCRIPT_PAYLOAD: case HIDDEN_FILE_PAYLOAD: { @@ -105560,7 +105962,10 @@ void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) GET_RW(release_sentence_object_NTM, 1, leafname_wn, leafname_wn); Text__dequote_word(leafname_wn); PL__Bibliographic__Release__create_aux_file( - Lexer__word_text(leafname_wn), "--", "--", payload); + Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], Lexer__word_text(leafname_wn)), + pathname_of_materials_release, + "--", + payload); break; } case HIDDEN_FILE_IN_PAYLOAD: { @@ -105570,8 +105975,10 @@ void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) Text__dequote_word(leafname_wn); Text__dequote_word(folder_wn); PL__Bibliographic__Release__create_aux_file( - Lexer__word_text(leafname_wn), "--", - Lexer__word_text(folder_wn), payload); + Filenames__in_folder(pathname_of_area[MATERIALS_FS_AREA], Lexer__word_text(leafname_wn)), + Pathnames__subfolder(pathname_of_materials_release, Lexer__word_text(folder_wn)), + "--", + payload); break; } case BOOKLET_PAYLOAD: release_booklet = TRUE; break; @@ -105610,7 +106017,7 @@ void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) else { -#line 250 "inform7/Chapter 33/Release Instructions.w" +#line 257 "inform7/Chapter 33/Release Instructions.w" Problems__quote_source(1, p); Problems__Issue__handmade_problem(_P_(PM_ReleaseAlong)); Problems__issue_problem_segment( @@ -105626,22 +106033,22 @@ void PL__Bibliographic__Release__handle_release_declaration_inner(parse_node *p) ; } -#line 263 "inform7/Chapter 33/Release Instructions.w" -auxiliary_file *PL__Bibliographic__Release__create_aux_file(char *leafname, - char *desc, char *subfolder, int payload) { +#line 270 "inform7/Chapter 33/Release Instructions.w" +auxiliary_file *PL__Bibliographic__Release__create_aux_file(filename *name, + pathname *fold, char *desc, int payload) { auxiliary_file *af = CREATE(auxiliary_file); - af->leafname_in_materials_folder = leafname; + af->name_of_original_file = name; + af->folder_to_release_to = fold; af->brief_description = desc; - af->foldername_in_release_folder = subfolder; af->from_payload = payload; return af; } -#line 281 "inform7/Chapter 33/Release Instructions.w" +#line 288 "inform7/Chapter 33/Release Instructions.w" void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { { -#line 301 "inform7/Chapter 33/Release Instructions.w" +#line 308 "inform7/Chapter 33/Release Instructions.w" create_Materials = TRUE; /* thus making the next condition irrelevant */ if ((release_website) || (release_interpreter) || (release_booklet) || (release_postcard) || (release_cover) || (release_source) || (release_card) || (release_solution) || @@ -105651,78 +106058,67 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { if (create_Materials) { { -#line 316 "inform7/Chapter 33/Release Instructions.w" - if ((materials_folder[0] == 0) || - (Platform__mkdir(materials_folder) == FALSE)) { - Problems__Issue__release_problem(_P_(Untestable), +#line 323 "inform7/Chapter 33/Release Instructions.w" + if (Pathnames__create_in_file_system(pathname_of_area[MATERIALS_FS_AREA]) == FALSE) { + Problems__Issue__release_problem_path(_P_(Untestable), "In order to release the story file along with other " "resources, I tried to create a folder alongside this " "Inform project, but was unable to do so. The folder " "was to have been called", - materials_folder); + pathname_of_area[MATERIALS_FS_AREA]); return; } } -#line 308 "inform7/Chapter 33/Release Instructions.w" +#line 315 "inform7/Chapter 33/Release Instructions.w" ; { -#line 330 "inform7/Chapter 33/Release Instructions.w" - char release_folder[MAX_FILENAME_LENGTH]; - sprintf(release_folder, "%s%cRelease", materials_folder, FOLDER_SEPARATOR); - if (Platform__mkdir(release_folder) == FALSE) { - Problems__Issue__release_problem(_P_(Untestable), +#line 336 "inform7/Chapter 33/Release Instructions.w" + if (Pathnames__create_in_file_system(pathname_of_materials_release) == FALSE) { + Problems__Issue__release_problem_path(_P_(Untestable), "In order to release the story file along with other " "resources, I tried to create a folder alongside this " "Inform project, but was unable to do so. The folder " "was to have been called", - release_folder); + pathname_of_materials_release); return; } auxiliary_file *af; LOOP_OVER(af, auxiliary_file) - if (strcmp(af->foldername_in_release_folder, "--") != 0) { - char aux_folder[MAX_FILENAME_LENGTH]; - sprintf(aux_folder, "%s%c%s", release_folder, FOLDER_SEPARATOR, - af->foldername_in_release_folder); - if (Platform__mkdir(aux_folder) == FALSE) { - Problems__Issue__release_problem(_P_(Untestable), - "In order to release the story file along with other " - "resources, I tried to create a folder alongside this " - "Inform project, but was unable to do so. The folder " - "was to have been called", - aux_folder); - return; - } + if (Pathnames__create_in_file_system(af->folder_to_release_to) == FALSE) { + Problems__Issue__release_problem_path(_P_(Untestable), + "In order to release the story file along with other " + "resources, I tried to create a folder alongside this " + "Inform project, but was unable to do so. The folder " + "was to have been called", + af->folder_to_release_to); + return; } } -#line 309 "inform7/Chapter 33/Release Instructions.w" +#line 316 "inform7/Chapter 33/Release Instructions.w" ; if (release_interpreter) { -#line 361 "inform7/Chapter 33/Release Instructions.w" - char interpreter_folder[MAX_FILENAME_LENGTH]; - sprintf(interpreter_folder, "%s%cRelease%cinterpreter", - materials_folder, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - if (Platform__mkdir(interpreter_folder) == FALSE) { - Problems__Issue__release_problem(_P_(Untestable), +#line 360 "inform7/Chapter 33/Release Instructions.w" + if (Pathnames__create_in_file_system(pathname_of_released_interpreter) == FALSE) { + Problems__Issue__release_problem_path(_P_(Untestable), "In order to release the story file along with an " "interpreter, I tried to create a folder alongside this " "Inform project, but was unable to do so. The folder " "was to have been called", - interpreter_folder); + pathname_of_released_interpreter); return; } } -#line 310 "inform7/Chapter 33/Release Instructions.w" +#line 317 "inform7/Chapter 33/Release Instructions.w" ; } } -#line 282 "inform7/Chapter 33/Release Instructions.w" +#line 289 "inform7/Chapter 33/Release Instructions.w" ; int cover_picture_number = (release_cover)?1:0; @@ -105730,16 +106126,15 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { unsigned int width = 0, height = 0; { -#line 378 "inform7/Chapter 33/Release Instructions.w" +#line 374 "inform7/Chapter 33/Release Instructions.w" if (release_cover) { current_sentence = cover_filename_sentence; cover_art_format = ""; - char cover_filename[MAX_FILENAME_LENGTH]; - sprintf(cover_filename, "%s%cCover.jpg", materials_folder, FOLDER_SEPARATOR); + filename *cover_filename = filename_of_large_cover_art_jpeg; FILE *COVER_FILE = Platform__iso_fopen(cover_filename, "rb" ); if (COVER_FILE) { -#line 397 "inform7/Chapter 33/Release Instructions.w" +#line 392 "inform7/Chapter 33/Release Instructions.w" cover_art_format = "jpg"; int rv = ImageFiles__get_JPEG_dimensions(COVER_FILE, &width, &height); fclose(COVER_FILE); @@ -105751,14 +106146,14 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { } } -#line 384 "inform7/Chapter 33/Release Instructions.w" +#line 379 "inform7/Chapter 33/Release Instructions.w" else { - sprintf(cover_filename, "%s%cCover.png", materials_folder, FOLDER_SEPARATOR); + cover_filename = filename_of_large_cover_art_png; COVER_FILE = Platform__iso_fopen(cover_filename, "rb" ); if (COVER_FILE) { -#line 410 "inform7/Chapter 33/Release Instructions.w" +#line 405 "inform7/Chapter 33/Release Instructions.w" cover_art_format = "png"; int rv = ImageFiles__get_PNG_dimensions(COVER_FILE, &width, &height); fclose(COVER_FILE); @@ -105770,11 +106165,11 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { } } -#line 388 "inform7/Chapter 33/Release Instructions.w" +#line 383 "inform7/Chapter 33/Release Instructions.w" else { -#line 423 "inform7/Chapter 33/Release Instructions.w" +#line 418 "inform7/Chapter 33/Release Instructions.w" Problems__Issue__release_problem_at_sentence(_P_(Untestable), "The release instructions said that there is a cover image " "to attach to the story file, but I was unable to find it, " @@ -105783,12 +106178,12 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { return; } -#line 389 "inform7/Chapter 33/Release Instructions.w" +#line 384 "inform7/Chapter 33/Release Instructions.w" ; } { -#line 433 "inform7/Chapter 33/Release Instructions.w" +#line 428 "inform7/Chapter 33/Release Instructions.w" if ((width < 120) || (width > 1200) || (height < 120) || (height > 1200)) { Problems__Issue__release_problem(_P_(Untestable), "The height and width of the cover image, in pixels, must be " @@ -105806,22 +106201,22 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { } } -#line 391 "inform7/Chapter 33/Release Instructions.w" +#line 386 "inform7/Chapter 33/Release Instructions.w" ; } } -#line 287 "inform7/Chapter 33/Release Instructions.w" +#line 294 "inform7/Chapter 33/Release Instructions.w" ; char header[LENGTH_OF_STORY_FILE_HEADER]; /* a sequence of bytes, not a C string */ if (existing_story_file) { -#line 452 "inform7/Chapter 33/Release Instructions.w" +#line 447 "inform7/Chapter 33/Release Instructions.w" if (this_is_a_release_compile == FALSE) { -#line 477 "inform7/Chapter 33/Release Instructions.w" +#line 465 "inform7/Chapter 33/Release Instructions.w" Problems__Issue__unlocated_problem(_P_(PM_UnreleasedRelease), "This is supposed to be a source text which only contains " "release instructions to bind up an existing story file " @@ -105835,21 +106230,14 @@ void PL__Bibliographic__Release__write_ifiction_and_blurb(void) { "Frotz, etc.: just not here, within Inform.)"); } -#line 453 "inform7/Chapter 33/Release Instructions.w" +#line 448 "inform7/Chapter 33/Release Instructions.w" ; - int i; - char story_filename[2*MAX_FILENAME_LENGTH]; - if (story_filename_extension == NULL) - sprintf(story_filename, "%s%cstory.z5", - materials_folder, FOLDER_SEPARATOR); - else - sprintf(story_filename, "%s%cstory.%s", - materials_folder, FOLDER_SEPARATOR, story_filename_extension); - FILE *STORYF = Platform__iso_fopen(story_filename, "rb"); + FILE *STORYF = Platform__iso_fopen(filename_of_existing_story_file, "rb"); if (STORYF == NULL) { - Problems__Fatal__issue2("Unable to find the promised existing story file", - story_filename); + Problems__Fatal__filename_related("Unable to find the promised existing story file", + filename_of_existing_story_file); } + int i; for (i=0; i\n"); INDENT; { -#line 549 "inform7/Chapter 33/Release Instructions.w" +#line 534 "inform7/Chapter 33/Release Instructions.w" char *story_format = "zcode"; - if ((story_filename_extension) && - (strcmp(story_filename_extension, "ulx") == 0)) - story_format = "glulx"; + if (strcmp(story_filename_extension, "ulx") == 0) story_format = "glulx"; { -#line 569 "inform7/Chapter 33/Release Instructions.w" +#line 552 "inform7/Chapter 33/Release Instructions.w" WRITE("\n"); INDENT; WRITE("%s\n", PL__Bibliographic__IFID__read_uuid()); if (existing_story_file) { @@ -105948,11 +106331,11 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head OUTDENT; WRITE("\n"); } -#line 554 "inform7/Chapter 33/Release Instructions.w" +#line 537 "inform7/Chapter 33/Release Instructions.w" ; { -#line 586 "inform7/Chapter 33/Release Instructions.w" +#line 569 "inform7/Chapter 33/Release Instructions.w" WRITE("\n"); INDENT; WRITE(""); if (PL__Bibliographic__Release__write_var_to_XML(OUT, story_title_VAR, FALSE) == FALSE) WRITE("Untitled"); @@ -105987,18 +106370,20 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head OUTDENT; WRITE("</bibliographic>\n"); } -#line 555 "inform7/Chapter 33/Release Instructions.w" +#line 538 "inform7/Chapter 33/Release Instructions.w" ; if (NUMBER_CREATED(auxiliary_file) > 0) { -#line 622 "inform7/Chapter 33/Release Instructions.w" +#line 605 "inform7/Chapter 33/Release Instructions.w" auxiliary_file *af; WRITE("<resources>\n"); INDENT; LOOP_OVER(af, auxiliary_file) { WRITE("<auxiliary>\n"); INDENT; WRITE("<leafname>"); - HTML__write_xml_safe_text(OUT, af->leafname_in_materials_folder); + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, af->name_of_original_file, pathname_of_area[MATERIALS_FS_AREA]); + HTML__write_xml_safe_text(OUT, rel); WRITE("</leafname>\n"); if (af->brief_description) { WRITE("<description>"); @@ -106010,12 +106395,12 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head OUTDENT; WRITE("</resources>\n"); } -#line 557 "inform7/Chapter 33/Release Instructions.w" +#line 540 "inform7/Chapter 33/Release Instructions.w" ; if (release_cover) { -#line 642 "inform7/Chapter 33/Release Instructions.w" +#line 627 "inform7/Chapter 33/Release Instructions.w" WRITE("<cover>\n"); INDENT; WRITE("<format>%s</format>\n", cover_art_format); WRITE("<height>%d</height>\n", height); @@ -106030,17 +106415,17 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head OUTDENT; WRITE("</cover>\n"); } -#line 559 "inform7/Chapter 33/Release Instructions.w" +#line 542 "inform7/Chapter 33/Release Instructions.w" ; { -#line 658 "inform7/Chapter 33/Release Instructions.w" +#line 643 "inform7/Chapter 33/Release Instructions.w" WRITE("<releases>\n"); INDENT; WRITE("<attached>\n"); INDENT; WRITE("<release>\n"); INDENT; if (existing_story_file) { -#line 674 "inform7/Chapter 33/Release Instructions.w" +#line 659 "inform7/Chapter 33/Release Instructions.w" WRITE("<releasedate>%s%c%c-%c%c-%c%c</releasedate>\n", ((isdigit(header[0x12])) && (header[0x12] != '8') && (header[0x12] != '9'))?"20":"19", @@ -106066,11 +106451,11 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head } } -#line 661 "inform7/Chapter 33/Release Instructions.w" +#line 646 "inform7/Chapter 33/Release Instructions.w" else { -#line 701 "inform7/Chapter 33/Release Instructions.w" +#line 686 "inform7/Chapter 33/Release Instructions.w" WRITE("<releasedate>%04d-%02d-%02d</releasedate>\n", (the_present->tm_year)+1900, (the_present->tm_mon)+1, the_present->tm_mday); if ((story_release_number_VAR != NULL) && @@ -106083,18 +106468,18 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head WRITE("<compilerversion>%s</compilerversion>\n", NI_BUILD); } -#line 662 "inform7/Chapter 33/Release Instructions.w" +#line 647 "inform7/Chapter 33/Release Instructions.w" ; OUTDENT; WRITE("</release>\n"); OUTDENT; WRITE("</attached>\n"); OUTDENT; WRITE("</releases>\n"); } -#line 560 "inform7/Chapter 33/Release Instructions.w" +#line 543 "inform7/Chapter 33/Release Instructions.w" ; { -#line 715 "inform7/Chapter 33/Release Instructions.w" +#line 700 "inform7/Chapter 33/Release Instructions.w" WRITE("<colophon>\n"); INDENT; WRITE("<generator>Inform 7</generator>\n"); WRITE("<generatorversion>%s</generatorversion>\n", NI_BUILD); @@ -106103,12 +106488,12 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head OUTDENT; WRITE("</colophon>\n"); } -#line 561 "inform7/Chapter 33/Release Instructions.w" +#line 544 "inform7/Chapter 33/Release Instructions.w" ; WRITE("<%s>\n", story_format); INDENT; { -#line 726 "inform7/Chapter 33/Release Instructions.w" +#line 711 "inform7/Chapter 33/Release Instructions.w" if (existing_story_file) { WRITE("<serial>%c%c%c%c%c%c</serial>\n", header[0x12], header[0x13], header[0x14], @@ -106138,18 +106523,18 @@ void PL__Bibliographic__Release__write_ifiction_record(OUTPUT_STREAM, char *head WRITE("<coverpicture>%d</coverpicture>\n", cover_picture_number); } -#line 563 "inform7/Chapter 33/Release Instructions.w" +#line 546 "inform7/Chapter 33/Release Instructions.w" ; OUTDENT; WRITE("</%s>\n", story_format); } -#line 541 "inform7/Chapter 33/Release Instructions.w" +#line 526 "inform7/Chapter 33/Release Instructions.w" ; OUTDENT; WRITE("</story>\n"); OUTDENT; WRITE("</ifindex>\n"); } -#line 757 "inform7/Chapter 33/Release Instructions.w" +#line 742 "inform7/Chapter 33/Release Instructions.w" int PL__Bibliographic__Release__write_var_to_XML(OUTPUT_STREAM, nonlocal_variable *nlv, int desc_mode) { if ((nlv) && (NonlocalVariables__has_initial_value_set(nlv))) { NonlocalVariables__treat_as_plain_text_word(nlv); @@ -106159,18 +106544,13 @@ int PL__Bibliographic__Release__write_var_to_XML(OUTPUT_STREAM, nonlocal_variabl return FALSE; } -#line 794 "inform7/Chapter 33/Release Instructions.w" -void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materials_folder, +#line 779 "inform7/Chapter 33/Release Instructions.w" +void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, int cover_picture_number, char *cover_art_format) { - - char story_file_leafname[128]; - if (story_filename_extension == NULL) sprintf(story_file_leafname, "output.z5"); - else sprintf(story_file_leafname, "output.%s", story_filename_extension); - TEMPORARY_STREAM; { -#line 812 "inform7/Chapter 33/Release Instructions.w" +#line 792 "inform7/Chapter 33/Release Instructions.w" if ((story_title_VAR != NULL) && (NonlocalVariables__has_initial_value_set(story_title_VAR))) { BEGIN_COMPILATION_MODE; @@ -106181,85 +106561,76 @@ void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materi STREAM_WRITE(TEMP, ".%s", VirtualMachines__get_blorbed_extension()); } -#line 802 "inform7/Chapter 33/Release Instructions.w" +#line 782 "inform7/Chapter 33/Release Instructions.w" ; WRITE("! Blurb file created by Inform build %s\n\n", NI_BUILD); { -#line 824 "inform7/Chapter 33/Release Instructions.w" +#line 804 "inform7/Chapter 33/Release Instructions.w" { -#line 844 "inform7/Chapter 33/Release Instructions.w" - WRITE("status \"%s%cReserved%cCblorbModel.html\" \"%s%cBuild%cStatusCblorb.html\"\n\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR, - bundle_name, FOLDER_SEPARATOR, FOLDER_SEPARATOR); +#line 824 "inform7/Chapter 33/Release Instructions.w" + WRITE("status \"%f\" \"%f\"\n\n", + filename_of_cblorb_report_model, + filename_of_cblorb_report); } -#line 824 "inform7/Chapter 33/Release Instructions.w" +#line 804 "inform7/Chapter 33/Release Instructions.w" ; WRITE("\n! Identification\n\n", NI_BUILD); { -#line 851 "inform7/Chapter 33/Release Instructions.w" - WRITE("project folder \"%s\"\n", bundle_name); +#line 831 "inform7/Chapter 33/Release Instructions.w" + WRITE("project folder \"%p\"\n", pathname_of_project); if ((create_Materials) && (this_is_a_release_compile)) - WRITE("release to \"%s%cRelease\"\n", materials_folder, FOLDER_SEPARATOR); + WRITE("release to \"%p\"\n", pathname_of_materials_release); } -#line 826 "inform7/Chapter 33/Release Instructions.w" +#line 806 "inform7/Chapter 33/Release Instructions.w" ; WRITE("\n! Blorb instructions\n\n", NI_BUILD); { -#line 858 "inform7/Chapter 33/Release Instructions.w" +#line 838 "inform7/Chapter 33/Release Instructions.w" WRITE("storyfile leafname \""); STREAM_COPY(OUT, TEMP); WRITE("\"\n"); - if (existing_story_file) { - if (story_filename_extension == NULL) - WRITE("storyfile \"%s%cstory.z5\" include\n", - materials_folder, FOLDER_SEPARATOR); - else - WRITE("storyfile \"%s%cstory.%s\" include\n", - materials_folder, FOLDER_SEPARATOR, story_filename_extension); - } else { - WRITE("storyfile \"%s\" include\n", - Filenames__build(story_file_leafname)); - } - WRITE("ifiction \"%s\" include\n", - Filenames__top_level(METADATA_LEAFNAME)); + if (existing_story_file) + WRITE("storyfile \"%f\" include\n", filename_of_existing_story_file); + else + WRITE("storyfile \"%f\" include\n", filename_of_story_file); + WRITE("ifiction \"%f\" include\n", filename_of_ifiction_record); } -#line 828 "inform7/Chapter 33/Release Instructions.w" +#line 808 "inform7/Chapter 33/Release Instructions.w" ; { -#line 878 "inform7/Chapter 33/Release Instructions.w" +#line 850 "inform7/Chapter 33/Release Instructions.w" if (release_cover) { - WRITE("cover \"%s%cCover.%s\"\n", - materials_folder, FOLDER_SEPARATOR, cover_art_format); - WRITE("picture %d \"%s%cCover.%s\"\n", cover_picture_number, - materials_folder, FOLDER_SEPARATOR, cover_art_format); + filename *large = NULL; + if (strcmp(cover_art_format, "jpg") == 0) + large = filename_of_large_cover_art_jpeg; + else + large = filename_of_large_cover_art_png; + WRITE("cover \"%f\"\n", large); + WRITE("picture %d \"%f\"\n", cover_picture_number, large); } else { - WRITE("cover \"%s%cReserved%cDefaultCover.jpg\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - WRITE("picture %d \"%s%cReserved%cDefaultCover.jpg\"\n", 1, - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + WRITE("cover \"%f\"\n", filename_of_large_default_cover_art); + WRITE("picture %d \"%f\"\n", 1, filename_of_large_default_cover_art); if (release_website) { - WRITE("release file \"%s%cReserved%cCover.jpg\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); - WRITE("release file \"%s%cReserved%cSmall Cover.jpg\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + WRITE("release file \"%f\"\n", filename_of_large_default_cover_art); + WRITE("release file \"%f\"\n", filename_of_small_default_cover_art); } } } -#line 829 "inform7/Chapter 33/Release Instructions.w" +#line 809 "inform7/Chapter 33/Release Instructions.w" ; - PL__Figures__write_blurb_commands(OUT, materials_folder); - PL__Sounds__write_blurb_commands(OUT, materials_folder); + PL__Figures__write_blurb_commands(OUT); + PL__Sounds__write_blurb_commands(OUT); WRITE("\n! Placeholder variables\n\n", NI_BUILD); { -#line 902 "inform7/Chapter 33/Release Instructions.w" +#line 873 "inform7/Chapter 33/Release Instructions.w" WRITE("placeholder [IFID] = \"%s\"\n", PL__Bibliographic__IFID__read_uuid()); if (NonlocalVariables__has_initial_value_set(story_release_number_VAR)) { @@ -106301,12 +106672,12 @@ void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materi END_COMPILATION_MODE; } -#line 833 "inform7/Chapter 33/Release Instructions.w" +#line 813 "inform7/Chapter 33/Release Instructions.w" ; WRITE("\n! Other material to release\n\n", NI_BUILD); { -#line 945 "inform7/Chapter 33/Release Instructions.w" +#line 916 "inform7/Chapter 33/Release Instructions.w" if (release_source) { if (source_public) WRITE("source public\n"); else WRITE("source\n"); } @@ -106318,82 +106689,98 @@ void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materi } } -#line 835 "inform7/Chapter 33/Release Instructions.w" +#line 815 "inform7/Chapter 33/Release Instructions.w" ; { -#line 961 "inform7/Chapter 33/Release Instructions.w" +#line 932 "inform7/Chapter 33/Release Instructions.w" auxiliary_file *af; - LOOP_OVER(af, auxiliary_file) - WRITE("auxiliary \"%s%c%s\" \"%s\" \"%s\"\n", - materials_folder, FOLDER_SEPARATOR, - af->leafname_in_materials_folder, + LOOP_OVER(af, auxiliary_file) { + char rel[MAX_FILENAME_LENGTH]; + Pathnames__to_string_relative(rel, af->folder_to_release_to, pathname_of_materials_release); + WRITE("auxiliary \"%f\" \"%s\" \"%s\"\n", + af->name_of_original_file, (af->brief_description)?(af->brief_description):"--", - (af->foldername_in_release_folder)?(af->foldername_in_release_folder):"--"); - if (release_booklet) - WRITE("auxiliary \"%s%cReserved%cIntroductionToIF.pdf\" \"Introduction to IF\" \"--\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + (rel[0])?rel:"--"); + } + if (release_booklet) { + WRITE("auxiliary \"%f\" \"Introduction to IF\" \"--\"\n", filename_of_intro_booklet); + } if (release_postcard) { - WRITE("auxiliary \"%s%cReserved%cPostcard.pdf\" \"IF Postcard\" \"--\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + WRITE("auxiliary \"%f\" \"IF Postcard\" \"--\"\n", filename_of_intro_postcard); WRITE("placeholder [OTHERCREDITS] = \"The postcard was written by Andrew Plotkin " "and designed by Lea Albaugh.\"\n"); } } -#line 836 "inform7/Chapter 33/Release Instructions.w" +#line 816 "inform7/Chapter 33/Release Instructions.w" ; if (release_interpreter) { -#line 982 "inform7/Chapter 33/Release Instructions.w" +#line 954 "inform7/Chapter 33/Release Instructions.w" WRITE("\n! Website instructions\n\n", NI_BUILD); WRITE("placeholder [ENCODEDSTORYFILE] = \""); STREAM_COPY(OUT, TEMP); WRITE(".js\"\n"); - WRITE("template path \"%s%cTemplates\"\n", materials_folder, FOLDER_SEPARATOR); - WRITE("template path \"%s\"\n", pathname_of_templates); - WRITE("template path \"%s%cReserved%cTemplates\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + +{ +#line 996 "inform7/Chapter 33/Release Instructions.w" + for (int area=0; area<NO_FS_AREAS; area++) + WRITE("template path \"%p\"\n", pathname_of_website_templates[area]); + +} +#line 958 "inform7/Chapter 33/Release Instructions.w" +; + if (interpreter_template_leafname == NULL) interpreter_template_leafname = VirtualMachines__get_default_interpreter(); char *ext = VirtualMachines__get_blorbed_extension(); WRITE("placeholder [INTERPRETERSCRIPTS] = \" "); auxiliary_file *af; LOOP_OVER(af, auxiliary_file) - if (af->from_payload == JAVASCRIPT_PAYLOAD) - WRITE("<script src='%s'></script>", af->leafname_in_materials_folder); + if (af->from_payload == JAVASCRIPT_PAYLOAD) { + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, af->name_of_original_file, pathname_of_area[MATERIALS_FS_AREA]); + WRITE("<script src='%s'></script>", rel); + } LOOP_OVER(af, auxiliary_file) - if (af->from_payload == CSS_PAYLOAD) - WRITE("<link rel='stylesheet' href='%s' type='text/css' media='all'></link>", - af->leafname_in_materials_folder); + if (af->from_payload == CSS_PAYLOAD) { + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, af->name_of_original_file, pathname_of_area[MATERIALS_FS_AREA]); + WRITE("<link rel='stylesheet' href='%s' type='text/css' media='all'></link>", rel); + } WRITE("\"\n"); WRITE("interpreter \"%s\" \"%c\"\n", interpreter_template_leafname, ext[0]); - WRITE("base64 \"%s\" to \"%s%cRelease%cinterpreter%c", - Filenames__build(story_file_leafname), - materials_folder, FOLDER_SEPARATOR, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + WRITE("base64 \"%f\" to \"%p%c", + filename_of_story_file, pathname_of_released_interpreter, FOLDER_SEPARATOR); STREAM_COPY(OUT, TEMP); WRITE(".js\"\n"); } -#line 837 "inform7/Chapter 33/Release Instructions.w" +#line 817 "inform7/Chapter 33/Release Instructions.w" ; if (release_website) { -#line 1013 "inform7/Chapter 33/Release Instructions.w" +#line 987 "inform7/Chapter 33/Release Instructions.w" WRITE("\n! Website instructions\n\n", NI_BUILD); - WRITE("template path \"%s%cTemplates\"\n", materials_folder, FOLDER_SEPARATOR); - WRITE("template path \"%s\"\n", pathname_of_templates); - WRITE("template path \"%s%cReserved%cTemplates\"\n", - pathname_of_built_in_extensions, FOLDER_SEPARATOR, FOLDER_SEPARATOR); + +{ +#line 996 "inform7/Chapter 33/Release Instructions.w" + for (int area=0; area<NO_FS_AREAS; area++) + WRITE("template path \"%p\"\n", pathname_of_website_templates[area]); + +} +#line 988 "inform7/Chapter 33/Release Instructions.w" +; if (strcmp(website_template_leafname, "Classic") != 0) WRITE("css\n"); WRITE("website \"%s\"\n", website_template_leafname); } -#line 838 "inform7/Chapter 33/Release Instructions.w" +#line 818 "inform7/Chapter 33/Release Instructions.w" ; { -#line 1027 "inform7/Chapter 33/Release Instructions.w" +#line 1005 "inform7/Chapter 33/Release Instructions.w" parse_node *p; TREE_LOOP(p) if ((ParseTree__type(p) == SENTENCE_NT) @@ -106463,29 +106850,29 @@ void PL__Bibliographic__Release__write_release_blurb(OUTPUT_STREAM, char *materi } } -#line 839 "inform7/Chapter 33/Release Instructions.w" +#line 819 "inform7/Chapter 33/Release Instructions.w" ; } -#line 804 "inform7/Chapter 33/Release Instructions.w" +#line 784 "inform7/Chapter 33/Release Instructions.w" ; CLOSE_TEMPORARY_STREAM; } -#line 39 "inform7/Chapter 34/The Naming Thicket.w" +#line 38 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__start(void) { PLUGIN_REGISTER(PLUGIN_NEW_PROPERTY_NOTIFY, PL__Naming__naming_new_property_notify); PLUGIN_REGISTER(PLUGIN_COMPLETE_MODEL, PL__Naming__naming_complete_model); } -#line 50 "inform7/Chapter 34/The Naming Thicket.w" +#line 49 "inform7/Chapter 34/The Naming Thicket.w" int notable_naming_properties_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 61 "inform7/Chapter 34/The Naming Thicket.w" +#line 60 "inform7/Chapter 34/The Naming Thicket.w" -#line 65 "inform7/Chapter 34/The Naming Thicket.w" +#line 64 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__naming_new_property_notify(property *prn) { if (Preform__parse_nt_against_word_range(notable_naming_properties_NTM, prn->word_ref1, prn->word_ref2, NULL, NULL)) { switch (most_recent_result) { @@ -106506,7 +106893,7 @@ int PL__Naming__naming_new_property_notify(property *prn) { return FALSE; } -#line 90 "inform7/Chapter 34/The Naming Thicket.w" +#line 89 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__now_has_proper_name(inference_subject *infs) { instance *wto = InferenceSubjects__as_instance(infs); if (wto) PL__Naming__object_now_has_proper_name(wto); @@ -106524,7 +106911,7 @@ void PL__Naming__object_now_has_plural_name(instance *I) { Instances__as_subject(I), TRUE, LIKELY_CE); } -#line 116 "inform7/Chapter 34/The Naming Thicket.w" +#line 115 "inform7/Chapter 34/The Naming Thicket.w" specification *text_of_word_the = NULL; void PL__Naming__object_takes_definite_article(inference_subject *subj) { if (text_of_word_the == NULL) @@ -106532,7 +106919,7 @@ void PL__Naming__object_takes_definite_article(inference_subject *subj) { Properties__Valued__assert(P_article, subj, text_of_word_the, LIKELY_CE); } -#line 128 "inform7/Chapter 34/The Naming Thicket.w" +#line 127 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__transfer_details(inference_subject *from, inference_subject *to) { instance *wto = InferenceSubjects__as_instance(to); if (wto) { @@ -106549,7 +106936,7 @@ instance *PL__Naming__object_this_is_named_after(instance *I) { Instances__as_subject(I))); } -#line 149 "inform7/Chapter 34/The Naming Thicket.w" +#line 148 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__object_is_privately_named(instance *I) { int certainty = World__Inferences__get_EO_state(Instances__as_subject(I), P_privately_named); if (certainty > 0) return TRUE; @@ -106557,11 +106944,11 @@ int PL__Naming__object_is_privately_named(instance *I) { return NOT_APPLICABLE; } -#line 161 "inform7/Chapter 34/The Naming Thicket.w" +#line 160 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__naming_complete_model(int stage) { if (stage == 3) { -#line 170 "inform7/Chapter 34/The Naming Thicket.w" +#line 169 "inform7/Chapter 34/The Naming Thicket.w" kind *K; LOOP_OVER_BASE_KINDS(K) if (Kinds__Compare__lt(K, K_object)) { @@ -106571,7 +106958,7 @@ int PL__Naming__naming_complete_model(int stage) { inference_subject *subj = Kinds__Behaviour__as_subject(K); { -#line 219 "inform7/Chapter 34/The Naming Thicket.w" +#line 203 "inform7/Chapter 34/The Naming Thicket.w" int j; for (j=w1; ((j>=0) && (j<=w2)); j++) { if (Lexer__word(j) == COMMA_V) { @@ -106599,11 +106986,11 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 177 "inform7/Chapter 34/The Naming Thicket.w" +#line 176 "inform7/Chapter 34/The Naming Thicket.w" ; { -#line 396 "inform7/Chapter 34/The Naming Thicket.w" +#line 380 "inform7/Chapter 34/The Naming Thicket.w" if ((Kinds__Compare__le(K, K_room) == FALSE) && (Kinds__Compare__eq(K, K_thing) == FALSE) && (World__Inferences__get_prop_state_without_inheritance( @@ -106619,7 +107006,7 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 178 "inform7/Chapter 34/The Naming Thicket.w" +#line 177 "inform7/Chapter 34/The Naming Thicket.w" ; } instance *I; @@ -106636,7 +107023,7 @@ int PL__Naming__naming_complete_model(int stage) { this_is_named_for_something_with_a_printed_name = TRUE; { -#line 219 "inform7/Chapter 34/The Naming Thicket.w" +#line 203 "inform7/Chapter 34/The Naming Thicket.w" int j; for (j=w1; ((j>=0) && (j<=w2)); j++) { if (Lexer__word(j) == COMMA_V) { @@ -106664,25 +107051,11 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 192 "inform7/Chapter 34/The Naming Thicket.w" -; - -{ -#line 205 "inform7/Chapter 34/The Naming Thicket.w" - if (P_list_together == NULL) - P_list_together = Properties__Valued__new_nameless( - "list_together", K_number); - - specification *zero = Specifications__Values__new_integer_literal(0); - Properties__Valued__assert(P_list_together, subj, - zero, CERTAIN_CE); - -} -#line 193 "inform7/Chapter 34/The Naming Thicket.w" +#line 191 "inform7/Chapter 34/The Naming Thicket.w" ; if (this_has_a_printed_name == FALSE) { -#line 248 "inform7/Chapter 34/The Naming Thicket.w" +#line 232 "inform7/Chapter 34/The Naming Thicket.w" if (this_has_a_printed_name == FALSE) { int w1, w2; Instances__get_name_in_play(I, &w1, &w2, FALSE); @@ -106697,7 +107070,7 @@ int PL__Naming__naming_complete_model(int stage) { } { -#line 267 "inform7/Chapter 34/The Naming Thicket.w" +#line 251 "inform7/Chapter 34/The Naming Thicket.w" int faux = FALSE; STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) @@ -106706,13 +107079,13 @@ int PL__Naming__naming_complete_model(int stage) { if (this_is_named_for_something_with_a_printed_name) { -#line 333 "inform7/Chapter 34/The Naming Thicket.w" +#line 317 "inform7/Chapter 34/The Naming Thicket.w" faux = TRUE; instance *owner = PL__Naming__object_this_is_named_after(I); STREAM_WRITE(PROP, "SN_R_A_%d", sn_r_counter); { -#line 383 "inform7/Chapter 34/The Naming Thicket.w" +#line 367 "inform7/Chapter 34/The Naming Thicket.w" if (SNAMES == NULL) { SNAMES = &SNAMES_struct; if (STREAM_OPEN_IN_MEMORY(SNAMES) == FALSE) @@ -106720,7 +107093,7 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 336 "inform7/Chapter 34/The Naming Thicket.w" +#line 320 "inform7/Chapter 34/The Naming Thicket.w" ; STREAM_WRITE(SNAMES, "Array SN_R_A_%d --> CONSTANT_PACKED_TEXT_STORAGE SN_R_%d;\n", sn_r_counter, sn_r_counter); @@ -106739,15 +107112,15 @@ int PL__Naming__naming_complete_model(int stage) { SNAMES = Routines__end(SNAMES); } -#line 273 "inform7/Chapter 34/The Naming Thicket.w" +#line 257 "inform7/Chapter 34/The Naming Thicket.w" else { -#line 319 "inform7/Chapter 34/The Naming Thicket.w" +#line 303 "inform7/Chapter 34/The Naming Thicket.w" PL__Naming__compose_words_to_I6_naming_text(PROP, w1, w2, FALSE, (this_is_a_room)?FALSE:TRUE); } -#line 274 "inform7/Chapter 34/The Naming Thicket.w" +#line 258 "inform7/Chapter 34/The Naming Thicket.w" ; if (faux) @@ -106758,11 +107131,11 @@ int PL__Naming__naming_complete_model(int stage) { Specifications__Values__new_text_literal_from_stream(PROP), CERTAIN_CE); } -#line 260 "inform7/Chapter 34/The Naming Thicket.w" +#line 244 "inform7/Chapter 34/The Naming Thicket.w" ; { -#line 289 "inform7/Chapter 34/The Naming Thicket.w" +#line 273 "inform7/Chapter 34/The Naming Thicket.w" int set_csn = TRUE, faux = FALSE; STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) @@ -106770,13 +107143,13 @@ int PL__Naming__naming_complete_model(int stage) { if (this_is_named_for_something_with_a_printed_name) { -#line 356 "inform7/Chapter 34/The Naming Thicket.w" +#line 340 "inform7/Chapter 34/The Naming Thicket.w" faux = TRUE; instance *owner = PL__Naming__object_this_is_named_after(I); STREAM_WRITE(PROP, "SN_R_A_%d", sn_r_counter); { -#line 383 "inform7/Chapter 34/The Naming Thicket.w" +#line 367 "inform7/Chapter 34/The Naming Thicket.w" if (SNAMES == NULL) { SNAMES = &SNAMES_struct; if (STREAM_OPEN_IN_MEMORY(SNAMES) == FALSE) @@ -106784,7 +107157,7 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 359 "inform7/Chapter 34/The Naming Thicket.w" +#line 343 "inform7/Chapter 34/The Naming Thicket.w" ; STREAM_WRITE(SNAMES, "Array SN_R_A_%d --> CONSTANT_PACKED_TEXT_STORAGE SN_R_%d;\n", sn_r_counter, sn_r_counter); @@ -106807,18 +107180,18 @@ int PL__Naming__naming_complete_model(int stage) { SNAMES = Routines__end(SNAMES); } -#line 294 "inform7/Chapter 34/The Naming Thicket.w" +#line 278 "inform7/Chapter 34/The Naming Thicket.w" else { if ((World__Inferences__get_EO_state(subj, P_proper_named) > 0) && (begins_with_lower_case)) { -#line 324 "inform7/Chapter 34/The Naming Thicket.w" +#line 308 "inform7/Chapter 34/The Naming Thicket.w" PL__Naming__compose_words_to_I6_naming_text(PROP, w1, w2, TRUE, (this_is_a_room)?FALSE:TRUE); } -#line 298 "inform7/Chapter 34/The Naming Thicket.w" +#line 282 "inform7/Chapter 34/The Naming Thicket.w" else set_csn = FALSE; } @@ -106835,17 +107208,17 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 261 "inform7/Chapter 34/The Naming Thicket.w" +#line 245 "inform7/Chapter 34/The Naming Thicket.w" ; } } -#line 194 "inform7/Chapter 34/The Naming Thicket.w" +#line 192 "inform7/Chapter 34/The Naming Thicket.w" ; if (language_of_play != English_language) { -#line 413 "inform7/Chapter 34/The Naming Thicket.w" +#line 397 "inform7/Chapter 34/The Naming Thicket.w" specification *spec = World__Inferences__get_prop_state(subj, P_grammatical_gender); if (spec) { int g = Specifications__get_data(spec, CONSTANT_ENUMERATION_SPDATA); @@ -106866,17 +107239,17 @@ int PL__Naming__naming_complete_model(int stage) { } } -#line 196 "inform7/Chapter 34/The Naming Thicket.w" +#line 194 "inform7/Chapter 34/The Naming Thicket.w" ; } } -#line 162 "inform7/Chapter 34/The Naming Thicket.w" +#line 161 "inform7/Chapter 34/The Naming Thicket.w" ; return FALSE; } -#line 439 "inform7/Chapter 34/The Naming Thicket.w" +#line 423 "inform7/Chapter 34/The Naming Thicket.w" int PL__Naming__look_for_printed_name(inference_subject *subj) { inference_subject *check; for (check = subj; check; check = InferenceSubjects__narrowest_broader_subject(check)) { @@ -106889,7 +107262,7 @@ int PL__Naming__look_for_printed_name(inference_subject *subj) { return FALSE; } -#line 455 "inform7/Chapter 34/The Naming Thicket.w" +#line 439 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__compose_words_to_I6_naming_text(OUTPUT_STREAM, int w1, int w2, int cap, int your_flag) { WRITE("\""); int j; @@ -106917,7 +107290,7 @@ void PL__Naming__compose_words_to_I6_naming_text(OUTPUT_STREAM, int w1, int w2, WRITE("\""); } -#line 485 "inform7/Chapter 34/The Naming Thicket.w" +#line 469 "inform7/Chapter 34/The Naming Thicket.w" void PL__Naming__compile_small_names(OUTPUT_STREAM) { if (SNAMES) { STREAM_COPY(OUT, SNAMES); @@ -109521,7 +109894,7 @@ int PL__Regions__regions_add_to_World_index(instance *O) { return FALSE; } -#line 100 "inform7/Chapter 34/The Map.w" +#line 96 "inform7/Chapter 34/The Map.w" void PL__Map__start(void) { PLUGIN_REGISTER(PLUGIN_NEW_BASE_KIND_NOTIFY, PL__Map__map_new_base_kind_notify); PLUGIN_REGISTER(PLUGIN_NEW_SUBJECT_NOTIFY, PL__Map__map_new_subject_notify); @@ -109542,7 +109915,7 @@ void PL__Map__start(void) { PLUGIN_REGISTER(PLUGIN_ANNOTATE_IN_WORLD_INDEX, PL__Map__map_annotate_in_World_index); } -#line 123 "inform7/Chapter 34/The Map.w" +#line 119 "inform7/Chapter 34/The Map.w" map_data *PL__Map__new_data(inference_subject *subj) { map_data *md = CREATE(map_data); md->direction_index = -1; @@ -109560,7 +109933,7 @@ map_data *PL__Map__new_data(inference_subject *subj) { return md; } -#line 143 "inform7/Chapter 34/The Map.w" +#line 139 "inform7/Chapter 34/The Map.w" int PL__Map__map_log_inference_type(int it) { switch(it) { case DIRECTION_INF: LOG("DIRECTION_INF"); return TRUE; @@ -109568,7 +109941,7 @@ int PL__Map__map_log_inference_type(int it) { return FALSE; } -#line 156 "inform7/Chapter 34/The Map.w" +#line 152 "inform7/Chapter 34/The Map.w" int PL__Map__map_inferences_contradict(inference *A, inference *B, int similarity) { switch (World__Inferences__get_inference_type(A)) { case DIRECTION_INF: @@ -109578,14 +109951,14 @@ int PL__Map__map_inferences_contradict(inference *A, inference *B, int similarit return FALSE; } -#line 171 "inform7/Chapter 34/The Map.w" +#line 167 "inform7/Chapter 34/The Map.w" int notable_map_kinds_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 174 "inform7/Chapter 34/The Map.w" +#line 170 "inform7/Chapter 34/The Map.w" -#line 178 "inform7/Chapter 34/The Map.w" +#line 174 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) { if (Preform__parse_nt_against_word_range(notable_map_kinds_NTM, w1, w2, NULL, NULL)) { switch (most_recent_result) { @@ -109596,7 +109969,7 @@ int PL__Map__map_new_base_kind_notify(kind *new_base, char *name, int w1, int w2 return FALSE; } -#line 191 "inform7/Chapter 34/The Map.w" +#line 187 "inform7/Chapter 34/The Map.w" int PL__Map__map_set_subkind_notify(kind *sub, kind *super) { if ((sub == K_direction) && (super != K_object)) { Problems__Issue__sentence_problem(_P_(PM_DirectionAdrift), @@ -109609,13 +109982,13 @@ int PL__Map__map_set_subkind_notify(kind *sub, kind *super) { return FALSE; } -#line 206 "inform7/Chapter 34/The Map.w" +#line 202 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_subject_notify(inference_subject *subj) { CREATE_PF_DATA(map, subj, PL__Map__new_data); return FALSE; } -#line 214 "inform7/Chapter 34/The Map.w" +#line 210 "inform7/Chapter 34/The Map.w" int PL__Map__object_is_a_direction(instance *I) { if ((Plugins__Manage__plugged_in(map_plugin)) && (K_direction) && (I) && (Instances__of_kind(I, K_direction))) @@ -109623,7 +109996,7 @@ int PL__Map__object_is_a_direction(instance *I) { return FALSE; } -#line 224 "inform7/Chapter 34/The Map.w" +#line 220 "inform7/Chapter 34/The Map.w" int PL__Map__object_is_a_door(instance *I) { if ((Plugins__Manage__plugged_in(map_plugin)) && (K_door) && (I) && (Instances__of_kind(I, K_door))) @@ -109636,23 +110009,23 @@ int PL__Map__subject_is_a_door(inference_subject *infs) { InferenceSubjects__as_instance(infs)); } -#line 244 "inform7/Chapter 34/The Map.w" +#line 240 "inform7/Chapter 34/The Map.w" int PL__Map__is_a_direction(inference_subject *infs) { if (K_direction == NULL) return FALSE; /* in particular, if we aren't using the IF model */ return InferenceSubjects__is_within(infs, Kinds__Behaviour__as_subject(K_direction)); } -#line 254 "inform7/Chapter 34/The Map.w" +#line 250 "inform7/Chapter 34/The Map.w" int registered_directions = 0; /* next direction number to be free */ -#line 261 "inform7/Chapter 34/The Map.w" +#line 257 "inform7/Chapter 34/The Map.w" int notable_map_directions_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 264 "inform7/Chapter 34/The Map.w" +#line 260 "inform7/Chapter 34/The Map.w" -#line 268 "inform7/Chapter 34/The Map.w" +#line 264 "inform7/Chapter 34/The Map.w" int PL__Map__map_set_kind_notify(instance *I, kind *k) { kind *kw = Instances__kind(I); if ((!(Kinds__Compare__le(kw, K_direction))) && @@ -109661,7 +110034,7 @@ int PL__Map__map_set_kind_notify(instance *I, kind *k) { Instances__get_name(I, &w1, &w2, FALSE); { -#line 290 "inform7/Chapter 34/The Map.w" +#line 286 "inform7/Chapter 34/The Map.w" if (w1 < 0) { Problems__Issue__sentence_problem(_P_(PM_NamelessDirection), "nameless directions are not allowed", @@ -109676,7 +110049,7 @@ int PL__Map__map_set_kind_notify(instance *I, kind *k) { } } -#line 274 "inform7/Chapter 34/The Map.w" +#line 270 "inform7/Chapter 34/The Map.w" ; if (Preform__parse_nt_against_word_range(notable_map_directions_NTM, w1, w2, NULL, NULL)) { switch (most_recent_result) { @@ -109687,7 +110060,7 @@ int PL__Map__map_set_kind_notify(instance *I, kind *k) { PL__Naming__object_takes_definite_article(Instances__as_subject(I)); { -#line 306 "inform7/Chapter 34/The Map.w" +#line 302 "inform7/Chapter 34/The Map.w" int dn = registered_directions++; PF_I(map, I)->direction_index = dn; char i6_identifier_constant[32]; @@ -109695,13 +110068,13 @@ int PL__Map__map_set_kind_notify(instance *I, kind *k) { PL__MapDirections__make_mapped_predicate(I, i6_identifier_constant); } -#line 282 "inform7/Chapter 34/The Map.w" +#line 278 "inform7/Chapter 34/The Map.w" ; } return FALSE; } -#line 318 "inform7/Chapter 34/The Map.w" +#line 314 "inform7/Chapter 34/The Map.w" int PL__Map__map_compile_object_header(OUTPUT_STREAM, instance *I) { if (PL__Map__object_is_a_direction(I)) { WRITE("Object %s \"\" Compass", Instances__identifier(I)); @@ -109710,7 +110083,7 @@ int PL__Map__map_compile_object_header(OUTPUT_STREAM, instance *I) { return FALSE; } -#line 340 "inform7/Chapter 34/The Map.w" +#line 336 "inform7/Chapter 34/The Map.w" void PL__Map__build_exits_array(void) { instance *I; LOOP_OVER_OBJECT_INSTANCES(I) { @@ -109732,11 +110105,11 @@ void PL__Map__build_exits_array(void) { } } -#line 365 "inform7/Chapter 34/The Map.w" +#line 361 "inform7/Chapter 34/The Map.w" int PL__Map__map_compile_model_tables(OUTPUT_STREAM) { { -#line 374 "inform7/Chapter 34/The Map.w" +#line 370 "inform7/Chapter 34/The Map.w" WRITE("Constant No_Directions = %d;\n", registered_directions); WRITE("! Table of direction object alias constants:\n"); instance *I; @@ -109745,11 +110118,11 @@ int PL__Map__map_compile_model_tables(OUTPUT_STREAM) { PF_I(map, I)->direction_index, Instances__identifier(I)); } -#line 366 "inform7/Chapter 34/The Map.w" +#line 362 "inform7/Chapter 34/The Map.w" ; { -#line 388 "inform7/Chapter 34/The Map.w" +#line 384 "inform7/Chapter 34/The Map.w" WRITE("Array Map_Storage -->\n"); if (existing_story_file) { WRITE(" 0 0 0 0;\n\n"); /* as there are no rooms then */ @@ -109775,25 +110148,25 @@ int PL__Map__map_compile_model_tables(OUTPUT_STREAM) { } } -#line 367 "inform7/Chapter 34/The Map.w" +#line 363 "inform7/Chapter 34/The Map.w" ; return FALSE; } -#line 421 "inform7/Chapter 34/The Map.w" +#line 417 "inform7/Chapter 34/The Map.w" void PL__Map__get_door_data(instance *door, instance **c1, instance **c2) { if (c1) *c1 = PF_I(map, door)->map_connection_a; if (c2) *c2 = PF_I(map, door)->map_connection_b; } -#line 432 "inform7/Chapter 34/The Map.w" +#line 428 "inform7/Chapter 34/The Map.w" int notable_map_properties_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 435 "inform7/Chapter 34/The Map.w" +#line 431 "inform7/Chapter 34/The Map.w" -#line 439 "inform7/Chapter 34/The Map.w" +#line 435 "inform7/Chapter 34/The Map.w" int PL__Map__map_new_property_notify(property *prn) { if (Preform__parse_nt_against_word_range(notable_map_properties_NTM, prn->word_ref1, prn->word_ref2, NULL, NULL)) { switch (most_recent_result) { @@ -109804,7 +110177,7 @@ int PL__Map__map_new_property_notify(property *prn) { return FALSE; } -#line 458 "inform7/Chapter 34/The Map.w" +#line 454 "inform7/Chapter 34/The Map.w" int PL__Map__map_property_value_notify(property *prn, specification *val) { if (prn == P_other_side) { instance *I = Specifications__Values__instance_of_CONSTANT_object_if_any(val); @@ -109816,7 +110189,7 @@ int PL__Map__map_property_value_notify(property *prn, specification *val) { return FALSE; } -#line 476 "inform7/Chapter 34/The Map.w" +#line 472 "inform7/Chapter 34/The Map.w" void PL__Map__set_found_in(instance *I, STREAM *S) { if (P_found_in == NULL) P_found_in = Properties__Valued__new_nameless("found_in", @@ -109828,7 +110201,7 @@ void PL__Map__set_found_in(instance *I, STREAM *S) { Specifications__Values__faux_text_literal_from_stream(S), CERTAIN_CE); } -#line 493 "inform7/Chapter 34/The Map.w" +#line 489 "inform7/Chapter 34/The Map.w" instance *PL__Map__get_value_of_opposite_property(instance *I) { specification *val = World__Inferences__get_prop_state( Instances__as_subject(I), P_opposite); @@ -109836,21 +110209,21 @@ instance *PL__Map__get_value_of_opposite_property(instance *I) { return NULL; } -#line 503 "inform7/Chapter 34/The Map.w" +#line 499 "inform7/Chapter 34/The Map.w" int PL__Map__map_estimate_property_usage(kind *k, int *words_used) { if (Kinds__Compare__eq(k, K_door)) *words_used += 14; if (Kinds__Compare__eq(k, K_room)) *words_used += 2; return FALSE; } -#line 513 "inform7/Chapter 34/The Map.w" +#line 509 "inform7/Chapter 34/The Map.w" int notable_map_noun_phrases_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 516 "inform7/Chapter 34/The Map.w" +#line 512 "inform7/Chapter 34/The Map.w" -#line 520 "inform7/Chapter 34/The Map.w" +#line 516 "inform7/Chapter 34/The Map.w" int PL__Map__map_act_on_special_NPs(parse_node *p) { if (Preform__parse_nt_against_word_range(notable_map_noun_phrases_NTM, p->word_ref1, p->word_ref2, NULL, NULL)) { switch (most_recent_result) { @@ -109871,7 +110244,7 @@ int PL__Map__map_act_on_special_NPs(parse_node *p) { return FALSE; } -#line 543 "inform7/Chapter 34/The Map.w" +#line 539 "inform7/Chapter 34/The Map.w" int PL__Map__map_check_going(specification *from, specification *to, specification *by, specification *through, specification *pushing) { if (PL__Actions__Patterns__check_going(from, "from", @@ -109887,7 +110260,7 @@ int PL__Map__map_check_going(specification *from, specification *to, return TRUE; } -#line 576 "inform7/Chapter 34/The Map.w" +#line 572 "inform7/Chapter 34/The Map.w" int PL__Map__map_intervene_in_assertion(parse_node *px, parse_node *py) { if ((ParseTree__type(px) == PROPER_NOUN_NT) && (ParseTree__type(py) == COMMON_NOUN_NT)) { @@ -109908,12 +110281,12 @@ int PL__Map__map_intervene_in_assertion(parse_node *px, parse_node *py) { return FALSE; } -#line 606 "inform7/Chapter 34/The Map.w" +#line 602 "inform7/Chapter 34/The Map.w" int oneway_map_connections_only = FALSE; void PL__Map__enter_one_way_mode(void) { oneway_map_connections_only = TRUE; } void PL__Map__exit_one_way_mode(void) { oneway_map_connections_only = FALSE; } -#line 617 "inform7/Chapter 34/The Map.w" +#line 613 "inform7/Chapter 34/The Map.w" void PL__Map__connect(inference_subject *i_from, inference_subject *i_to, inference_subject *i_dir) { instance *go_from = InferenceSubjects__as_instance(i_from); @@ -109951,13 +110324,13 @@ void PL__Map__oneway_map_connection(instance *go_from, instance *go_to, prevailing_mood = x; } -#line 659 "inform7/Chapter 34/The Map.w" +#line 655 "inform7/Chapter 34/The Map.w" int PL__Map__map_complete_model(int stage) { switch (stage) { case 2: { -#line 688 "inform7/Chapter 34/The Map.w" +#line 684 "inform7/Chapter 34/The Map.w" P_room_index = Properties__Valued__new_nameless("room_index", K_number); specification *minus_one = Specifications__Values__new_integer_literal(-1); @@ -109968,11 +110341,11 @@ int PL__Map__map_complete_model(int stage) { Instances__as_subject(I), minus_one, CERTAIN_CE); } -#line 662 "inform7/Chapter 34/The Map.w" +#line 658 "inform7/Chapter 34/The Map.w" ; { -#line 701 "inform7/Chapter 34/The Map.w" +#line 697 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) { inference *inf; @@ -110000,12 +110373,12 @@ int PL__Map__map_complete_model(int stage) { } } -#line 663 "inform7/Chapter 34/The Map.w" +#line 659 "inform7/Chapter 34/The Map.w" ; if (problem_count > 0) break; { -#line 730 "inform7/Chapter 34/The Map.w" +#line 726 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) if (PL__Map__object_is_a_door(I)) { @@ -110052,7 +110425,7 @@ int PL__Map__map_complete_model(int stage) { } if (connections_in == 0) { -#line 781 "inform7/Chapter 34/The Map.w" +#line 777 "inform7/Chapter 34/The Map.w" Problems__Issue__object_problem(_P_(PM_DoorUnconnected), I, "seems to be a door with no way in or out", @@ -110061,11 +110434,11 @@ int PL__Map__map_complete_model(int stage) { "east of the Library and west of the Conservatory'."); } -#line 774 "inform7/Chapter 34/The Map.w" +#line 770 "inform7/Chapter 34/The Map.w" ; if (connections_in > 2) { -#line 791 "inform7/Chapter 34/The Map.w" +#line 787 "inform7/Chapter 34/The Map.w" Problems__quote_object(1, I); Problems__quote_source(2, where[0]); Problems__quote_source(3, where[1]); @@ -110080,17 +110453,17 @@ int PL__Map__map_complete_model(int stage) { Problems__issue_problem_end(); } -#line 775 "inform7/Chapter 34/The Map.w" +#line 771 "inform7/Chapter 34/The Map.w" ; } } -#line 665 "inform7/Chapter 34/The Map.w" +#line 661 "inform7/Chapter 34/The Map.w" ; if (problem_count > 0) break; { -#line 811 "inform7/Chapter 34/The Map.w" +#line 807 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) if (PL__Spatial__object_is_a_room(I)) { @@ -110131,12 +110504,12 @@ int PL__Map__map_complete_model(int stage) { } } -#line 667 "inform7/Chapter 34/The Map.w" +#line 663 "inform7/Chapter 34/The Map.w" ; if (problem_count > 0) break; { -#line 853 "inform7/Chapter 34/The Map.w" +#line 849 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) if ((PL__Map__object_is_a_door(I)) && @@ -110153,12 +110526,12 @@ int PL__Map__map_complete_model(int stage) { "two-sided at once, I'm going to object to this."); } -#line 669 "inform7/Chapter 34/The Map.w" +#line 665 "inform7/Chapter 34/The Map.w" ; if (problem_count > 0) break; { -#line 876 "inform7/Chapter 34/The Map.w" +#line 872 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) if ((PL__Map__object_is_a_door(I)) && @@ -110171,12 +110544,12 @@ int PL__Map__map_complete_model(int stage) { "between, but not in a third place altogether."); } -#line 671 "inform7/Chapter 34/The Map.w" +#line 667 "inform7/Chapter 34/The Map.w" ; if (problem_count > 0) break; { -#line 892 "inform7/Chapter 34/The Map.w" +#line 888 "inform7/Chapter 34/The Map.w" instance *I; LOOP_OVER_OBJECT_INSTANCES(I) if ((PL__Map__object_is_a_door(I)) && @@ -110185,11 +110558,11 @@ int PL__Map__map_complete_model(int stage) { PL__Spatial__set_progenitor(I, PF_I(map, I)->map_connection_a, NULL); } -#line 673 "inform7/Chapter 34/The Map.w" +#line 669 "inform7/Chapter 34/The Map.w" ; { -#line 905 "inform7/Chapter 34/The Map.w" +#line 901 "inform7/Chapter 34/The Map.w" P_door_dir = Properties__Valued__new_nameless("door_dir", K_value); P_door_to = Properties__Valued__new_nameless("door_to", K_value); @@ -110203,7 +110576,7 @@ int PL__Map__map_complete_model(int stage) { if (R1 && R2) { { -#line 927 "inform7/Chapter 34/The Map.w" +#line 923 "inform7/Chapter 34/The Map.w" STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) Problems__Fatal__issue("Out of memory: can't allocate for found-in text"); @@ -110212,11 +110585,11 @@ int PL__Map__map_complete_model(int stage) { PL__Map__set_found_in(I, PROP); } -#line 916 "inform7/Chapter 34/The Map.w" +#line 912 "inform7/Chapter 34/The Map.w" ; { -#line 938 "inform7/Chapter 34/The Map.w" +#line 934 "inform7/Chapter 34/The Map.w" STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) Problems__Fatal__issue("Out of memory: can't allocate for door-dir text"); @@ -110237,11 +110610,11 @@ int PL__Map__map_complete_model(int stage) { Specifications__Values__faux_text_literal_from_stream(PROP), CERTAIN_CE); } -#line 917 "inform7/Chapter 34/The Map.w" +#line 913 "inform7/Chapter 34/The Map.w" ; { -#line 961 "inform7/Chapter 34/The Map.w" +#line 957 "inform7/Chapter 34/The Map.w" STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) Problems__Fatal__issue("Out of memory: can't allocate for door-to text"); @@ -110258,12 +110631,12 @@ int PL__Map__map_complete_model(int stage) { Specifications__Values__faux_text_literal_from_stream(PROP), CERTAIN_CE); } -#line 918 "inform7/Chapter 34/The Map.w" +#line 914 "inform7/Chapter 34/The Map.w" ; } else if (R1) { { -#line 988 "inform7/Chapter 34/The Map.w" +#line 984 "inform7/Chapter 34/The Map.w" instance *backwards = PL__Map__get_value_of_opposite_property(D1); if (backwards) { STREAM *PROP = STREAM_NEW; @@ -110275,13 +110648,13 @@ int PL__Map__map_complete_model(int stage) { } } -#line 920 "inform7/Chapter 34/The Map.w" +#line 916 "inform7/Chapter 34/The Map.w" ; } } } -#line 674 "inform7/Chapter 34/The Map.w" +#line 670 "inform7/Chapter 34/The Map.w" ; break; case 4: PL__Map__build_exits_array(); break; @@ -110289,7 +110662,7 @@ int PL__Map__map_complete_model(int stage) { return FALSE; } -#line 1001 "inform7/Chapter 34/The Map.w" +#line 997 "inform7/Chapter 34/The Map.w" int PL__Map__map_add_to_World_index(instance *O) { if ((O) && (Instances__of_kind(O, K_room))) { PL__SpatialMap__index_room_connections(O); @@ -110477,14 +110850,14 @@ instance *PL__MapDirections__get_mapping_direction(binary_predicate *bp) { } -#line 61 "inform7/Chapter 34/Spatial Geometry.w" +#line 55 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec(int x, int y, int z) { vector R; R.x = x; R.y = y; R.z = z; return R; } -#line 70 "inform7/Chapter 34/Spatial Geometry.w" +#line 64 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__vec_eq(vector U, vector V) { if ((U.x == V.x) && (U.y == V.y) && (U.z == V.z)) return TRUE; return FALSE; @@ -110495,7 +110868,7 @@ int Geometry__vec_lateral(vector V) { return TRUE; } -#line 83 "inform7/Chapter 34/Spatial Geometry.w" +#line 77 "inform7/Chapter 34/Spatial Geometry.w" vector Geometry__vec_plus(vector U, vector V) { vector R; R.x = U.x + V.x; R.y = U.y + V.y; R.z = U.z + V.z; @@ -110520,7 +110893,7 @@ vector Geometry__vec_scale(int lambda, vector V) { return R; } -#line 110 "inform7/Chapter 34/Spatial Geometry.w" +#line 104 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__vec_length_squared(vector V) { return V.x*V.x + V.y*V.y + V.z*V.z; } @@ -110529,7 +110902,7 @@ float Geometry__vec_length(vector V) { return (float) (sqrt(Geometry__vec_length_squared(V))); } -#line 127 "inform7/Chapter 34/Spatial Geometry.w" +#line 121 "inform7/Chapter 34/Spatial Geometry.w" float Geometry__vec_angular_separation(vector E, vector D) { float E_distance = Geometry__vec_length(E); float uex = E.x/E_distance, uey = E.y/E_distance, uez = E.z/E_distance; @@ -110538,7 +110911,7 @@ float Geometry__vec_angular_separation(vector E, vector D) { return (uex-udx)*(uex-udx) + (uey-udy)*(uey-udy) + (uez-udz)*(uez-udz); } -#line 140 "inform7/Chapter 34/Spatial Geometry.w" +#line 134 "inform7/Chapter 34/Spatial Geometry.w" cuboid Geometry__empty_cuboid(void) { cuboid C; C.population = 0; @@ -110559,7 +110932,7 @@ void Geometry__adjust_cuboid(cuboid *C, vector V) { } } -#line 163 "inform7/Chapter 34/Spatial Geometry.w" +#line 157 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__merge_cuboid(cuboid *C, cuboid X) { if (X.population > 0) { if (C->population == 0) { @@ -110572,7 +110945,7 @@ void Geometry__merge_cuboid(cuboid *C, cuboid X) { } } -#line 179 "inform7/Chapter 34/Spatial Geometry.w" +#line 173 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__cuboid_translate(cuboid *C, vector D) { if (C->population > 0) { C->corner0 = Geometry__vec_plus(C->corner0, D); @@ -110580,7 +110953,7 @@ void Geometry__cuboid_translate(cuboid *C, vector D) { } } -#line 189 "inform7/Chapter 34/Spatial Geometry.w" +#line 183 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__within_cuboid(vector P, cuboid C) { if (C.population == 0) return FALSE; if (P.x < C.corner0.x) return FALSE; @@ -110592,7 +110965,7 @@ int Geometry__within_cuboid(vector P, cuboid C) { return TRUE; } -#line 206 "inform7/Chapter 34/Spatial Geometry.w" +#line 200 "inform7/Chapter 34/Spatial Geometry.w" int Geometry__cuboid_index(vector P, cuboid C) { if (Geometry__within_cuboid(P, C) == FALSE) return -1; vector O = Geometry__vec_minus(P, C.corner0); @@ -110609,7 +110982,7 @@ int Geometry__cuboid_volume(cuboid C) { return width*height*depth; } -#line 227 "inform7/Chapter 34/Spatial Geometry.w" +#line 221 "inform7/Chapter 34/Spatial Geometry.w" void Geometry__thicken_cuboid(cuboid *C, vector V, vector S) { if (C->population++ == 0) { C->corner0 = Geometry__vec_minus(V, S); @@ -115112,10 +115485,8 @@ void PL__EPSMap__render_map_as_EPS(void) { { #line 873 "inform7/Chapter 34/EPS Map.w" STREAM EPS_struct; STREAM *EPS = &EPS_struct; - char *fn = Filenames__build(EPSMAP_LEAFNAME); - fn = filename_of_epsfile; - if (STREAM_OPEN_TO_FILE(EPS, fn, ISO_ENC) == FALSE) - Problems__Fatal__issue2("Can't open EPS map file", fn); + if (STREAM_OPEN_TO_FILE(EPS, filename_of_epsfile, ISO_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open EPS map file", filename_of_epsfile); PL__EPSMap__EPS_compile_map(EPS); STREAM_CLOSE(EPS); @@ -115124,7 +115495,7 @@ void PL__EPSMap__render_map_as_EPS(void) { ; } -#line 884 "inform7/Chapter 34/EPS Map.w" +#line 882 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { int blh, /* total height of the EPS map area (not counting border) */ blw, /* total width of the EPS map area (not counting border) */ @@ -115132,7 +115503,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { vskip = PL__EPSMap__get_int_mp("vertical-spacing", NULL); { -#line 927 "inform7/Chapter 34/EPS Map.w" +#line 925 "inform7/Chapter 34/EPS Map.w" int total_chunk_height = 0, max_chunk_width = 0; EPS_map_level *eml; LOOP_BACKWARDS_OVER(eml, EPS_map_level) { @@ -115155,7 +115526,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { blw = max_chunk_width; } -#line 889 "inform7/Chapter 34/EPS Map.w" +#line 887 "inform7/Chapter 34/EPS Map.w" ; int bounding_box_width = blw+2*border, bounding_box_height = blh+2*border; @@ -115165,13 +115536,13 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { if (PL__EPSMap__get_int_mp("map-outline", NULL)) { -#line 952 "inform7/Chapter 34/EPS Map.w" +#line 950 "inform7/Chapter 34/EPS Map.w" WRITE("newpath %% Ruled outline outer box of map\n"); PL__EPSMap__EPS_compile_rectangular_path(OUT, border, border, border+blw, border+blh); WRITE("stroke\n"); } -#line 896 "inform7/Chapter 34/EPS Map.w" +#line 894 "inform7/Chapter 34/EPS Map.w" ; EPS_map_level *eml; @@ -115182,18 +115553,18 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { if (PL__EPSMap__get_int_mp("map-outline", NULL)) { -#line 960 "inform7/Chapter 34/EPS Map.w" +#line 958 "inform7/Chapter 34/EPS Map.w" WRITE("newpath %% Ruled horizontal line\n"); PL__EPSMap__EPS_compile_horizontal_line_path(OUT, border, blw+border, eml->eps_origin); WRITE("stroke\n"); } -#line 904 "inform7/Chapter 34/EPS Map.w" +#line 902 "inform7/Chapter 34/EPS Map.w" ; if (eml->contains_titling) { -#line 967 "inform7/Chapter 34/EPS Map.w" +#line 965 "inform7/Chapter 34/EPS Map.w" int y = eml->eps_origin + vskip + eml->actual_height; if (eml->contains_rooms) { if (PL__EPSMap__get_int_mp("monochrome", level_scope)) PL__EPSMap__EPS_compile_set_greyscale(OUT, 0); @@ -115218,7 +115589,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { } } -#line 906 "inform7/Chapter 34/EPS Map.w" +#line 904 "inform7/Chapter 34/EPS Map.w" ; if (eml->contains_rooms) { instance *R; @@ -115226,7 +115597,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { if (Room_position(R).z == eml->map_level) { -#line 993 "inform7/Chapter 34/EPS Map.w" +#line 991 "inform7/Chapter 34/EPS Map.w" map_parameter_scope *room_scope = &(PF_I(map, R)->local_map_parameters); int bx = Room_position(R).x-Universe.corner0.x; int by = Room_position(R).y-eml->y_min; @@ -115245,13 +115616,13 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { PF_I(map, R)->eps_y = by; } -#line 911 "inform7/Chapter 34/EPS Map.w" +#line 909 "inform7/Chapter 34/EPS Map.w" ; LOOP_OVER_ROOMS(R) if (Room_position(R).z == eml->map_level) { -#line 1013 "inform7/Chapter 34/EPS Map.w" +#line 1011 "inform7/Chapter 34/EPS Map.w" map_parameter_scope *room_scope = &(PF_I(map, R)->local_map_parameters); PL__EPSMap__EPS_compile_line_width_setting(OUT, PL__EPSMap__get_int_mp("route-thickness", room_scope)); @@ -115266,7 +115637,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { if (PL__Spatial__object_is_a_room(T)) { -#line 1032 "inform7/Chapter 34/EPS Map.w" +#line 1030 "inform7/Chapter 34/EPS Map.w" int T_stiffness = PL__EPSMap__get_int_mp("route-stiffness", &(PF_I(map, T)->local_map_parameters)); if (PL__EPSMap__get_int_mp("monochrome", level_scope)) PL__EPSMap__EPS_compile_set_greyscale(OUT, 0); else PL__EPSMap__EPS_compile_set_colour(OUT, PL__EPSMap__get_string_mp("route-colour", level_scope)); @@ -115274,7 +115645,7 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { (PL__SpatialMap__room_exit(T, PL__SpatialMap__opposite(dir), FALSE) == R)) { -#line 1045 "inform7/Chapter 34/EPS Map.w" +#line 1043 "inform7/Chapter 34/EPS Map.w" if (R->allocation_id <= T->allocation_id) PL__EPSMap__EPS_compile_Bezier_curve(OUT, R_stiffness*mapunit, T_stiffness*mapunit, @@ -115282,12 +115653,12 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { PF_I(map, T)->eps_x, PF_I(map, T)->eps_y, PL__SpatialMap__opposite(exit)); } -#line 1037 "inform7/Chapter 34/EPS Map.w" +#line 1035 "inform7/Chapter 34/EPS Map.w" else { -#line 1055 "inform7/Chapter 34/EPS Map.w" +#line 1053 "inform7/Chapter 34/EPS Map.w" int scaled = 1; vector E = PL__SpatialMap__direction_as_vector(exit); switch(exit) { @@ -115305,30 +115676,30 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { TRUE, TRUE); } -#line 1039 "inform7/Chapter 34/EPS Map.w" +#line 1037 "inform7/Chapter 34/EPS Map.w" ; } -#line 1025 "inform7/Chapter 34/EPS Map.w" +#line 1023 "inform7/Chapter 34/EPS Map.w" ; } PL__EPSMap__EPS_compile_line_width_unsetting(OUT); } -#line 914 "inform7/Chapter 34/EPS Map.w" +#line 912 "inform7/Chapter 34/EPS Map.w" ; LOOP_OVER_ROOMS(R) if (Room_position(R).z == eml->map_level) { -#line 1074 "inform7/Chapter 34/EPS Map.w" +#line 1072 "inform7/Chapter 34/EPS Map.w" map_parameter_scope *room_scope = &(PF_I(map, R)->local_map_parameters); int bx = PF_I(map, R)->eps_x; int by = PF_I(map, R)->eps_y; int boxsize = PL__EPSMap__get_int_mp("room-size", room_scope)/2; { -#line 1085 "inform7/Chapter 34/EPS Map.w" +#line 1083 "inform7/Chapter 34/EPS Map.w" WRITE("newpath %% Room interior\n"); if (PL__EPSMap__get_int_mp("monochrome", room_scope)) PL__EPSMap__EPS_compile_set_greyscale(OUT, 75); else PL__EPSMap__EPS_compile_set_colour(OUT, PL__EPSMap__get_string_mp("room-colour", room_scope)); @@ -115336,11 +115707,11 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { WRITE("fill\n\n"); } -#line 1078 "inform7/Chapter 34/EPS Map.w" +#line 1076 "inform7/Chapter 34/EPS Map.w" ; { -#line 1094 "inform7/Chapter 34/EPS Map.w" +#line 1092 "inform7/Chapter 34/EPS Map.w" if (PL__EPSMap__get_int_mp("room-outline", room_scope)) { PL__EPSMap__EPS_compile_line_width_setting(OUT, PL__EPSMap__get_int_mp("room-outline-thickness", room_scope)); WRITE("newpath %% Room outline\n"); @@ -115352,11 +115723,11 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { } } -#line 1079 "inform7/Chapter 34/EPS Map.w" +#line 1077 "inform7/Chapter 34/EPS Map.w" ; { -#line 1107 "inform7/Chapter 34/EPS Map.w" +#line 1105 "inform7/Chapter 34/EPS Map.w" int offs = PL__EPSMap__get_int_mp("room-name-offset", room_scope); int xpart = offs%10000, ypart = offs/10000; while (xpart > 5000) xpart-=10000; @@ -115376,18 +115747,18 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { TRUE, TRUE); } -#line 1080 "inform7/Chapter 34/EPS Map.w" +#line 1078 "inform7/Chapter 34/EPS Map.w" ; } -#line 917 "inform7/Chapter 34/EPS Map.w" +#line 915 "inform7/Chapter 34/EPS Map.w" ; } } { -#line 1128 "inform7/Chapter 34/EPS Map.w" +#line 1126 "inform7/Chapter 34/EPS Map.w" rubric_holder *rh; LOOP_OVER(rh, rubric_holder) { int bx = 0, by = 0; @@ -115407,11 +115778,11 @@ void PL__EPSMap__EPS_compile_map(OUTPUT_STREAM) { } } -#line 921 "inform7/Chapter 34/EPS Map.w" +#line 919 "inform7/Chapter 34/EPS Map.w" ; } -#line 1154 "inform7/Chapter 34/EPS Map.w" +#line 1152 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, int abbrev_to, char *font, int x, int y, int pointsize, int centre_h, int centre_v) { char txt[MAX_EPS_TEXT_LENGTH]; @@ -115421,7 +115792,7 @@ void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, in txt[0] = 0; { -#line 1171 "inform7/Chapter 34/EPS Map.w" +#line 1169 "inform7/Chapter 34/EPS Map.w" if (P_printed_name) { specification *V = World__Inferences__get_prop_state_at( Instances__as_subject(I), P_printed_name, NULL); @@ -115435,11 +115806,11 @@ void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, in } } -#line 1161 "inform7/Chapter 34/EPS Map.w" +#line 1159 "inform7/Chapter 34/EPS Map.w" ; { -#line 1186 "inform7/Chapter 34/EPS Map.w" +#line 1184 "inform7/Chapter 34/EPS Map.w" if (txt[0] == 0) { int w1, w2; Instances__get_name(I, &w1, &w2, FALSE); @@ -115448,12 +115819,12 @@ void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, in } } -#line 1162 "inform7/Chapter 34/EPS Map.w" +#line 1160 "inform7/Chapter 34/EPS Map.w" ; } else return; { -#line 1200 "inform7/Chapter 34/EPS Map.w" +#line 1198 "inform7/Chapter 34/EPS Map.w" if (abbrev_to > MAX_EPS_ABBREVIATED_LENGTH) abbrev_to = MAX_EPS_ABBREVIATED_LENGTH; while (Platform__strlen(txt) > abbrev_to) { int j; @@ -115473,12 +115844,12 @@ void PL__EPSMap__plot_text_at(OUTPUT_STREAM, char *text_to_plot, instance *I, in } } -#line 1164 "inform7/Chapter 34/EPS Map.w" +#line 1162 "inform7/Chapter 34/EPS Map.w" ; PL__EPSMap__EPS_compile_text(OUT, txt, x, y, font, pointsize, centre_h, centre_v); } -#line 1222 "inform7/Chapter 34/EPS Map.w" +#line 1220 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_header(OUTPUT_STREAM, int bounding_box_width, int bounding_box_height, char *default_font, int default_point_size) { WRITE("%%!PS-Adobe EPSF-3.0\n"); @@ -115487,7 +115858,7 @@ void PL__EPSMap__EPS_compile_header(OUTPUT_STREAM, int bounding_box_width, int b WRITE("/%s findfont %d scalefont setfont\n", default_font, default_point_size); } -#line 1236 "inform7/Chapter 34/EPS Map.w" +#line 1234 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_circular_path(OUTPUT_STREAM, int x0, int y0, int radius) { WRITE("%d %d moveto %% rightmost point\n", x0+radius, y0); WRITE("%d %d %d %d %d arc %% full circle traced anticlockwise\n", @@ -115503,7 +115874,7 @@ void PL__EPSMap__EPS_compile_rectangular_path(OUTPUT_STREAM, int x0, int y0, int WRITE("closepath\n"); } -#line 1254 "inform7/Chapter 34/EPS Map.w" +#line 1252 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_room_boundary_path(OUTPUT_STREAM, int bx, int by, int boxsize, char *shape) { if (strcmp(shape, "square") == 0) PL__EPSMap__EPS_compile_rectangular_path(OUT, bx-boxsize, by-boxsize, bx+boxsize, by+boxsize); @@ -115515,14 +115886,14 @@ void PL__EPSMap__EPS_compile_room_boundary_path(OUTPUT_STREAM, int bx, int by, i PL__EPSMap__EPS_compile_rectangular_path(OUT, bx-boxsize, by-boxsize, bx+boxsize, by+boxsize); } -#line 1268 "inform7/Chapter 34/EPS Map.w" +#line 1266 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_horizontal_line_path(OUTPUT_STREAM, int x0, int x1, int y) { WRITE("%d %d moveto %% LHS\n", x0, y); WRITE("%d %d lineto %% RHS\n", x1, y); WRITE("closepath\n"); } -#line 1277 "inform7/Chapter 34/EPS Map.w" +#line 1275 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_dashed_arrow(OUTPUT_STREAM, int length, vector Dir, int x0, int y0) { WRITE("[2 1] 0 setdash %% dashed line for arrow\n"); WRITE("%d %d moveto %% room centre\n", x0, y0); @@ -115531,7 +115902,7 @@ void PL__EPSMap__EPS_compile_dashed_arrow(OUTPUT_STREAM, int length, vector Dir, WRITE("[] 0 setdash %% back to normal solid lines\n"); } -#line 1291 "inform7/Chapter 34/EPS Map.w" +#line 1289 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_Bezier_curve(OUTPUT_STREAM, int stiffness0, int stiffness1, int x0, int y0, int exit0, int x1, int y1, int exit1) { int cx1, cy1, cx2, cy2; @@ -115545,7 +115916,7 @@ void PL__EPSMap__EPS_compile_Bezier_curve(OUTPUT_STREAM, int stiffness0, int sti WRITE("stroke\n"); } -#line 1309 "inform7/Chapter 34/EPS Map.w" +#line 1307 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_line_width_setting(OUTPUT_STREAM, int new) { WRITE("currentlinewidth %% Push old line width onto stack\n"); WRITE("%d setlinewidth\n", new); @@ -115555,7 +115926,7 @@ void PL__EPSMap__EPS_compile_line_width_unsetting(OUTPUT_STREAM) { WRITE("setlinewidth %% Pull old line width from stack\n"); } -#line 1322 "inform7/Chapter 34/EPS Map.w" +#line 1320 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_text(OUTPUT_STREAM, char *text, int x, int y, char *font, int pointsize, int centre_h, int centre_v) { WRITE("/%s findfont %d scalefont setfont\n", font, pointsize); @@ -115567,7 +115938,7 @@ void PL__EPSMap__EPS_compile_text(OUTPUT_STREAM, char *text, int x, int y, char WRITE("moveto show\n"); } -#line 1341 "inform7/Chapter 34/EPS Map.w" +#line 1339 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_set_colour(OUTPUT_STREAM, char *htmlcolour) { if (Platform__strlen(htmlcolour) != 6) internal_error("Improper HTML colour"); PL__EPSMap__choose_colour_beam(OUT, htmlcolour[0], htmlcolour[1]); @@ -115604,7 +115975,7 @@ int PL__EPSMap__hex_to_int(char hex) { return 0; } -#line 1380 "inform7/Chapter 34/EPS Map.w" +#line 1378 "inform7/Chapter 34/EPS Map.w" void PL__EPSMap__EPS_compile_set_greyscale(OUTPUT_STREAM, int N) { WRITE("%0.02f setgray %% greyscale %d/100ths of white\n", (float) N/100, N); } @@ -115753,14 +116124,14 @@ int PL__Showme__SHOWME_primitive(OUTPUT_STREAM, inference_subject *subj, propert return FALSE; } -#line 100 "inform7/Chapter 34/Scenes.w" +#line 98 "inform7/Chapter 34/Scenes.w" void PL__Scenes__start(void) { PLUGIN_REGISTER(PLUGIN_NEW_PROPERTY_NOTIFY, PL__Scenes__scenes_new_property_notify); PLUGIN_REGISTER(PLUGIN_NEW_INSTANCE_NOTIFY, PL__Scenes__scenes_new_named_instance_notify); PLUGIN_REGISTER(PLUGIN_NEW_BASE_KIND_NOTIFY, PL__Scenes__scenes_new_base_kind_notify); } -#line 109 "inform7/Chapter 34/Scenes.w" +#line 107 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) { if ((name) && (strcmp(name, "SCENE_TY") == 0)) { K_scene = new_base; return TRUE; @@ -115768,14 +116139,14 @@ int PL__Scenes__scenes_new_base_kind_notify(kind *new_base, char *name, int w1, return FALSE; } -#line 121 "inform7/Chapter 34/Scenes.w" +#line 119 "inform7/Chapter 34/Scenes.w" int notable_scene_properties_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 123 "inform7/Chapter 34/Scenes.w" +#line 121 "inform7/Chapter 34/Scenes.w" -#line 127 "inform7/Chapter 34/Scenes.w" +#line 125 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_property_notify(property *prn) { if (Preform__parse_nt_against_word_range(notable_scene_properties_NTM, prn->word_ref1, prn->word_ref2, NULL, NULL)) { switch (most_recent_result) { @@ -115785,7 +116156,7 @@ int PL__Scenes__scenes_new_property_notify(property *prn) { return FALSE; } -#line 140 "inform7/Chapter 34/Scenes.w" +#line 138 "inform7/Chapter 34/Scenes.w" int PL__Scenes__scenes_new_named_instance_notify(instance *I) { if ((K_scene) && (Kinds__Compare__eq(Instances__kind(I), K_scene))) { PL__Scenes__new_scene(I); @@ -115794,12 +116165,12 @@ int PL__Scenes__scenes_new_named_instance_notify(instance *I) { return FALSE; } -#line 153 "inform7/Chapter 34/Scenes.w" +#line 151 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene(instance *I) { scene *sc = CREATE(scene); { -#line 185 "inform7/Chapter 34/Scenes.w" +#line 183 "inform7/Chapter 34/Scenes.w" sc->as_instance = I; Instances__set_connection(I, STORE_POINTER_scene(sc)); int nw1, nw2; @@ -115807,11 +116178,11 @@ void PL__Scenes__new_scene(instance *I) { if (Preform__parse_nt_against_word_range(notable_scenes_NTM, nw1, nw2, NULL, NULL)) SC_entire_game = sc; } -#line 155 "inform7/Chapter 34/Scenes.w" +#line 153 "inform7/Chapter 34/Scenes.w" ; { -#line 162 "inform7/Chapter 34/Scenes.w" +#line 160 "inform7/Chapter 34/Scenes.w" sc->once_only = TRUE; sc->indexed = FALSE; sc->no_ends = 2; @@ -115825,18 +116196,18 @@ void PL__Scenes__new_scene(instance *I) { } } -#line 156 "inform7/Chapter 34/Scenes.w" +#line 154 "inform7/Chapter 34/Scenes.w" ; } -#line 179 "inform7/Chapter 34/Scenes.w" +#line 177 "inform7/Chapter 34/Scenes.w" int notable_scenes_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 181 "inform7/Chapter 34/Scenes.w" +#line 179 "inform7/Chapter 34/Scenes.w" -#line 194 "inform7/Chapter 34/Scenes.w" +#line 192 "inform7/Chapter 34/Scenes.w" scene *PL__Scenes__from_named_constant(instance *I) { if (K_scene == NULL) return NULL; kind *K = Instances__kind(I); @@ -115849,7 +116220,7 @@ void PL__Scenes__get_name(scene *sc, int *w1, int *w2) { Instances__get_name(sc->as_instance, w1, w2, FALSE); } -#line 209 "inform7/Chapter 34/Scenes.w" +#line 207 "inform7/Chapter 34/Scenes.w" int PL__Scenes__parse_scene_end_name(scene *sc, int en1, int en2, int create) { int i; for (i=2; i<sc->no_ends; i++) @@ -115861,7 +116232,7 @@ int PL__Scenes__parse_scene_end_name(scene *sc, int en1, int en2, int create) { if (VirtualMachines__is_16_bit()) max = 15; if (end >= max) { -#line 232 "inform7/Chapter 34/Scenes.w" +#line 230 "inform7/Chapter 34/Scenes.w" Problems__Issue__sentence_problem(_P_(PM_ScenesWithTooManyEnds), "this scene now has too many different ways to end", "and will need to be simplified. (We can have up to 15 ends to a scene " @@ -115871,7 +116242,7 @@ int PL__Scenes__parse_scene_end_name(scene *sc, int en1, int en2, int create) { "ways for the scene to end.)"); } -#line 218 "inform7/Chapter 34/Scenes.w" +#line 216 "inform7/Chapter 34/Scenes.w" else { sc->end_names_w1[end] = en1; @@ -115883,12 +116254,12 @@ int PL__Scenes__parse_scene_end_name(scene *sc, int en1, int en2, int create) { return -1; } -#line 243 "inform7/Chapter 34/Scenes.w" +#line 241 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene_rulebook(scene *sc, int end) { int rw1 = -1, rw2 = -1, arw1 = -1, arw2 = -1; { -#line 260 "inform7/Chapter 34/Scenes.w" +#line 258 "inform7/Chapter 34/Scenes.w" int nw1, nw2; Instances__get_name(sc->as_instance, &nw1, &nw2, FALSE); @@ -115908,7 +116279,7 @@ void PL__Scenes__new_scene_rulebook(scene *sc, int end) { arw2 = lexer_wordcount - 1; } -#line 245 "inform7/Chapter 34/Scenes.w" +#line 243 "inform7/Chapter 34/Scenes.w" ; rulebook *rb = Rulebooks__new_automatic(rw1, rw2, K_action_name, @@ -115918,7 +116289,7 @@ void PL__Scenes__new_scene_rulebook(scene *sc, int end) { if (end >= 2) { -#line 281 "inform7/Chapter 34/Scenes.w" +#line 279 "inform7/Chapter 34/Scenes.w" int nw1, nw2; Instances__get_name(sc->as_instance, &nw1, &nw2, FALSE); @@ -115951,11 +116322,11 @@ void PL__Scenes__new_scene_rulebook(scene *sc, int end) { Sentences__RuleSubtrees__register_recently_lexed_phrases(); } -#line 252 "inform7/Chapter 34/Scenes.w" +#line 250 "inform7/Chapter 34/Scenes.w" ; } -#line 317 "inform7/Chapter 34/Scenes.w" +#line 315 "inform7/Chapter 34/Scenes.w" sentence_handler BEGINS_WHEN_SH_handler = { SENTENCE_NT, BEGINS_WHEN_VB, 2, PL__Scenes__begins_or_ends_when }; sentence_handler ENDS_WHEN_SH_handler = @@ -115967,7 +116338,7 @@ void PL__Scenes__begins_or_ends_when(parse_node *p) { scene *scene_end_of_which_parsed = NULL; -#line 342 "inform7/Chapter 34/Scenes.w" +#line 340 "inform7/Chapter 34/Scenes.w" int scene_ends_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRUE; *XP = RP[1]; @@ -115977,7 +116348,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 349 "inform7/Chapter 34/Scenes.w" +#line 347 "inform7/Chapter 34/Scenes.w" *X = FALSE; Problems__Issue__sentence_problem(_P_(PM_ScenesOnly), "'begins when' and 'ends when' can only be applied to scenes", @@ -115985,7 +116356,7 @@ break; "confrontation is a scene.'"); } -#line 344 "inform7/Chapter 34/Scenes.w" +#line 342 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -115995,9 +116366,9 @@ break; } return TRUE; } -#line 345 "inform7/Chapter 34/Scenes.w" +#line 343 "inform7/Chapter 34/Scenes.w" -#line 359 "inform7/Chapter 34/Scenes.w" +#line 357 "inform7/Chapter 34/Scenes.w" int scene_ends_sentence_adverb_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; @@ -116009,14 +116380,14 @@ break; } return TRUE; } -#line 361 "inform7/Chapter 34/Scenes.w" +#line 359 "inform7/Chapter 34/Scenes.w" -#line 367 "inform7/Chapter 34/Scenes.w" +#line 365 "inform7/Chapter 34/Scenes.w" int scene_ends_sentence_object_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 380 "inform7/Chapter 34/Scenes.w" +#line 378 "inform7/Chapter 34/Scenes.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_ScenesDisallowCalled), "'(called ...)' is not allowed within conditions for a scene to begin or end", @@ -116026,7 +116397,7 @@ int scene_ends_sentence_object_NTMC(int *X, void **XP, int *R, void **RP, int w1 "not allowed!"); } -#line 368 "inform7/Chapter 34/Scenes.w" +#line 366 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -116039,7 +116410,7 @@ break; #pragma clang diagnostic pop case 2: { -#line 391 "inform7/Chapter 34/Scenes.w" +#line 389 "inform7/Chapter 34/Scenes.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_ScenesNotPlay), "'play' is not really a scene", @@ -116048,7 +116419,7 @@ break; "all scenes end."); } -#line 370 "inform7/Chapter 34/Scenes.w" +#line 368 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -116071,7 +116442,7 @@ break; #pragma clang diagnostic pop case 6: { -#line 401 "inform7/Chapter 34/Scenes.w" +#line 399 "inform7/Chapter 34/Scenes.w" *X = -1; Problems__Issue__sentence_problem(_P_(PM_ScenesUnknownEnd), "that's not one of the known ends for that scene", @@ -116079,7 +116450,7 @@ break; "when...' or 'Confrontation ends tragically when...'."); } -#line 374 "inform7/Chapter 34/Scenes.w" +#line 372 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -116094,9 +116465,9 @@ break; } return TRUE; } -#line 376 "inform7/Chapter 34/Scenes.w" +#line 374 "inform7/Chapter 34/Scenes.w" -#line 411 "inform7/Chapter 34/Scenes.w" +#line 409 "inform7/Chapter 34/Scenes.w" int scene_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[2]; *XP = RP[2]; @@ -116113,20 +116484,20 @@ break; } return TRUE; } -#line 414 "inform7/Chapter 34/Scenes.w" +#line 412 "inform7/Chapter 34/Scenes.w" int scene_name_unarticled_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 421 "inform7/Chapter 34/Scenes.w" +#line 419 "inform7/Chapter 34/Scenes.w" instance *I = most_recent_result_p; if (Instances__of_kind(I, K_scene) == FALSE) return FALSE; *XP = PL__Scenes__from_named_constant(I); scene_end_of_which_parsed = *XP; } -#line 416 "inform7/Chapter 34/Scenes.w" +#line 414 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -116136,23 +116507,23 @@ break; } return TRUE; } -#line 417 "inform7/Chapter 34/Scenes.w" +#line 415 "inform7/Chapter 34/Scenes.w" -#line 431 "inform7/Chapter 34/Scenes.w" +#line 429 "inform7/Chapter 34/Scenes.w" int scene_end_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 432 "inform7/Chapter 34/Scenes.w" +#line 430 "inform7/Chapter 34/Scenes.w" int end = PL__Scenes__parse_scene_end_name(scene_end_of_which_parsed, w1, w2, FALSE); if (end < 0) return FALSE; *X = end; return TRUE; } int scene_end_name_creating_NTMR(int w1, int w2, int *X, void **XP) { -#line 438 "inform7/Chapter 34/Scenes.w" +#line 436 "inform7/Chapter 34/Scenes.w" *X = PL__Scenes__parse_scene_end_name(scene_end_of_which_parsed, w1, w2, TRUE); return TRUE; } -#line 450 "inform7/Chapter 34/Scenes.w" +#line 448 "inform7/Chapter 34/Scenes.w" void PL__Scenes__new_scene_anchor(parse_node *p) { scene *this_scene = NULL; /* scene whose end is being caused: must be set */ int end = -1; /* end which is being anchored: must be set */ @@ -116177,7 +116548,7 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { { -#line 522 "inform7/Chapter 34/Scenes.w" +#line 520 "inform7/Chapter 34/Scenes.w" Preform__parse_nt_against_word_range(scene_ends_sentence_subject_NTM, sw1, sw2, NULL, NULL); if (most_recent_result == FALSE) return; this_scene = most_recent_result_p; @@ -116193,13 +116564,13 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { if (end < 0) return; /* to recover from any parsing Problems */ } -#line 472 "inform7/Chapter 34/Scenes.w" +#line 470 "inform7/Chapter 34/Scenes.w" ; if ((this_scene == NULL) || (end < 0)) internal_error("scene misparsed"); { -#line 539 "inform7/Chapter 34/Scenes.w" +#line 537 "inform7/Chapter 34/Scenes.w" if (Preform__parse_nt_against_word_range(scene_ends_sentence_object_NTM, cw1, cw2, NULL, NULL)) { int end = most_recent_result; switch (end) { @@ -116210,7 +116581,7 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { } else external_condition = Specifications__Unknown__new(cw1, cw2); } -#line 475 "inform7/Chapter 34/Scenes.w" +#line 473 "inform7/Chapter 34/Scenes.w" ; if ((this_scene == SC_entire_game) && (external_condition == NULL)) { Problems__Issue__sentence_problem(_P_(PM_EntireGameHardwired), @@ -116220,16 +116591,16 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { } else if (when_play_begins) { -#line 493 "inform7/Chapter 34/Scenes.w" +#line 491 "inform7/Chapter 34/Scenes.w" this_scene->start_of_play = TRUE; } -#line 482 "inform7/Chapter 34/Scenes.w" +#line 480 "inform7/Chapter 34/Scenes.w" else if (other_scene) { -#line 512 "inform7/Chapter 34/Scenes.w" +#line 510 "inform7/Chapter 34/Scenes.w" scene_connector *scon = CREATE(scene_connector); scon->connect_to = other_scene; scon->end = other_end; @@ -116238,12 +116609,12 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { this_scene->anchor_scene[end] = scon; } -#line 484 "inform7/Chapter 34/Scenes.w" +#line 482 "inform7/Chapter 34/Scenes.w" else if (external_condition) { -#line 498 "inform7/Chapter 34/Scenes.w" +#line 496 "inform7/Chapter 34/Scenes.w" if (this_scene->anchor_condition[end]) Problems__Issue__sentence_problem(_P_(PM_ScenesOversetEnd), "you have already told me a condition for when that happens", @@ -116256,12 +116627,12 @@ void PL__Scenes__new_scene_anchor(parse_node *p) { this_scene->anchor_condition_set[end] = current_sentence; } -#line 486 "inform7/Chapter 34/Scenes.w" +#line 484 "inform7/Chapter 34/Scenes.w" else internal_error("failed to obtain an anchor condition"); } -#line 566 "inform7/Chapter 34/Scenes.w" +#line 564 "inform7/Chapter 34/Scenes.w" void PL__Scenes__DetectSceneChange_routine(OUTPUT_STREAM) { OUT = Routines__begin(OUT, "DetectSceneChange"); LocalVariables__add_internal_local_c("chs", "count of changes made"); @@ -116270,7 +116641,7 @@ void PL__Scenes__DetectSceneChange_routine(OUTPUT_STREAM) { scene *sc; LOOP_OVER(sc, scene) { -#line 588 "inform7/Chapter 34/Scenes.w" +#line 586 "inform7/Chapter 34/Scenes.w" int ix = sc->allocation_id; WRITE("if (scene_status-->%d == 1) {\n", ix); INDENT; int end; @@ -116281,7 +116652,7 @@ void PL__Scenes__DetectSceneChange_routine(OUTPUT_STREAM) { OUTDENT; WRITE("}\n"); } -#line 572 "inform7/Chapter 34/Scenes.w" +#line 570 "inform7/Chapter 34/Scenes.w" ; WRITE(".CScene;\n"); WRITE("if (chs>%d) \">--> The scene change machinery is stuck.\";\n\n", @@ -116292,7 +116663,7 @@ void PL__Scenes__DetectSceneChange_routine(OUTPUT_STREAM) { OUT = Routines__end(OUT); } -#line 604 "inform7/Chapter 34/Scenes.w" +#line 602 "inform7/Chapter 34/Scenes.w" void PL__Scenes__test_scene_end(OUTPUT_STREAM, scene *sc, int end) { if ((end == 0) && (sc->start_of_play)) { WRITE("if (((scene_endings-->%d) & 1) == 0) {\n", sc->allocation_id); INDENT; @@ -116303,7 +116674,7 @@ void PL__Scenes__test_scene_end(OUTPUT_STREAM, scene *sc, int end) { if (S) { { -#line 620 "inform7/Chapter 34/Scenes.w" +#line 618 "inform7/Chapter 34/Scenes.w" current_sentence = sc->anchor_condition_set[end]; if (Specifications__Unknown__is(S)) { if (Preform__parse_nt_against_word_range(spec_condition_NTM, S->word_ref1, S->word_ref2, NULL, NULL)) S = most_recent_result_p; @@ -116323,11 +116694,11 @@ void PL__Scenes__test_scene_end(OUTPUT_STREAM, scene *sc, int end) { } } -#line 612 "inform7/Chapter 34/Scenes.w" +#line 610 "inform7/Chapter 34/Scenes.w" ; { -#line 643 "inform7/Chapter 34/Scenes.w" +#line 641 "inform7/Chapter 34/Scenes.w" WRITE("if ("); current_sentence = sc->anchor_condition_set[end]; Specifications__Compiler__compile(OUT, S); @@ -116338,19 +116709,19 @@ void PL__Scenes__test_scene_end(OUTPUT_STREAM, scene *sc, int end) { OUTDENT; WRITE("}\n"); } -#line 613 "inform7/Chapter 34/Scenes.w" +#line 611 "inform7/Chapter 34/Scenes.w" ; } } -#line 662 "inform7/Chapter 34/Scenes.w" +#line 660 "inform7/Chapter 34/Scenes.w" void PL__Scenes__compile_scene_end(OUTPUT_STREAM, scene *sc, int end) { scene *sc2; LOOP_OVER(sc2, scene) sc2->marker = 0; PL__Scenes__compile_scene_end_dash(OUT, sc, end); } -#line 677 "inform7/Chapter 34/Scenes.w" +#line 675 "inform7/Chapter 34/Scenes.w" void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { int ix = sc->allocation_id; sc->marker++; @@ -116359,7 +116730,7 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { int e = end; end = 1; { -#line 734 "inform7/Chapter 34/Scenes.w" +#line 732 "inform7/Chapter 34/Scenes.w" WRITE("if (debug_scenes) print \"[Scene '"); if (sc->as_instance) { int nw1, nw2; @@ -116376,11 +116747,11 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { WRITE("]^\";\n"); } -#line 683 "inform7/Chapter 34/Scenes.w" +#line 681 "inform7/Chapter 34/Scenes.w" ; { -#line 707 "inform7/Chapter 34/Scenes.w" +#line 705 "inform7/Chapter 34/Scenes.w" if (end == 0) WRITE("scene_status-->%d = 1; ", ix); else { @@ -116391,24 +116762,24 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { } } -#line 684 "inform7/Chapter 34/Scenes.w" +#line 682 "inform7/Chapter 34/Scenes.w" ; { -#line 726 "inform7/Chapter 34/Scenes.w" +#line 724 "inform7/Chapter 34/Scenes.w" if (end == 0) WRITE("scene_started-->%d = the_time;\n", ix); else WRITE("scene_ended-->%d = the_time;\n", ix); WRITE("scene_endings-->%d = (scene_endings-->%d)|%d;\n", ix, ix, 1 << end); WRITE("scene_latest_ending-->%d = %d;\n", ix, end); } -#line 685 "inform7/Chapter 34/Scenes.w" +#line 683 "inform7/Chapter 34/Scenes.w" ; end = e; } { -#line 734 "inform7/Chapter 34/Scenes.w" +#line 732 "inform7/Chapter 34/Scenes.w" WRITE("if (debug_scenes) print \"[Scene '"); if (sc->as_instance) { int nw1, nw2; @@ -116425,11 +116796,11 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { WRITE("]^\";\n"); } -#line 688 "inform7/Chapter 34/Scenes.w" +#line 686 "inform7/Chapter 34/Scenes.w" ; { -#line 707 "inform7/Chapter 34/Scenes.w" +#line 705 "inform7/Chapter 34/Scenes.w" if (end == 0) WRITE("scene_status-->%d = 1; ", ix); else { @@ -116439,33 +116810,33 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { WRITE("else scene_status-->%d = 2; ", ix); } +} +#line 687 "inform7/Chapter 34/Scenes.w" +; + +{ +#line 717 "inform7/Chapter 34/Scenes.w" + if (end == 0) WRITE("FollowRulebook(WHEN_SCENE_BEGINS_RB, %d);\n", ix + 1); + WRITE("FollowRulebook(%d);\n", sc->end_rulebook[end]->allocation_id); + if (end == 1) WRITE("FollowRulebook(WHEN_SCENE_ENDS_RB, %d);\n", ix + 1); + +} +#line 688 "inform7/Chapter 34/Scenes.w" + + +{ +#line 724 "inform7/Chapter 34/Scenes.w" + if (end == 0) WRITE("scene_started-->%d = the_time;\n", ix); + else WRITE("scene_ended-->%d = the_time;\n", ix); + WRITE("scene_endings-->%d = (scene_endings-->%d)|%d;\n", ix, ix, 1 << end); + WRITE("scene_latest_ending-->%d = %d;\n", ix, end); + } #line 689 "inform7/Chapter 34/Scenes.w" ; { -#line 719 "inform7/Chapter 34/Scenes.w" - if (end == 0) WRITE("FollowRulebook(WHEN_SCENE_BEGINS_RB, %d);\n", ix + 1); - WRITE("FollowRulebook(%d);\n", sc->end_rulebook[end]->allocation_id); - if (end == 1) WRITE("FollowRulebook(WHEN_SCENE_ENDS_RB, %d);\n", ix + 1); - -} -#line 690 "inform7/Chapter 34/Scenes.w" - - -{ -#line 726 "inform7/Chapter 34/Scenes.w" - if (end == 0) WRITE("scene_started-->%d = the_time;\n", ix); - else WRITE("scene_ended-->%d = the_time;\n", ix); - WRITE("scene_endings-->%d = (scene_endings-->%d)|%d;\n", ix, ix, 1 << end); - WRITE("scene_latest_ending-->%d = %d;\n", ix, end); - -} -#line 691 "inform7/Chapter 34/Scenes.w" -; - -{ -#line 761 "inform7/Chapter 34/Scenes.w" +#line 759 "inform7/Chapter 34/Scenes.w" scene *other_scene; LOOP_OVER(other_scene, scene) { int tolerance = 1; @@ -116489,24 +116860,24 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { } } -#line 692 "inform7/Chapter 34/Scenes.w" +#line 690 "inform7/Chapter 34/Scenes.w" ; if (end >= 2) { int e = end; end = 1; { -#line 719 "inform7/Chapter 34/Scenes.w" +#line 717 "inform7/Chapter 34/Scenes.w" if (end == 0) WRITE("FollowRulebook(WHEN_SCENE_BEGINS_RB, %d);\n", ix + 1); WRITE("FollowRulebook(%d);\n", sc->end_rulebook[end]->allocation_id); if (end == 1) WRITE("FollowRulebook(WHEN_SCENE_ENDS_RB, %d);\n", ix + 1); } -#line 696 "inform7/Chapter 34/Scenes.w" +#line 694 "inform7/Chapter 34/Scenes.w" ; { -#line 761 "inform7/Chapter 34/Scenes.w" +#line 759 "inform7/Chapter 34/Scenes.w" scene *other_scene; LOOP_OVER(other_scene, scene) { int tolerance = 1; @@ -116530,13 +116901,13 @@ void PL__Scenes__compile_scene_end_dash(OUTPUT_STREAM, scene *sc, int end) { } } -#line 697 "inform7/Chapter 34/Scenes.w" +#line 695 "inform7/Chapter 34/Scenes.w" ; end = e; } } -#line 790 "inform7/Chapter 34/Scenes.w" +#line 788 "inform7/Chapter 34/Scenes.w" void PL__Scenes__ShowSceneStatus_routine(OUTPUT_STREAM) { OUT = Routines__begin(OUT, "ShowSceneStatus"); LocalVariables__add_internal_local("chs"); @@ -116577,7 +116948,7 @@ void PL__Scenes__ShowSceneStatus_routine(OUTPUT_STREAM) { OUT = Routines__end(OUT); } -#line 837 "inform7/Chapter 34/Scenes.w" +#line 835 "inform7/Chapter 34/Scenes.w" void PL__Scenes__PrintSceneName_routine(OUTPUT_STREAM) { OUT = Routines__begin(OUT, "PrintSceneName"); LocalVariables__add_named_call("sc"); @@ -116596,12 +116967,12 @@ void PL__Scenes__PrintSceneName_routine(OUTPUT_STREAM) { OUT = Routines__end(OUT); } -#line 864 "inform7/Chapter 34/Scenes.w" +#line 862 "inform7/Chapter 34/Scenes.w" int spec_scene_description_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 870 "inform7/Chapter 34/Scenes.w" +#line 868 "inform7/Chapter 34/Scenes.w" if (K_scene == NULL) return FALSE; specification *spec = RP[1]; instance *I = Specifications__Values__get_named_constant_if_any(spec); @@ -116612,7 +116983,7 @@ int spec_scene_description_NTMC(int *X, void **XP, int *R, void **RP, int w1, in } else return FALSE; } -#line 865 "inform7/Chapter 34/Scenes.w" +#line 863 "inform7/Chapter 34/Scenes.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -116622,9 +116993,9 @@ break; } return TRUE; } -#line 866 "inform7/Chapter 34/Scenes.w" +#line 864 "inform7/Chapter 34/Scenes.w" -#line 883 "inform7/Chapter 34/Scenes.w" +#line 881 "inform7/Chapter 34/Scenes.w" void PL__Scenes__test_during_clause(OUTPUT_STREAM, specification *spec) { if (K_scene == NULL) return; if (Specifications__family_is(spec, VALUE_FMY)) { @@ -117008,7 +117379,7 @@ int PL__Scenes__Index__compare_scenes(const void *ent1, const void *ent2) { return Text__rangecmp(sc11, sc12, sc21, sc22); } -#line 107 "inform7/Chapter 35/Actions.w" +#line 106 "inform7/Chapter 35/Actions.w" void PL__Actions__start(void) { PLUGIN_REGISTER(PLUGIN_NEW_BASE_KIND_NOTIFY, PL__Actions__actions_new_base_kind_notify); PLUGIN_REGISTER(PLUGIN_COMPILE_CONSTANT, PL__Actions__actions_compile_constant); @@ -117018,7 +117389,7 @@ void PL__Actions__start(void) { PLUGIN_REGISTER(PLUGIN_FORBID_SETTING, PL__Actions__actions_forbid_setting); } -#line 119 "inform7/Chapter 35/Actions.w" +#line 118 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_new_base_kind_notify(kind *new_base, char *name, int w1, int w2) { if ((name) && (strcmp(name, "ACTION_NAME_TY") == 0)) { K_action_name = new_base; return TRUE; @@ -117032,7 +117403,7 @@ int PL__Actions__actions_new_base_kind_notify(kind *new_base, char *name, int w1 return FALSE; } -#line 135 "inform7/Chapter 35/Actions.w" +#line 134 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_compile_constant(OUTPUT_STREAM, kind *K, specification *spec) { if (Plugins__Manage__plugged_in(actions_plugin) == FALSE) internal_error("actions plugin inactive"); @@ -117072,7 +117443,7 @@ int PL__Actions__actions_offered_specification(specification *owner, int w1, int return FALSE; } -#line 179 "inform7/Chapter 35/Actions.w" +#line 178 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_typecheck_equality(kind *K1, kind *K2) { if ((Kinds__Compare__eq(K1, K_stored_action)) && (Kinds__Compare__eq(K2, K_description_of_action))) @@ -117080,7 +117451,7 @@ int PL__Actions__actions_typecheck_equality(kind *K1, kind *K2) { return FALSE; } -#line 193 "inform7/Chapter 35/Actions.w" +#line 192 "inform7/Chapter 35/Actions.w" int PL__Actions__actions_forbid_setting(kind *K) { if (Kinds__Compare__eq(K, K_description_of_action)) { Problems__Issue__sentence_problem(_P_(PM_SetStoredAction), @@ -117094,7 +117465,7 @@ int PL__Actions__actions_forbid_setting(kind *K) { return FALSE; } -#line 209 "inform7/Chapter 35/Actions.w" +#line 208 "inform7/Chapter 35/Actions.w" void PL__Actions__coerce_TEST_ACTION_to_STORED_ACTION(specification *spec) { if (Specifications__species_is(spec, TEST_ACTION_SPC) == FALSE) internal_error("can't coerce non-TEST_ACTION_SPC"); @@ -117102,7 +117473,7 @@ void PL__Actions__coerce_TEST_ACTION_to_STORED_ACTION(specification *spec) { Specifications__set_kind_of_value(spec, K_stored_action); } -#line 227 "inform7/Chapter 35/Actions.w" +#line 226 "inform7/Chapter 35/Actions.w" void PL__Actions__coerce_TEST_ACTION_to_DESCRIPTION_OF_ACTION(specification *spec) { if (Specifications__species_is(spec, TEST_ACTION_SPC) == FALSE) internal_error("can't coerce non-TEST_ACTION_SPC"); @@ -117110,21 +117481,21 @@ void PL__Actions__coerce_TEST_ACTION_to_DESCRIPTION_OF_ACTION(specification *spe Specifications__set_kind_of_value(spec, K_description_of_action); } -#line 245 "inform7/Chapter 35/Actions.w" +#line 244 "inform7/Chapter 35/Actions.w" int notable_actions_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 247 "inform7/Chapter 35/Actions.w" +#line 246 "inform7/Chapter 35/Actions.w" -#line 252 "inform7/Chapter 35/Actions.w" +#line 251 "inform7/Chapter 35/Actions.w" int action_name_construction_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 254 "inform7/Chapter 35/Actions.w" +#line 253 "inform7/Chapter 35/Actions.w" -#line 258 "inform7/Chapter 35/Actions.w" +#line 257 "inform7/Chapter 35/Actions.w" action_name *PL__Actions__act_new(int w1, int w2, int implemented_by_I7) { action_name *an; an = CREATE(action_name); @@ -117204,14 +117575,14 @@ action_name *PL__Actions__act_new(int w1, int w2, int implemented_by_I7) { /* pointing at, pointing it at */ -#line 353 "inform7/Chapter 35/Actions.w" +#line 352 "inform7/Chapter 35/Actions.w" int action_pronoun_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 355 "inform7/Chapter 35/Actions.w" +#line 354 "inform7/Chapter 35/Actions.w" -#line 359 "inform7/Chapter 35/Actions.w" +#line 358 "inform7/Chapter 35/Actions.w" int PL__Actions__action_names_overlap(action_name *an1, action_name *an2) { int w1 = an1->word_ref1, w2 = an1->word_ref2, x1 = an2->word_ref1, x2 = an2->word_ref2; int i, j; @@ -117228,9 +117599,9 @@ void PL__Actions__log(action_name *an) { else LOG("$W", an->word_ref1, an->word_ref2); } -#line 380 "inform7/Chapter 35/Actions.w" +#line 379 "inform7/Chapter 35/Actions.w" int action_name_NTMR(int w1, int w2, int *X, void **XP) { -#line 381 "inform7/Chapter 35/Actions.w" +#line 380 "inform7/Chapter 35/Actions.w" action_name *an; LOOP_OVER(an, action_name) if (Text__compare_word_range(w1, w2, an->word_ref1, an->word_ref2)) { @@ -117249,14 +117620,14 @@ int action_name_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 408 "inform7/Chapter 35/Actions.w" +#line 407 "inform7/Chapter 35/Actions.w" int action_optional_trailing_prepositions_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *X = R[0]; return TRUE; } -#line 410 "inform7/Chapter 35/Actions.w" +#line 409 "inform7/Chapter 35/Actions.w" -#line 414 "inform7/Chapter 35/Actions.w" +#line 413 "inform7/Chapter 35/Actions.w" action_name *PL__Actions__longest_null(int w1, int w2, int tense, int *excess) { action_name *an; LOOP_OVER(an, action_name) @@ -117310,7 +117681,7 @@ int PL__Actions__an_get_specification_text(action_name *an) { return an->an_specification_text_word; } -#line 472 "inform7/Chapter 35/Actions.w" +#line 471 "inform7/Chapter 35/Actions.w" void PL__Actions__name_all(void) { action_name *an; LOOP_OVER(an, action_name) @@ -117350,7 +117721,7 @@ int PL__Actions__get_stem_length(action_name *an) { return s; } -#line 520 "inform7/Chapter 35/Actions.w" +#line 519 "inform7/Chapter 35/Actions.w" int action_variable_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = TRUE; @@ -117360,7 +117731,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 535 "inform7/Chapter 35/Actions.w" +#line 534 "inform7/Chapter 35/Actions.w" *X = NOT_APPLICABLE; Problems__quote_source(1, current_sentence); Problems__quote_words(2, w1, w2); @@ -117374,7 +117745,7 @@ break; Problems__issue_problem_end(); } -#line 522 "inform7/Chapter 35/Actions.w" +#line 521 "inform7/Chapter 35/Actions.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -117389,14 +117760,14 @@ break; } return TRUE; } -#line 524 "inform7/Chapter 35/Actions.w" +#line 523 "inform7/Chapter 35/Actions.w" -#line 528 "inform7/Chapter 35/Actions.w" +#line 527 "inform7/Chapter 35/Actions.w" int action_variable_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 550 "inform7/Chapter 35/Actions.w" +#line 549 "inform7/Chapter 35/Actions.w" Problems__quote_source(1, current_sentence); Problems__quote_words(2, w1, w2); Problems__Issue__handmade_problem(_P_(PM_ActionVarAnd)); @@ -117409,7 +117780,7 @@ int action_variable_name_NTMC(int *X, void **XP, int *R, void **RP, int w1, int Problems__issue_problem_end(); } -#line 529 "inform7/Chapter 35/Actions.w" +#line 528 "inform7/Chapter 35/Actions.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -117424,9 +117795,9 @@ break; } return TRUE; } -#line 531 "inform7/Chapter 35/Actions.w" +#line 530 "inform7/Chapter 35/Actions.w" -#line 564 "inform7/Chapter 35/Actions.w" +#line 563 "inform7/Chapter 35/Actions.w" void PL__Actions__an_add_variable(action_name *an, parse_node *cnode) { int nw1 = -1, nw2 = -1, tw1 = -1, tw2 = -1, mw1 = -1, mw2 = -1; stacked_variable *stv = NULL; @@ -117566,19 +117937,19 @@ void PL__Actions__compile_action_name_var_creators(OUTPUT_STREAM) { } } -#line 706 "inform7/Chapter 35/Actions.w" +#line 705 "inform7/Chapter 35/Actions.w" sentence_handler NEW_ACTION_SH_handler = { SENTENCE_NT, NEW_ACTION_VB, 1, PL__Actions__act_parse_definition }; -#line 718 "inform7/Chapter 35/Actions.w" +#line 717 "inform7/Chapter 35/Actions.w" action_name *an_being_parsed = NULL; -#line 730 "inform7/Chapter 35/Actions.w" +#line 729 "inform7/Chapter 35/Actions.w" int action_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 737 "inform7/Chapter 35/Actions.w" +#line 736 "inform7/Chapter 35/Actions.w" *XP = NULL; Problems__Issue__sentence_problem(_P_(PM_ActionAlreadyExists), "that seems to be an action already existing", @@ -117590,7 +117961,7 @@ int action_sentence_subject_NTMC(int *X, void **XP, int *R, void **RP, int w1, i "('Understand \"unlock [something]\" as keyless unlocking.')."); } -#line 731 "inform7/Chapter 35/Actions.w" +#line 730 "inform7/Chapter 35/Actions.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -117605,9 +117976,9 @@ break; } return TRUE; } -#line 733 "inform7/Chapter 35/Actions.w" +#line 732 "inform7/Chapter 35/Actions.w" -#line 758 "inform7/Chapter 35/Actions.w" +#line 757 "inform7/Chapter 35/Actions.w" int action_clause_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = OOW_ACT_CLAUSE; @@ -117639,7 +118010,7 @@ break; } return TRUE; } -#line 764 "inform7/Chapter 35/Actions.w" +#line 763 "inform7/Chapter 35/Actions.w" int action_applications_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -117685,7 +118056,7 @@ break; #pragma clang diagnostic pop case 8: { -#line 858 "inform7/Chapter 35/Actions.w" +#line 857 "inform7/Chapter 35/Actions.w" *X = REQUIRES_ACCESS; *XP = K_thing; Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), "an action can only apply to things or to kinds of value", @@ -117693,7 +118064,7 @@ break; "one visible thing'."); } -#line 774 "inform7/Chapter 35/Actions.w" +#line 773 "inform7/Chapter 35/Actions.w" ;; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -117703,20 +118074,20 @@ break; } return TRUE; } -#line 775 "inform7/Chapter 35/Actions.w" +#line 774 "inform7/Chapter 35/Actions.w" int act_req_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = R[1]; *XP = RP[2]; { -#line 846 "inform7/Chapter 35/Actions.w" +#line 845 "inform7/Chapter 35/Actions.w" if (Kinds__Compare__eq(*XP, K_thing)) { if (*X == UNRESTRICTED_ACCESS) *X = REQUIRES_ACCESS; *XP = K_object; } else if (Kinds__Compare__lt(*XP, K_object)) { { -#line 858 "inform7/Chapter 35/Actions.w" +#line 857 "inform7/Chapter 35/Actions.w" *X = REQUIRES_ACCESS; *XP = K_thing; Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), "an action can only apply to things or to kinds of value", @@ -117724,12 +118095,12 @@ int act_req_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { "one visible thing'."); } -#line 850 "inform7/Chapter 35/Actions.w" +#line 849 "inform7/Chapter 35/Actions.w" ; } else { if (*X != UNRESTRICTED_ACCESS) { -#line 858 "inform7/Chapter 35/Actions.w" +#line 857 "inform7/Chapter 35/Actions.w" *X = REQUIRES_ACCESS; *XP = K_thing; Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), "an action can only apply to things or to kinds of value", @@ -117737,7 +118108,48 @@ int act_req_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { "one visible thing'."); } -#line 852 "inform7/Chapter 35/Actions.w" +#line 851 "inform7/Chapter 35/Actions.w" +; + } + +} +#line 776 "inform7/Chapter 35/Actions.w" +;; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" +break; +#pragma clang diagnostic pop + case 1: *X = UNRESTRICTED_ACCESS; *XP = RP[1]; +{ +#line 845 "inform7/Chapter 35/Actions.w" + if (Kinds__Compare__eq(*XP, K_thing)) { + if (*X == UNRESTRICTED_ACCESS) *X = REQUIRES_ACCESS; + *XP = K_object; + } else if (Kinds__Compare__lt(*XP, K_object)) { + +{ +#line 857 "inform7/Chapter 35/Actions.w" + *X = REQUIRES_ACCESS; *XP = K_thing; + Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), + "an action can only apply to things or to kinds of value", + "for instance: 'photographing is an action applying to " + "one visible thing'."); + +} +#line 849 "inform7/Chapter 35/Actions.w" +; + } else { + if (*X != UNRESTRICTED_ACCESS) +{ +#line 857 "inform7/Chapter 35/Actions.w" + *X = REQUIRES_ACCESS; *XP = K_thing; + Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), + "an action can only apply to things or to kinds of value", + "for instance: 'photographing is an action applying to " + "one visible thing'."); + +} +#line 851 "inform7/Chapter 35/Actions.w" ; } @@ -117747,53 +118159,12 @@ int act_req_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" break; -#pragma clang diagnostic pop - case 1: *X = UNRESTRICTED_ACCESS; *XP = RP[1]; -{ -#line 846 "inform7/Chapter 35/Actions.w" - if (Kinds__Compare__eq(*XP, K_thing)) { - if (*X == UNRESTRICTED_ACCESS) *X = REQUIRES_ACCESS; - *XP = K_object; - } else if (Kinds__Compare__lt(*XP, K_object)) { - -{ -#line 858 "inform7/Chapter 35/Actions.w" - *X = REQUIRES_ACCESS; *XP = K_thing; - Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), - "an action can only apply to things or to kinds of value", - "for instance: 'photographing is an action applying to " - "one visible thing'."); - -} -#line 850 "inform7/Chapter 35/Actions.w" -; - } else { - if (*X != UNRESTRICTED_ACCESS) -{ -#line 858 "inform7/Chapter 35/Actions.w" - *X = REQUIRES_ACCESS; *XP = K_thing; - Problems__Issue__sentence_problem(_P_(PM_ActionMisapplied), - "an action can only apply to things or to kinds of value", - "for instance: 'photographing is an action applying to " - "one visible thing'."); - -} -#line 852 "inform7/Chapter 35/Actions.w" -; - } - -} -#line 778 "inform7/Chapter 35/Actions.w" -;; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" -break; #pragma clang diagnostic pop default: *X = R[0]; break; } return TRUE; } -#line 779 "inform7/Chapter 35/Actions.w" +#line 778 "inform7/Chapter 35/Actions.w" int action_access_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -117816,9 +118187,9 @@ break; } return TRUE; } -#line 784 "inform7/Chapter 35/Actions.w" +#line 783 "inform7/Chapter 35/Actions.w" -#line 788 "inform7/Chapter 35/Actions.w" +#line 787 "inform7/Chapter 35/Actions.w" int action_sentence_object_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = 0; @@ -117828,13 +118199,13 @@ break; #pragma clang diagnostic pop case 1: { -#line 806 "inform7/Chapter 35/Actions.w" +#line 805 "inform7/Chapter 35/Actions.w" Problems__Issue__sentence_problem(_P_(PM_ActionClauseUnknown), "the action definition contained text I couldn't follow", "and may be too complicated."); } -#line 790 "inform7/Chapter 35/Actions.w" +#line 789 "inform7/Chapter 35/Actions.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -117844,7 +118215,7 @@ break; } return TRUE; } -#line 791 "inform7/Chapter 35/Actions.w" +#line 790 "inform7/Chapter 35/Actions.w" int action_clauses_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -117855,7 +118226,47 @@ break; #pragma clang diagnostic pop case 1: *X = R[2]; { -#line 813 "inform7/Chapter 35/Actions.w" +#line 812 "inform7/Chapter 35/Actions.w" + int c1, c2; + switch (*X) { + case OOW_ACT_CLAUSE: + an_being_parsed->out_of_world = TRUE; break; + case PP_ACT_CLAUSE: + GET_RW(action_clause_NTM, 1, c1, c2); + if (c1 != c2) { + Problems__Issue__sentence_problem(_P_(PM_MultiwordPastParticiple), + "a past participle must be given as a single word", + "even if the action name itself is longer than that. " + "(For instance, the action name 'hanging around until' " + "should have past participle given just as 'hung'; I " + "can already deduce the rest.)"); + } + Inflections__set_past_participle(&(an_being_parsed->past_word_ref1), &(an_being_parsed->past_word_ref2), c2); + break; + case APPLYING_ACT_CLAUSE: + an_being_parsed->noun_access = ac1_NTMV; an_being_parsed->second_access = ac2_NTMV; + an_being_parsed->noun_kind = kind_op1_NTMV; an_being_parsed->second_kind = kind_op2_NTMV; + an_being_parsed->min_parameters = num_NTMV; + an_being_parsed->max_parameters = an_being_parsed->min_parameters; + break; + case LIGHT_ACT_CLAUSE: + an_being_parsed->requires_light = TRUE; + break; + case ABBREV_ACT_CLAUSE: + an_being_parsed->abbreviable = TRUE; + break; + } + +} +#line 793 "inform7/Chapter 35/Actions.w" +; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" +break; +#pragma clang diagnostic pop + case 2: *X = R[1]; +{ +#line 812 "inform7/Chapter 35/Actions.w" int c1, c2; switch (*X) { case OOW_ACT_CLAUSE: @@ -117892,52 +118303,12 @@ break; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" break; -#pragma clang diagnostic pop - case 2: *X = R[1]; -{ -#line 813 "inform7/Chapter 35/Actions.w" - int c1, c2; - switch (*X) { - case OOW_ACT_CLAUSE: - an_being_parsed->out_of_world = TRUE; break; - case PP_ACT_CLAUSE: - GET_RW(action_clause_NTM, 1, c1, c2); - if (c1 != c2) { - Problems__Issue__sentence_problem(_P_(PM_MultiwordPastParticiple), - "a past participle must be given as a single word", - "even if the action name itself is longer than that. " - "(For instance, the action name 'hanging around until' " - "should have past participle given just as 'hung'; I " - "can already deduce the rest.)"); - } - Inflections__set_past_participle(&(an_being_parsed->past_word_ref1), &(an_being_parsed->past_word_ref2), c2); - break; - case APPLYING_ACT_CLAUSE: - an_being_parsed->noun_access = ac1_NTMV; an_being_parsed->second_access = ac2_NTMV; - an_being_parsed->noun_kind = kind_op1_NTMV; an_being_parsed->second_kind = kind_op2_NTMV; - an_being_parsed->min_parameters = num_NTMV; - an_being_parsed->max_parameters = an_being_parsed->min_parameters; - break; - case LIGHT_ACT_CLAUSE: - an_being_parsed->requires_light = TRUE; - break; - case ABBREV_ACT_CLAUSE: - an_being_parsed->abbreviable = TRUE; - break; - } - -} -#line 795 "inform7/Chapter 35/Actions.w" -; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunreachable-code" -break; #pragma clang diagnostic pop default: *X = R[0]; break; } return TRUE; } -#line 796 "inform7/Chapter 35/Actions.w" +#line 795 "inform7/Chapter 35/Actions.w" int action_clause_terminated_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -117965,9 +118336,9 @@ break; } return TRUE; } -#line 802 "inform7/Chapter 35/Actions.w" +#line 801 "inform7/Chapter 35/Actions.w" -#line 867 "inform7/Chapter 35/Actions.w" +#line 866 "inform7/Chapter 35/Actions.w" void PL__Actions__act_parse_definition(parse_node *p) { int aw1 = p->down->next->word_ref1, aw2 = p->down->next->word_ref2; Preform__parse_nt_against_word_range(action_sentence_subject_NTM, aw1, aw2, NULL, NULL); @@ -118035,7 +118406,7 @@ int PL__Actions__get_max_parameters(action_name *an) { return an->max_parameters; } -#line 942 "inform7/Chapter 35/Actions.w" +#line 941 "inform7/Chapter 35/Actions.w" int PL__Actions__can_be_compiled_in_past_tense(action_name *an) { if (an->min_parameters > 1) return FALSE; if (an->max_parameters > 1) return FALSE; @@ -118059,7 +118430,7 @@ void PL__Actions__ActionHappened_array(OUTPUT_STREAM) { WRITE(";\n\n"); } -#line 968 "inform7/Chapter 35/Actions.w" +#line 967 "inform7/Chapter 35/Actions.w" void PL__Actions__add_gl(action_name *an, grammar_line *gl) { if (an->list_with_action == NULL) an->list_with_action = gl; else PL__Parsing__Lines__list_with_action_add(an->list_with_action, gl); @@ -118069,7 +118440,7 @@ void PL__Actions__remove_gl(action_name *an) { an->list_with_action = NULL; } -#line 980 "inform7/Chapter 35/Actions.w" +#line 979 "inform7/Chapter 35/Actions.w" void PL__Actions__check_types_for_grammar(action_name *an, int tok_values, kind **tok_value_kinds) { int required = 0; char *failed_on = "<internal error>"; @@ -118179,7 +118550,7 @@ void PL__Actions__check_types_for_grammar(action_name *an, int tok_values, Problems__issue_problem_end(); } -#line 1095 "inform7/Chapter 35/Actions.w" +#line 1094 "inform7/Chapter 35/Actions.w" void PL__Actions__compile_action_routines(OUTPUT_STREAM) { action_name *an; LOOP_OVER(an, action_name) { @@ -118195,7 +118566,7 @@ void PL__Actions__compile_action_routines(OUTPUT_STREAM) { } } -#line 1114 "inform7/Chapter 35/Actions.w" +#line 1113 "inform7/Chapter 35/Actions.w" void PL__Actions__ActionData_array(OUTPUT_STREAM) { action_name *an; int mn, ms, ml, mnp, msp, hn, hs, record_count = 0; @@ -118249,11 +118620,11 @@ void PL__Actions__DB_Action_Details(OUTPUT_STREAM) { if (j0 >= 0) { { -#line 1199 "inform7/Chapter 35/Actions.w" +#line 1198 "inform7/Chapter 35/Actions.w" if (clc++ > 0) WRITE("print \" \"; "); } -#line 1165 "inform7/Chapter 35/Actions.w" +#line 1164 "inform7/Chapter 35/Actions.w" ; WRITE("print \""); PL__Actions__print_action_text_to(j0, j-1, an->word_ref1, OUT); @@ -118262,11 +118633,11 @@ void PL__Actions__DB_Action_Details(OUTPUT_STREAM) { } { -#line 1199 "inform7/Chapter 35/Actions.w" +#line 1198 "inform7/Chapter 35/Actions.w" if (clc++ > 0) WRITE("print \" \"; "); } -#line 1171 "inform7/Chapter 35/Actions.w" +#line 1170 "inform7/Chapter 35/Actions.w" ; WRITE("if (for_say == 2) print \"it\"; else "); PL__Actions__cat_something2(OUT, an, somethings++); @@ -118278,11 +118649,11 @@ void PL__Actions__DB_Action_Details(OUTPUT_STREAM) { if (j0 >= 0) { { -#line 1199 "inform7/Chapter 35/Actions.w" +#line 1198 "inform7/Chapter 35/Actions.w" if (clc++ > 0) WRITE("print \" \"; "); } -#line 1180 "inform7/Chapter 35/Actions.w" +#line 1179 "inform7/Chapter 35/Actions.w" ; WRITE("print \""); PL__Actions__print_action_text_to(j0, j-1, an->word_ref1, OUT); @@ -118292,11 +118663,11 @@ void PL__Actions__DB_Action_Details(OUTPUT_STREAM) { WRITE("if (for_say ~= 2) { "); { -#line 1199 "inform7/Chapter 35/Actions.w" +#line 1198 "inform7/Chapter 35/Actions.w" if (clc++ > 0) WRITE("print \" \"; "); } -#line 1187 "inform7/Chapter 35/Actions.w" +#line 1186 "inform7/Chapter 35/Actions.w" ; PL__Actions__cat_something2(OUT, an, somethings++); WRITE("}"); @@ -118306,7 +118677,7 @@ void PL__Actions__DB_Action_Details(OUTPUT_STREAM) { OUTDENT; WRITE("}\n"); } -#line 1204 "inform7/Chapter 35/Actions.w" +#line 1203 "inform7/Chapter 35/Actions.w" void PL__Actions__cat_something2(OUTPUT_STREAM, action_name *an, int n) { kind *K = an->noun_kind; char *var = "n"; @@ -118340,7 +118711,7 @@ void PL__Actions__ActionCoding_array(OUTPUT_STREAM) { WRITE(";\n\n"); } -#line 1240 "inform7/Chapter 35/Actions.w" +#line 1239 "inform7/Chapter 35/Actions.w" int PL__Actions__index(action_name *an, int pass, extension_file **ext, heading **current_area, int f, int *new_par, int bold, int on_details_page) { @@ -118473,7 +118844,7 @@ void PL__Actions__act_index_something(action_name *an, int argc) { INDEX("</font> "); } -#line 39 "inform7/Chapter 35/Action Name Lists.w" +#line 38 "inform7/Chapter 35/Action Name Lists.w" action_name_list *PL__Actions__Lists__anl_new(void) { action_name_list *new_anl = CREATE(action_name_list); new_anl->action_listed = NULL; @@ -118538,7 +118909,7 @@ action_name *PL__Actions__Lists__get_singleton_action(action_name_list *anl) { action_name_list *anl_being_parsed = NULL; -#line 113 "inform7/Chapter 35/Action Name Lists.w" +#line 112 "inform7/Chapter 35/Action Name Lists.w" int action_list_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = FALSE; *XP = RP[1];; @@ -118558,14 +118929,14 @@ break; #pragma clang diagnostic pop case 3: { -#line 133 "inform7/Chapter 35/Action Name Lists.w" +#line 132 "inform7/Chapter 35/Action Name Lists.w" *X = TRUE; action_name_list *new_anl = PL__Actions__Lists__anl_new(); new_anl->word_position = w1; *XP = new_anl; } -#line 117 "inform7/Chapter 35/Action Name Lists.w" +#line 116 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118585,13 +118956,13 @@ break; } return TRUE; } -#line 120 "inform7/Chapter 35/Action Name Lists.w" +#line 119 "inform7/Chapter 35/Action Name Lists.w" int anl_excluded_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 256 "inform7/Chapter 35/Action Name Lists.w" +#line 255 "inform7/Chapter 35/Action Name Lists.w" action_name_list *anl = PL__Actions__Lists__flip_anl_parity(RP[1], TRUE); if ((anl == NULL) || (PL__Actions__can_have_parameters(anl->action_listed) == FALSE)) @@ -118604,7 +118975,7 @@ int anl_excluded_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *XP = anl; } -#line 122 "inform7/Chapter 35/Action Name Lists.w" +#line 121 "inform7/Chapter 35/Action Name Lists.w" ;; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118619,7 +118990,7 @@ break; } return TRUE; } -#line 124 "inform7/Chapter 35/Action Name Lists.w" +#line 123 "inform7/Chapter 35/Action Name Lists.w" int anl_minimal_common_operand_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -118642,14 +119013,14 @@ break; } return TRUE; } -#line 129 "inform7/Chapter 35/Action Name Lists.w" +#line 128 "inform7/Chapter 35/Action Name Lists.w" -#line 150 "inform7/Chapter 35/Action Name Lists.w" +#line 149 "inform7/Chapter 35/Action Name Lists.w" int anl_to_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 165 "inform7/Chapter 35/Action Name Lists.w" +#line 164 "inform7/Chapter 35/Action Name Lists.w" action_name_list *anl = RP[1]; int x1, x2; GET_RW(anl_in_tail_NTM, 1, x1, x2); @@ -118657,7 +119028,7 @@ int anl_to_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { anl->in_w2 = x2; } -#line 151 "inform7/Chapter 35/Action Name Lists.w" +#line 150 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118672,13 +119043,13 @@ break; } return TRUE; } -#line 153 "inform7/Chapter 35/Action Name Lists.w" +#line 152 "inform7/Chapter 35/Action Name Lists.w" int anl_operand_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 174 "inform7/Chapter 35/Action Name Lists.w" +#line 173 "inform7/Chapter 35/Action Name Lists.w" *X = TRUE; action_name_list *new_anl; if ((!preform_lookahead_mode) && (anl_being_parsed)) new_anl = anl_being_parsed; @@ -118692,7 +119063,7 @@ int anl_operand_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *XP = new_anl; } -#line 155 "inform7/Chapter 35/Action Name Lists.w" +#line 154 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118702,7 +119073,7 @@ break; } return TRUE; } -#line 156 "inform7/Chapter 35/Action Name Lists.w" +#line 155 "inform7/Chapter 35/Action Name Lists.w" int anl_in_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -118725,14 +119096,14 @@ break; } return TRUE; } -#line 161 "inform7/Chapter 35/Action Name Lists.w" +#line 160 "inform7/Chapter 35/Action Name Lists.w" -#line 189 "inform7/Chapter 35/Action Name Lists.w" +#line 188 "inform7/Chapter 35/Action Name Lists.w" int anl_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 270 "inform7/Chapter 35/Action Name Lists.w" +#line 269 "inform7/Chapter 35/Action Name Lists.w" action_name_list *left_atom = RP[1]; action_name_list *right_tail = RP[2]; if (left_atom == NULL) { *XP = right_tail; } @@ -118746,7 +119117,7 @@ int anl_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { } -#line 190 "inform7/Chapter 35/Action Name Lists.w" +#line 189 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118761,7 +119132,7 @@ break; } return TRUE; } -#line 192 "inform7/Chapter 35/Action Name Lists.w" +#line 191 "inform7/Chapter 35/Action Name Lists.w" int anl_tail_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { @@ -118779,14 +119150,14 @@ break; } return TRUE; } -#line 196 "inform7/Chapter 35/Action Name Lists.w" +#line 195 "inform7/Chapter 35/Action Name Lists.w" -#line 208 "inform7/Chapter 35/Action Name Lists.w" +#line 207 "inform7/Chapter 35/Action Name Lists.w" int anl_entry_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: { -#line 232 "inform7/Chapter 35/Action Name Lists.w" +#line 231 "inform7/Chapter 35/Action Name Lists.w" *X = 0; action_name_list *new_anl = PL__Actions__Lists__anl_new(); new_anl->word_position = w1; @@ -118795,7 +119166,7 @@ int anl_entry_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { *XP = new_anl; } -#line 209 "inform7/Chapter 35/Action Name Lists.w" +#line 208 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118803,7 +119174,7 @@ break; #pragma clang diagnostic pop case 1: { -#line 242 "inform7/Chapter 35/Action Name Lists.w" +#line 241 "inform7/Chapter 35/Action Name Lists.w" *X = 0; action_name_list *new_anl = PL__Actions__Lists__anl_new(); new_anl->word_position = w1; @@ -118816,7 +119187,7 @@ break; *XP = new_anl; } -#line 210 "inform7/Chapter 35/Action Name Lists.w" +#line 209 "inform7/Chapter 35/Action Name Lists.w" ; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunreachable-code" @@ -118831,10 +119202,10 @@ break; } return TRUE; } -#line 212 "inform7/Chapter 35/Action Name Lists.w" +#line 211 "inform7/Chapter 35/Action Name Lists.w" int named_action_pattern_NTMR(int w1, int w2, int *X, void **XP) { -#line 214 "inform7/Chapter 35/Action Name Lists.w" +#line 213 "inform7/Chapter 35/Action Name Lists.w" named_action_pattern *nap = PL__Actions__Patterns__Named__by_name(w1, w2); if (nap) { *XP = nap; return TRUE; @@ -118843,7 +119214,7 @@ int named_action_pattern_NTMR(int w1, int w2, int *X, void **XP) { } int anl_entry_with_action_NTMR(int w1, int w2, int *X, void **XP) { -#line 222 "inform7/Chapter 35/Action Name Lists.w" +#line 221 "inform7/Chapter 35/Action Name Lists.w" action_name_list *anl = PL__Actions__Lists__anl_parse_internal(w1, w2); if (anl) { *XP = anl; return TRUE; @@ -118851,7 +119222,7 @@ int anl_entry_with_action_NTMR(int w1, int w2, int *X, void **XP) { return FALSE; } -#line 285 "inform7/Chapter 35/Action Name Lists.w" +#line 284 "inform7/Chapter 35/Action Name Lists.w" action_name_list *PL__Actions__Lists__flip_anl_parity(action_name_list *anl, int flip_all) { if (flip_all) { action_name_list *L; @@ -118864,7 +119235,7 @@ action_name_list *PL__Actions__Lists__flip_anl_parity(action_name_list *anl, int return anl; } -#line 300 "inform7/Chapter 35/Action Name Lists.w" +#line 299 "inform7/Chapter 35/Action Name Lists.w" int anl_parsing_tense = IS_TENSE; action_name_list *PL__Actions__Lists__parse(int w1, int w2, int tense) { int t = anl_parsing_tense; @@ -118875,7 +119246,7 @@ action_name_list *PL__Actions__Lists__parse(int w1, int w2, int tense) { return NULL; } -#line 313 "inform7/Chapter 35/Action Name Lists.w" +#line 312 "inform7/Chapter 35/Action Name Lists.w" action_name_list *PL__Actions__Lists__anl_parse_internal(int w1, int w2) { LOGIF(ACTION_PATTERN_PARSING, "Parsing ANL from $W (tense %d)\n", w1, w2, anl_parsing_tense); @@ -119055,7 +119426,7 @@ void PL__Actions__Lists__compile(OUTPUT_STREAM, action_name_list *anl) { WRITE(")"); } -#line 500 "inform7/Chapter 35/Action Name Lists.w" +#line 499 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__compare_specificity(action_name_list *anl1, action_name_list *anl2) { int count1, count2; count1 = PL__Actions__Lists__count_actions_covered(anl1); @@ -119065,7 +119436,7 @@ int PL__Actions__Lists__compare_specificity(action_name_list *anl1, action_name_ return 0; } -#line 512 "inform7/Chapter 35/Action Name Lists.w" +#line 511 "inform7/Chapter 35/Action Name Lists.w" int PL__Actions__Lists__count_actions_covered(action_name_list *anl) { int k, parity = TRUE, infinity = NUMBER_CREATED(action_name); if (anl == NULL) return infinity; @@ -122578,7 +122949,7 @@ int PL__Parsing__valid_new_token_name(int w1, int w2) { return TRUE; } -#line 54 "inform7/Chapter 36/Grammar Properties.w" +#line 52 "inform7/Chapter 36/Grammar Properties.w" parsing_data *PL__Parsing__Visibility__new_data(inference_subject *subj) { parsing_data *pd = CREATE(parsing_data); pd->understand_as_this_object = NULL; @@ -122594,7 +122965,7 @@ parsing_pp_data *PL__Parsing__Visibility__new_pp_data(property_permission *pp) { return pd; } -#line 72 "inform7/Chapter 36/Grammar Properties.w" +#line 70 "inform7/Chapter 36/Grammar Properties.w" void PL__Parsing__Visibility__start(void) { PLUGIN_REGISTER(PLUGIN_NEW_VARIABLE_NOTIFY, PL__Parsing__Visibility__parsing_new_variable_notify); PLUGIN_REGISTER(PLUGIN_NEW_SUBJECT_NOTIFY, PL__Parsing__Visibility__parsing_new_subject_notify); @@ -122613,7 +122984,7 @@ int PL__Parsing__Visibility__parsing_new_permission_notify(property_permission * return FALSE; } -#line 97 "inform7/Chapter 36/Grammar Properties.w" +#line 95 "inform7/Chapter 36/Grammar Properties.w" int notable_parsing_variables_NTMC(int *X, void **XP, int *R, void **RP, int w1, int w2) { switch(R[0]) { case 0: *X = 0; kind_understood_NTMV = RP[1]; @@ -122660,9 +123031,9 @@ break; } return TRUE; } -#line 106 "inform7/Chapter 36/Grammar Properties.w" +#line 104 "inform7/Chapter 36/Grammar Properties.w" -#line 110 "inform7/Chapter 36/Grammar Properties.w" +#line 108 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_new_variable_notify(nonlocal_variable *var) { int w1 = var->word_ref1, w2 = var->word_ref2; if (Preform__parse_nt_against_word_range(notable_parsing_variables_NTM, w1, w2, NULL, NULL)) { @@ -122685,7 +123056,7 @@ int PL__Parsing__Visibility__parsing_new_variable_notify(nonlocal_variable *var) return FALSE; } -#line 135 "inform7/Chapter 36/Grammar Properties.w" +#line 133 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_estimate_property_usage(kind *k, int *words_used) { int w1, w2; Kinds__Behaviour__get_name(k, &w1, &w2, FALSE); @@ -122696,7 +123067,7 @@ int PL__Parsing__Visibility__parsing_estimate_property_usage(kind *k, int *words return FALSE; } -#line 149 "inform7/Chapter 36/Grammar Properties.w" +#line 147 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__parsing_complete_model(int stage) { if (stage == 5) { instance *I; @@ -122708,7 +123079,7 @@ int PL__Parsing__Visibility__parsing_complete_model(int stage) { inference_subject *subj = Instances__as_subject(I); { -#line 194 "inform7/Chapter 36/Grammar Properties.w" +#line 192 "inform7/Chapter 36/Grammar Properties.w" if (PL__Naming__object_is_privately_named(I) == FALSE) { kind *K = Instances__kind(I); int w1, w2, j, from_kind = FALSE; @@ -122760,22 +123131,22 @@ int PL__Parsing__Visibility__parsing_complete_model(int stage) { } } -#line 158 "inform7/Chapter 36/Grammar Properties.w" +#line 156 "inform7/Chapter 36/Grammar Properties.w" ; { -#line 248 "inform7/Chapter 36/Grammar Properties.w" +#line 246 "inform7/Chapter 36/Grammar Properties.w" STREAM *S = PL__Parsing__Tokens__General__compile_parse_name_property(subj); if (S) Properties__Valued__assert(P_parse_name, subj, Specifications__Values__faux_text_literal_from_stream(S), CERTAIN_CE); } -#line 159 "inform7/Chapter 36/Grammar Properties.w" +#line 157 "inform7/Chapter 36/Grammar Properties.w" ; { -#line 262 "inform7/Chapter 36/Grammar Properties.w" +#line 260 "inform7/Chapter 36/Grammar Properties.w" if (InferenceSubjects__is_within(subj, Kinds__Behaviour__as_subject(K_room)) == FALSE) { STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) @@ -122786,7 +123157,7 @@ int PL__Parsing__Visibility__parsing_complete_model(int stage) { } } -#line 160 "inform7/Chapter 36/Grammar Properties.w" +#line 158 "inform7/Chapter 36/Grammar Properties.w" ; } @@ -122796,21 +123167,21 @@ int PL__Parsing__Visibility__parsing_complete_model(int stage) { inference_subject *subj = Kinds__Behaviour__as_subject(K); { -#line 248 "inform7/Chapter 36/Grammar Properties.w" +#line 246 "inform7/Chapter 36/Grammar Properties.w" STREAM *S = PL__Parsing__Tokens__General__compile_parse_name_property(subj); if (S) Properties__Valued__assert(P_parse_name, subj, Specifications__Values__faux_text_literal_from_stream(S), CERTAIN_CE); } -#line 167 "inform7/Chapter 36/Grammar Properties.w" +#line 165 "inform7/Chapter 36/Grammar Properties.w" ; } inference_subject *subj = Kinds__Behaviour__as_subject(K_thing); { -#line 262 "inform7/Chapter 36/Grammar Properties.w" +#line 260 "inform7/Chapter 36/Grammar Properties.w" if (InferenceSubjects__is_within(subj, Kinds__Behaviour__as_subject(K_room)) == FALSE) { STREAM *PROP = STREAM_NEW; if (SMALL_STREAM_OPEN_IN_MEMORY(PROP) == FALSE) @@ -122821,13 +123192,13 @@ int PL__Parsing__Visibility__parsing_complete_model(int stage) { } } -#line 171 "inform7/Chapter 36/Grammar Properties.w" +#line 169 "inform7/Chapter 36/Grammar Properties.w" ; } return FALSE; } -#line 282 "inform7/Chapter 36/Grammar Properties.w" +#line 280 "inform7/Chapter 36/Grammar Properties.w" int PL__Parsing__Visibility__seek(property *pr, inference_subject *subj, int level, int when1, int when2) { int parity, upto = 1; @@ -125484,7 +125855,7 @@ void PL__Parsing__Tokens__Values__compile_type_gprs(OUTPUT_STREAM) { LocalVariables__add_internal_local("w"); LocalVariables__add_internal_local("rv"); LITERAL_FORMS_LOOP(lp, K) { - Semantics__Nouns__LiteralPatterns__gpr_locals(); + LiteralPatterns__gpr_locals(); break; } @@ -125492,7 +125863,7 @@ void PL__Parsing__Tokens__Values__compile_type_gprs(OUTPUT_STREAM) { #line 78 "inform7/Chapter 36/Tokens Parsing Values.w" WRITE("original_wn = wn;\n"); LITERAL_FORMS_LOOP(lp, K) { - Semantics__Nouns__LiteralPatterns__gpr(OUT, lp); + LiteralPatterns__gpr(OUT, lp); WRITE("wn = original_wn;\n"); } @@ -125550,7 +125921,7 @@ void PL__Parsing__Tokens__Values__compile_type_gprs(OUTPUT_STREAM) { #line 78 "inform7/Chapter 36/Tokens Parsing Values.w" WRITE("original_wn = wn;\n"); LITERAL_FORMS_LOOP(lp, K) { - Semantics__Nouns__LiteralPatterns__gpr(OUT, lp); + LiteralPatterns__gpr(OUT, lp); WRITE("wn = original_wn;\n"); } @@ -126811,7 +127182,7 @@ int PL__Figures__figures_new_named_instance_notify(instance *nc) { blorb_figure *PL__Figures__new_blorb_figure(instance *nc) { blorb_figure *bf = CREATE(blorb_figure); bf->word_ref1 = -1; bf->word_ref2 = -1; - bf->path_to_figure[0] = 0; + bf->filename_of_image_file = NULL; bf->figure_number = 0; bf->alt_description = -1; return bf; @@ -126919,11 +127290,12 @@ void PL__Figures__register_figure(int f1, int f2, int fn1, int fn2) { bf->word_ref1 = f1; bf->word_ref2 = f2; if (wn >= 0) { bf->figure_number = VirtualMachines__get_next_free_blorb_resource_ID(); - sprintf(bf->path_to_figure, "Figures%c%s", FOLDER_SEPARATOR, Lexer__word_text(wn)); + bf->filename_of_image_file = + Filenames__in_folder(pathname_of_materials_figures, Lexer__word_text(wn)); bf->alt_description = alttext_NTMV; } else { bf->figure_number = 1; - bf->path_to_figure[0] = 0; + bf->filename_of_image_file = NULL; bf->alt_description = alttext_NTMV; F_cover_art = bf; } @@ -126936,7 +127308,7 @@ char *PL__Figures__description_of_cover_art(void) { return Lexer__word_text(F_cover_art->alt_description); } -#line 185 "inform7/Chapter 37/Figures.w" +#line 186 "inform7/Chapter 37/Figures.w" void PL__Figures__write_picture_manifest(OUTPUT_STREAM, int releasing_cover) { if (Plugins__Manage__plugged_in(figures_plugin) == FALSE) return; blorb_figure *bf; @@ -126954,7 +127326,9 @@ void PL__Figures__write_picture_manifest(OUTPUT_STREAM, int releasing_cover) { LOOP_OVER(bf, blorb_figure) if (bf->figure_number > 1) { WRITE("<key>%d</key>\n", bf->figure_number); - WRITE("<string>%s</string>\n", bf->path_to_figure); + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, bf->filename_of_image_file, pathname_of_area[MATERIALS_FS_AREA]); + WRITE("<string>%s</string>\n", rel); } OUTDENT; WRITE("</dict>\n"); PL__Sounds__write_sounds_manifest(OUT); @@ -126962,8 +127336,8 @@ void PL__Figures__write_picture_manifest(OUTPUT_STREAM, int releasing_cover) { OUTDENT; WRITE("</plist>\n"); } -#line 214 "inform7/Chapter 37/Figures.w" -void PL__Figures__write_blurb_commands(OUTPUT_STREAM, char *resources) { +#line 217 "inform7/Chapter 37/Figures.w" +void PL__Figures__write_blurb_commands(OUTPUT_STREAM) { if (Plugins__Manage__plugged_in(figures_plugin) == FALSE) return; blorb_figure *bf; LOOP_OVER(bf, blorb_figure) @@ -126972,28 +127346,23 @@ void PL__Figures__write_blurb_commands(OUTPUT_STREAM, char *resources) { if (bf->alt_description >= 0) desc = Lexer__word_text(bf->alt_description); if (strlen(desc) > 0) - WRITE("picture %d \"%s%c%s\" \"%s\"\n", - bf->figure_number, resources, - FOLDER_SEPARATOR, bf->path_to_figure, - desc); + WRITE("picture %d \"%f\" \"%s\"\n", bf->figure_number, bf->filename_of_image_file, desc); else - WRITE("picture %d \"%s%c%s\"\n", - bf->figure_number, resources, - FOLDER_SEPARATOR, bf->path_to_figure); + WRITE("picture %d \"%f\"\n", bf->figure_number, bf->filename_of_image_file); } } -#line 237 "inform7/Chapter 37/Figures.w" +#line 235 "inform7/Chapter 37/Figures.w" void PL__Figures__write_copy_commands(void) { if (Plugins__Manage__plugged_in(figures_plugin) == FALSE) return; blorb_figure *bf; LOOP_OVER(bf, blorb_figure) if (bf->figure_number > 1) - PL__Bibliographic__Release__create_aux_file(bf->path_to_figure, - "--", "Figures", SEPARATE_FIGURES_PAYLOAD); + PL__Bibliographic__Release__create_aux_file(bf->filename_of_image_file, + pathname_of_released_figures, "--", SEPARATE_FIGURES_PAYLOAD); } -#line 249 "inform7/Chapter 37/Figures.w" +#line 247 "inform7/Chapter 37/Figures.w" void PL__Figures__tableoffigures_array(OUTPUT_STREAM) { if (Plugins__Manage__plugged_in(figures_plugin) == FALSE) return; WRITE("Array ResourceIDsOfFigures --> 0 "); @@ -127002,11 +127371,10 @@ void PL__Figures__tableoffigures_array(OUTPUT_STREAM) { WRITE(" 0;\n"); } -#line 265 "inform7/Chapter 37/Figures.w" +#line 263 "inform7/Chapter 37/Figures.w" void PL__Figures__index_all(void) { if (Plugins__Manage__plugged_in(figures_plugin) == FALSE) return; blorb_figure *bf; FILE *FIGURE_FILE; - char image_filename[MAX_FILENAME_LENGTH]; char line2[MAX_FILENAME_LENGTH]; int MAX_INDEXED_FIGURES = UseOptions__get_index_figure_thumbnails(); int rv; @@ -127021,16 +127389,14 @@ void PL__Figures__index_all(void) { LOOP_OVER(bf, blorb_figure) { if (bf->figure_number > 1) { unsigned int width = 0, height = 0; - sprintf(image_filename, "%s%c%s", materials_folder, FOLDER_SEPARATOR, - bf->path_to_figure); rv = 0; - FIGURE_FILE = Platform__iso_fopen(image_filename, "rb"); + FIGURE_FILE = Platform__iso_fopen(bf->filename_of_image_file, "rb"); if (FIGURE_FILE) { char *real_format = "JPEG"; rv = ImageFiles__get_JPEG_dimensions(FIGURE_FILE, &width, &height); fclose(FIGURE_FILE); if (rv == 0) { - FIGURE_FILE = Platform__iso_fopen(image_filename, "rb"); + FIGURE_FILE = Platform__iso_fopen(bf->filename_of_image_file, "rb"); if (FIGURE_FILE) { real_format = "PNG"; rv = ImageFiles__get_PNG_dimensions(FIGURE_FILE, &width, &height); @@ -127044,16 +127410,17 @@ void PL__Figures__index_all(void) { real_format, width, height); } } else { - sprintf(line2, "<i>Missing from the .materials%cFigures folder</i><br>\n", - FOLDER_SEPARATOR); + sprintf(line2, "<i>Missing from the Figures folder</i><br>\n"); } HTML__first_html_column(ifl, THUMBNAIL_WIDTH+10); if (rv == 0) INDEX("<img border=\"0\" src=\"inform:/doc_images/image_problem.png\"> "); - else if (count_of_displayed_figures++ < MAX_INDEXED_FIGURES) + else if (count_of_displayed_figures++ < MAX_INDEXED_FIGURES) { + char image_filename[MAX_FILENAME_LENGTH]; + Filenames__to_string(image_filename, bf->filename_of_image_file); INDEX("<img border=\"1\" src=\"file://%s\" width=\"%d\" height=\"%d\"> ", image_filename, THUMBNAIL_WIDTH, THUMBNAIL_WIDTH*height/width); - else + } else INDEX("<div style=\"width:%dpx; height:%dpx; border:1px solid; background-color:#6495ed;\">" " </div>", THUMBNAIL_WIDTH, THUMBNAIL_WIDTH*height/width); @@ -127061,8 +127428,10 @@ void PL__Figures__index_all(void) { HTML__next_html_column(ifl, 0); Text__print_raw_text_to_stream(bf->word_ref1, bf->word_ref2, ifl); Index__link(bf->word_ref1); - INDEX("<br>\n%sFilename: \"%s\" - resource number %d", - line2, bf->path_to_figure, bf->figure_number); + + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, bf->filename_of_image_file, pathname_of_area[MATERIALS_FS_AREA]); + INDEX("<br>\n%sFilename: \"%s\" - resource number %d", line2, rel, bf->figure_number); HTML__end_html_row(ifl); } } @@ -127202,7 +127571,8 @@ void PL__Sounds__register_sound(int f1, int f2, int fn1, int fn2) { blorb_sound *bs = RETRIEVE_POINTER_blorb_sound( Instances__get_connection(latest_instance)); - sprintf(bs->path_to_sound, "Sounds%c%s", FOLDER_SEPARATOR, Lexer__word_text(wn)); + bs->filename_of_sound_file = + Filenames__in_folder(pathname_of_materials_sounds, Lexer__word_text(wn)); bs->word_ref1 = f1; bs->word_ref2 = f2; bs->sound_number = VirtualMachines__get_next_free_blorb_resource_ID(); @@ -127212,7 +127582,7 @@ void PL__Sounds__register_sound(int f1, int f2, int fn1, int fn2) { f1, f2, Lexer__word_text(wn), bs->sound_number); } -#line 161 "inform7/Chapter 37/Sound Effects.w" +#line 162 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__write_sounds_manifest(OUTPUT_STREAM) { if (Plugins__Manage__plugged_in(sounds_plugin) == FALSE) return; blorb_sound *bs; @@ -127221,13 +127591,15 @@ void PL__Sounds__write_sounds_manifest(OUTPUT_STREAM) { WRITE("<dict>\n"); INDENT; LOOP_OVER(bs, blorb_sound) { WRITE("<key>%d</key>\n", bs->sound_number); - WRITE("<string>%s</string>\n", bs->path_to_sound); + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, bs->filename_of_sound_file, pathname_of_area[MATERIALS_FS_AREA]); + WRITE("<string>%s</string>\n", rel); } OUTDENT; WRITE("</dict>\n"); } -#line 177 "inform7/Chapter 37/Sound Effects.w" -void PL__Sounds__write_blurb_commands(OUTPUT_STREAM, char *resources) { +#line 180 "inform7/Chapter 37/Sound Effects.w" +void PL__Sounds__write_blurb_commands(OUTPUT_STREAM) { if (Plugins__Manage__plugged_in(sounds_plugin) == FALSE) return; blorb_sound *bs; LOOP_OVER(bs, blorb_sound) { @@ -127235,12 +127607,9 @@ void PL__Sounds__write_blurb_commands(OUTPUT_STREAM, char *resources) { if (bs->alt_description >= 0) desc = Lexer__word_text(bs->alt_description); if (strlen(desc) > 0) - WRITE("sound %d \"%s%c%s\" \"%s\"\n", - bs->sound_number, resources, FOLDER_SEPARATOR, bs->path_to_sound, - desc); + WRITE("sound %d \"%f\" \"%s\"\n", bs->sound_number, bs->filename_of_sound_file, desc); else - WRITE("sound %d \"%s%c%s\"\n", - bs->sound_number, resources, FOLDER_SEPARATOR, bs->path_to_sound); + WRITE("sound %d \"%f\"\n", bs->sound_number, bs->filename_of_sound_file); } } @@ -127249,11 +127618,14 @@ void PL__Sounds__write_copy_commands(void) { if (Plugins__Manage__plugged_in(sounds_plugin) == FALSE) return; blorb_sound *bs; LOOP_OVER(bs, blorb_sound) - PL__Bibliographic__Release__create_aux_file(bs->path_to_sound, "--", "Sounds", + PL__Bibliographic__Release__create_aux_file( + bs->filename_of_sound_file, + pathname_of_released_sounds, + "--", SEPARATE_SOUNDS_PAYLOAD); } -#line 208 "inform7/Chapter 37/Sound Effects.w" +#line 211 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__tableofsounds_array(OUTPUT_STREAM) { if (Plugins__Manage__plugged_in(sounds_plugin) == FALSE) return; WRITE("Array ResourceIDsOfSounds --> 0 "); @@ -127262,11 +127634,10 @@ void PL__Sounds__tableofsounds_array(OUTPUT_STREAM) { WRITE(" 0;\n"); } -#line 220 "inform7/Chapter 37/Sound Effects.w" +#line 223 "inform7/Chapter 37/Sound Effects.w" void PL__Sounds__index_all(void) { if (Plugins__Manage__plugged_in(sounds_plugin) == FALSE) return; blorb_sound *bs; FILE *SOUND_FILE; - char image_filename[MAX_FILENAME_LENGTH]; char line2[MAX_FILENAME_LENGTH]; int rv; if (NUMBER_CREATED(blorb_sound) == 0) { @@ -127279,9 +127650,8 @@ void PL__Sounds__index_all(void) { unsigned int duration, pBitsPerSecond, pChannels, pSampleRate, fsize, midi_version = 0, no_tracks = 0; int preview = TRUE, waveform_style = TRUE; - sprintf(image_filename, "%s%c%s", materials_folder, FOLDER_SEPARATOR, bs->path_to_sound); rv = 0; - SOUND_FILE = Platform__iso_fopen(image_filename, "rb"); + SOUND_FILE = Platform__iso_fopen(bs->filename_of_sound_file, "rb"); if (SOUND_FILE) { char *real_format = "AIFF"; rv = SoundFiles__get_AIFF_duration(SOUND_FILE, &duration, &pBitsPerSecond, @@ -127290,7 +127660,7 @@ void PL__Sounds__index_all(void) { fsize = (unsigned int) (ftell(SOUND_FILE)); fclose(SOUND_FILE); if (rv == 0) { - SOUND_FILE = Platform__iso_fopen(image_filename, "rb"); + SOUND_FILE = Platform__iso_fopen(bs->filename_of_sound_file, "rb"); if (SOUND_FILE) { real_format = "Ogg Vorbis"; preview = FALSE; @@ -127300,7 +127670,7 @@ void PL__Sounds__index_all(void) { } } if (rv == 0) { - SOUND_FILE = Platform__iso_fopen(image_filename, "rb"); + SOUND_FILE = Platform__iso_fopen(bs->filename_of_sound_file, "rb"); if (SOUND_FILE) { waveform_style = FALSE; real_format = "MIDI"; @@ -127340,25 +127710,27 @@ void PL__Sounds__index_all(void) { } } } else { - sprintf(line2, "<i>Missing from the .materials%cSounds folder</i><br>\n", - FOLDER_SEPARATOR); + sprintf(line2, "<i>Missing from the Sounds folder</i><br>\n"); } HTML__first_html_column(ifl, THUMBNAIL_WIDTH+10); if (rv == 0) INDEX("<img border=\"0\" src=\"inform:/doc_images/image_problem.png\"> "); else { - if (preview) - INDEX("<embed src=\"file://%s\" width=\"%d\" height=\"64\" " - "autostart=\"false\" volume=\"50%%\" mastersound></embed> ", - image_filename, THUMBNAIL_WIDTH); - else + if (preview) { + char sound_filename[MAX_FILENAME_LENGTH]; + Filenames__to_string(sound_filename, bs->filename_of_sound_file); + INDEX("<embed src=\"file://%s\" width=\"%d\" height=\"64\" " + "autostart=\"false\" volume=\"50%%\" mastersound></embed> ", + sound_filename, THUMBNAIL_WIDTH); + } else INDEX("<img border=\"0\" src=\"inform:/doc_images/sound_okay.png\"> "); } HTML__next_html_column(ifl, 0); Text__print_raw_text_to_stream(bs->word_ref1, bs->word_ref2, ifl); Index__link(bs->word_ref1); - INDEX("<br>\n%sFilename: \"%s\" - resource number %d", - line2, bs->path_to_sound, bs->sound_number); + char rel[MAX_FILENAME_LENGTH]; + Filenames__to_string_relative(rel, bs->filename_of_sound_file, pathname_of_area[MATERIALS_FS_AREA]); + INDEX("<br>\n%sFilename: \"%s\" - resource number %d", line2, rel, bs->sound_number); HTML__end_html_row(ifl); } HTML__end_html_table(ifl); @@ -127710,175 +128082,120 @@ void PL__Files__index_all(void) { INDEX("<p>"); } -#line 31 "inform7/Chapter 38/Main Routine.w" +#line 12 "inform7/Chapter 38/Main Routine.w" +#ifndef SUPPRESS_MAIN int main(int argc, char *argv[]) { + return Main__core_inform_main(argc, argv); +} +#endif + +#line 29 "inform7/Chapter 38/Main Routine.w" +int Main__core_inform_main(int argc, char *argv[]) { + int report_clock_time = FALSE; clock_t start = clock(); - int i, a = 1, source_specified = FALSE, report_clock_time = FALSE; - char *val; - - STREAM_WRITE(STDOUT, "%s build %s has started.\n", NI_VERSION, NI_BUILD); - STREAM_FLUSH(STDOUT); - { -#line 191 "inform7/Chapter 38/Main Routine.w" +#line 54 "inform7/Chapter 38/Main Routine.w" time_t right_now = time(NULL); long long int rni = (long long int) right_now; if (rni < 0) right_now = (time_t) 0; the_present = localtime(&right_now); } -#line 40 "inform7/Chapter 38/Main Routine.w" +#line 33 "inform7/Chapter 38/Main Routine.w" +; + +{ +#line 62 "inform7/Chapter 38/Main Routine.w" + STREAM_WRITE(STDOUT, "%s build %s has started.\n", NI_VERSION, NI_BUILD); + STREAM_FLUSH(STDOUT); + Memory__start(); + Pathnames__start(); + +} +#line 34 "inform7/Chapter 38/Main Routine.w" ; - bundle_name = NULL; - crash_on_internal_errors = FALSE; - crash_on_all_errors = FALSE; + if (argc <= 1) return 0; - story_filename_extension = NULL; - Filenames__make_pathname_of_extensions(); - - if (argc == a) return 0; - - while (a < argc) { + +{ +#line 72 "inform7/Chapter 38/Main Routine.w" + for (int a = 1; a < argc; a++) { char *option = argv[a]; - if ((option[0] == '-') && (option[1] == '-')) option++; - if (strcmp("-log", option) == 0) { - /* Non-functional for now */ - a++; continue; - } + char *val; + if ((val = Main__cli_pair("-format", option)) != 0) story_filename_extension = val; + else if ((val = Main__cli_pair("-log", option)) != 0) Log__set_aspect_from_command_line(val); - if (Platform__strlen(option) > 5) { - if ((option[0] == '-') && (option[1] == 'l') && (option[2] == 'o') && - (option[3] == 'g') && (option[4] == '=')) { - Log__set_aspect_from_command_line(option+5); - a++; continue; - } - } + else if (strcmp("-census", option) == 0) census_mode = TRUE; + else if (strcmp("-clock", option) == 0) report_clock_time = TRUE; + else if (strcmp("-gdb", option) == 0) crash_on_internal_errors = TRUE; + else if (strcmp("-gdball", option) == 0) crash_on_all_errors = TRUE; + else if (strcmp("-noindex", option) == 0) do_not_generate_index = TRUE; + else if (strcmp("-noprogress", option) == 0) show_progress_indicator = FALSE; + else if (strcmp("-release", option) == 0) this_is_a_release_compile = TRUE; + else if (strcmp("-rng", option) == 0) rng_seed_at_start_of_play = -16339; + else if (strcmp("-scoring", option) == 0) default_scoring_setting = TRUE; + else if (strcmp("-sigils", option) == 0) echo_problem_message_sigils = TRUE; - if (strcmp("-rng", option) == 0) { - fix_rng_at_start_of_play = TRUE; - rng_seed_at_start_of_play = -16339; - a++; continue; - } - - if ((val = Main__cli_pair("-extension", option)) != 0) { - story_filename_extension = val; - a++; continue; - } - - if (strcmp("-release", option) == 0) { - this_is_a_release_compile = TRUE; - a++; continue; - } - - if (strcmp("-noprogress", option) == 0) { - show_progress_indicator = FALSE; - a++; continue; - } - - if (strcmp("-census", option) == 0) { - census_mode = TRUE; - a++; continue; - } - - if (strcmp("-clock", option) == 0) { - report_clock_time = TRUE; - a++; continue; - } - - if (strcmp("-sigils", option) == 0) { - echo_problem_message_sigils = TRUE; - a++; continue; - } - - if (strcmp("-gdb", option) == 0) { - crash_on_internal_errors = TRUE; - a++; continue; - } - - if (strcmp("-gdball", option) == 0) { - crash_on_all_errors = TRUE; - a++; continue; - } - - if (strcmp("-noindex", option) == 0) { - do_not_generate_index = TRUE; - a++; continue; - } - - if (strcmp("-package", option) == 0) { - source_specified = TRUE; - Platform__truncated_locale_arg(argv[a+1], - pathname_of_bundle, MAX_FILENAME_LENGTH); - bundle_name = pathname_of_bundle; - a = a+2; continue; - } - - if (strcmp("-extensions", option) == 0) { - Platform__truncated_locale_arg(argv[a+1], - pathname_of_extensions, MAX_FILENAME_LENGTH); - a = a+2; continue; - } - - if (strcmp("-rules", option) == 0) { - Platform__truncated_locale_arg(argv[a+1], - pathname_of_built_in_extensions, MAX_FILENAME_LENGTH); - a = a+2; continue; - } - - if (strcmp("-scoring", option) == 0) { - default_scoring_setting = TRUE; - a++; continue; - } - - if (source_specified) { + else if ((option[0] == '-') && (a+1 < argc) && + (Locations__command_line_setting(option, argv[a+1]))) a++; + else if (!((option[0] != '-') && + (Locations__command_line_setting(NULL, option)))) { fprintf(stderr, "Unknown: %s\n", option); Problems__Fatal__issue("Unknown parameter at the command line"); - } else { - source_specified = TRUE; - source_text_file = argv[a]; a++; } } - Filenames__make_pathname_of_materials_folder(); - +} +#line 38 "inform7/Chapter 38/Main Routine.w" +; + +{ +#line 103 "inform7/Chapter 38/Main Routine.w" VirtualMachines__set_identifier(story_filename_extension); - - if ((census_mode == FALSE) && (source_specified == FALSE)) - Problems__Fatal__issue("Except in census mode, source text must be supplied"); - if ((census_mode) && (source_specified)) - Problems__Fatal__issue("In census mode, no source text may be supplied"); - + if (Locations__set_defaults(census_mode) == FALSE) + Problems__Fatal__issue("Unable to create folders in local file system"); Log__open(); - LOG("Inform called as: "); - for (i=0; i<argc; i++) LOG("%s ", argv[i]); + LOG("Inform called as:"); + for (int i=0; i<argc; i++) LOG(" %s", argv[i]); LOG("\n"); +} +#line 39 "inform7/Chapter 38/Main Routine.w" +; + TemplateFiles__interpret(NULL, NULL, "Main.i6t", -1); + + clock_t end = clock(); + int cpu_time_used = ((int) (end - start)) / (CLOCKS_PER_SEC/100); + + +{ +#line 114 "inform7/Chapter 38/Main Routine.w" Problems__write_reports(FALSE); Memory__free_memory(); LOG("Total of %d files written as streams.\n", total_file_writes); - clock_t end = clock(); - int cpu_time_used = ((int) (end - start)) / (CLOCKS_PER_SEC/100); LOG("CPU time: %d centiseconds\n", cpu_time_used); Log__close(); - if (report_clock_time) { - STREAM_WRITE(STDOUT, "%s has finished: %d centiseconds used.\n", - NI_VERSION, cpu_time_used); - } else { - STREAM_WRITE(STDOUT, "%s has finished.\n", NI_VERSION); - } - STREAM_FLUSH(STDOUT); + + STREAM_WRITE(STDOUT, "%s has finished", NI_VERSION); + if (report_clock_time) + STREAM_WRITE(STDOUT, ": %d centiseconds used", cpu_time_used); + STREAM_WRITE(STDOUT, ".\n"); + +} +#line 46 "inform7/Chapter 38/Main Routine.w" +; if (problem_count > 0) return 1; return 0; } -#line 199 "inform7/Chapter 38/Main Routine.w" +#line 130 "inform7/Chapter 38/Main Routine.w" char *Main__cli_pair(char *wanted, char *got) { int i; if (Platform__strlen(wanted)+1 >= Platform__strlen(got)) return NULL; @@ -128087,38 +128404,18 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N { #line 253 "inform7/Chapter 38/I6 Template Interpreter.w" - char the_filename[MAX_FILENAME_LENGTH]; - -{ -#line 272 "inform7/Chapter 38/I6 Template Interpreter.w" - sprintf(the_filename, "%s%cI6T%c%s", - materials_folder, - FOLDER_SEPARATOR, FOLDER_SEPARATOR, segment_name); - Input_File = Platform__iso_fopen(the_filename, "r"); - -} -#line 254 "inform7/Chapter 38/I6 Template Interpreter.w" -; + Input_File = NULL; + for (int area=0; area<NO_FS_AREAS; area++) + if (Input_File == NULL) + Input_File = Platform__iso_fopen( + Filenames__in_folder(pathname_of_i6t_files[area], segment_name), "r"); if (Input_File == NULL) { - -{ -#line 280 "inform7/Chapter 38/I6 Template Interpreter.w" - sprintf(the_filename, "%s%cReserved%c%s", - pathname_of_built_in_extensions, - FOLDER_SEPARATOR, FOLDER_SEPARATOR, segment_name); - Input_File = Platform__iso_fopen(the_filename, "r"); - -} -#line 256 "inform7/Chapter 38/I6 Template Interpreter.w" -; - if (Input_File == NULL) { - if (strcmp(segment_name, "Main.i6t") == 0) - Problems__Fatal__issue2("Error: can't open input file", segment_name); - STREAM_WRITE(STDERR, "inform: Unable to open segment <%s>\n", segment_name); - Problems__Issue__unlocated_problem(_P_(BelievedImpossible), /* or anyway not usefully testable */ - "I couldn't open a requested I6T segment: see the console " - "output for details."); - } + if (strcmp(segment_name, "Main.i6t") == 0) + Problems__Fatal__issue_t("Error: can't open input file", segment_name); + STREAM_WRITE(STDERR, "inform: Unable to open segment <%s>\n", segment_name); + Problems__Issue__unlocated_problem(_P_(BelievedImpossible), /* or anyway not usefully testable */ + "I couldn't open a requested I6T segment: see the console " + "output for details."); } } @@ -128130,7 +128427,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N do { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -128150,12 +128447,12 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N int inweb_syntax = -1; { -#line 308 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 290 "inform7/Chapter 38/I6 Template Interpreter.w" int i = 0, committed = FALSE, unacceptable_character = FALSE; while (i<MAX_I6T_LINE_LENGTH) { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -128163,7 +128460,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N col++; if ((cr == 10) || (cr == 13)) col = 0; } -#line 310 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 292 "inform7/Chapter 38/I6 Template Interpreter.w" ; if ((committed == FALSE) && ((cr == 10) || (cr == 13) || (cr == ' '))) { I6T_buffer[i] = 0; @@ -128210,7 +128507,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ; { -#line 356 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 338 "inform7/Chapter 38/I6 Template Interpreter.w" switch (inweb_syntax) { case INWEB_PARAGRAPH_SYNTAX: { int i; @@ -128253,7 +128550,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if ((cr == 10) || (cr == 13)) continue; /* skip blank lines here */ { -#line 394 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 376 "inform7/Chapter 38/I6 Template Interpreter.w" int i; strcpy(I6T_buffer, default_command); command = I6T_buffer; @@ -128263,7 +128560,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N while (i<MAX_I6T_LINE_LENGTH) { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -128271,7 +128568,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N col++; if ((cr == 10) || (cr == 13)) col = 0; } -#line 401 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 383 "inform7/Chapter 38/I6 Template Interpreter.w" ; if ((cr == 10) || (cr == 13)) break; I6T_buffer[i++] = (char) cr; @@ -128288,14 +128585,14 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (strcmp(argument, "{-endlines}") == 0) default_command[0] = 0; else { -#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 450 "inform7/Chapter 38/I6 Template Interpreter.w" { -#line 504 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 486 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "open-file") == 0) { if (OUT) internal_error("output file already open"); - if (STREAM_OPEN_TO_FILE(inform6_file, Filenames__build(I6_OUTPUT_LEAFNAME), ISO_ENC) == FALSE) - Problems__Fatal__issue("Can't open output file"); + if (STREAM_OPEN_TO_FILE(inform6_file, filename_of_compiled_i6_code, ISO_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open output file", filename_of_compiled_i6_code); OUT = inform6_file; continue; } @@ -128307,18 +128604,18 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 450 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 523 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 505 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "lines") == 0) { Extensions__IDs__truncated_strcpy(default_command, argument, MAX_I6T_COMMAND_LENGTH); continue; } } -#line 469 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 451 "inform7/Chapter 38/I6 Template Interpreter.w" ; if (active == FALSE) continue; @@ -128329,7 +128626,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N { -#line 535 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 517 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "open-index") == 0) { indexing = TRUE; continue; } if (strcmp(command, "close-index") == 0) { indexing = FALSE; continue; } @@ -128389,11 +128686,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 477 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 459 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 601 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 583 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "log") == 0) { Log__new_stage_of_Informs_run(argument); continue; } @@ -128410,27 +128707,27 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 478 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 460 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 622 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 604 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "counter") == 0) { if (OUT == NULL) continue; WRITE("%d", JumpLabels__read_counter(argument, NOT_APPLICABLE)); continue; } } -#line 479 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 461 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 635 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 617 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "value") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128439,7 +128736,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 637 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 619 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_VALUE(NUMBER_CREATED(action_name)); ALLOW_VALUE(NUMBER_CREATED(binary_predicate)); @@ -128462,11 +128759,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 480 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 462 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 670 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 652 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "read-assertions") == 0) { if (strcmp(argument, "1") == 0) Assertions__Traverse__traverse(1); if (strcmp(argument, "2") == 0) Assertions__Traverse__traverse(2); @@ -128475,15 +128772,15 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 481 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 463 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 696 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 678 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "callv") == 0) { { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128492,7 +128789,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 697 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 679 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_CALLV(Calculus__Deferrals__allow_no_further_deferrals); ALLOW_CALLV(Chronology__allow_no_further_past_tenses); @@ -128526,9 +128823,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ALLOW_CALLV(Extensions__Inclusion__traverse); ALLOW_CALLV(Index__complete); ALLOW_CALLV(Index__DocReferences__log_statistics); - ALLOW_CALLV(Memory__free_memory); ALLOW_CALLV(Memory__log_statistics); - ALLOW_CALLV(Memory__start); ALLOW_CALLV(ParseTree__plant_parse_tree); ALLOW_CALLV(ParseTree__Verification__verify); ALLOW_CALLV(Sentences__break_source); @@ -128558,7 +128853,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ALLOW_CALLV(Properties__Measurement__validate_definitions); ALLOW_CALLV(BinaryPredicates__make_built_in_further); ALLOW_CALLV(BinaryPredicates__make_built_in); - ALLOW_CALLV(Semantics__Nouns__LiteralPatterns__define_named_phrases); + ALLOW_CALLV(LiteralPatterns__define_named_phrases); ALLOW_CALLV(Quantifiers__make_built_in); ALLOW_CALLV(Verbs__log_all); ALLOW_CALLV(Verbs__stock); @@ -128582,16 +128877,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 482 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 464 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 793 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 773 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "call") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128600,7 +128895,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 795 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 775 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_CALL(Calculus__Propositions__Deferred__compile_remaining_deferred); ALLOW_CALL(Activities__compile_activity_constants); @@ -128660,16 +128955,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 483 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 465 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 870 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 850 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "array") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128678,7 +128973,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 872 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 852 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_ARRAY(PL__Actions__ActionCoding); ALLOW_ARRAY(PL__Actions__ActionData); @@ -128703,16 +128998,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 484 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 466 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 903 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 883 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "routine") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128721,7 +129016,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 905 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 885 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_ROUTINE(Properties__ObjectImplementation__CreatePropertyOffsets); ALLOW_ROUTINE(Kinds__RunTime__I7_Kind_Name); @@ -128739,11 +129034,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 485 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 467 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 927 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 907 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "testing-command") == 0) { if (OUT == NULL) continue; PL__Parsing__Verbs__reserve(argument); @@ -128752,7 +129047,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 486 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" ; LOG("command: <%s> argument: <%s>\n", command, argument); Problems__quote_text(1, command); @@ -128771,7 +129066,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (cr == '{') { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -128784,12 +129079,12 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (cr == '-') { { -#line 415 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 397 "inform7/Chapter 38/I6 Template Interpreter.w" int i=0; while (i<MAX_I6T_LINE_LENGTH) { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -128797,7 +129092,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N col++; if ((cr == 10) || (cr == 13)) col = 0; } -#line 417 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 399 "inform7/Chapter 38/I6 Template Interpreter.w" ; if ((cr == '}') || (cr == EOF)) break; I6T_buffer[i++] = (char) cr; @@ -128817,14 +129112,14 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (command[0] == '!') continue; { -#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 450 "inform7/Chapter 38/I6 Template Interpreter.w" { -#line 504 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 486 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "open-file") == 0) { if (OUT) internal_error("output file already open"); - if (STREAM_OPEN_TO_FILE(inform6_file, Filenames__build(I6_OUTPUT_LEAFNAME), ISO_ENC) == FALSE) - Problems__Fatal__issue("Can't open output file"); + if (STREAM_OPEN_TO_FILE(inform6_file, filename_of_compiled_i6_code, ISO_ENC) == FALSE) + Problems__Fatal__filename_related("Can't open output file", filename_of_compiled_i6_code); OUT = inform6_file; continue; } @@ -128836,18 +129131,18 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 450 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 523 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 505 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "lines") == 0) { Extensions__IDs__truncated_strcpy(default_command, argument, MAX_I6T_COMMAND_LENGTH); continue; } } -#line 469 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 451 "inform7/Chapter 38/I6 Template Interpreter.w" ; if (active == FALSE) continue; @@ -128858,7 +129153,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N { -#line 535 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 517 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "open-index") == 0) { indexing = TRUE; continue; } if (strcmp(command, "close-index") == 0) { indexing = FALSE; continue; } @@ -128918,11 +129213,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 477 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 459 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 601 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 583 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "log") == 0) { Log__new_stage_of_Informs_run(argument); continue; } @@ -128939,27 +129234,27 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 478 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 460 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 622 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 604 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "counter") == 0) { if (OUT == NULL) continue; WRITE("%d", JumpLabels__read_counter(argument, NOT_APPLICABLE)); continue; } } -#line 479 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 461 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 635 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 617 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "value") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -128968,7 +129263,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 637 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 619 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_VALUE(NUMBER_CREATED(action_name)); ALLOW_VALUE(NUMBER_CREATED(binary_predicate)); @@ -128991,11 +129286,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 480 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 462 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 670 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 652 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "read-assertions") == 0) { if (strcmp(argument, "1") == 0) Assertions__Traverse__traverse(1); if (strcmp(argument, "2") == 0) Assertions__Traverse__traverse(2); @@ -129004,15 +129299,15 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 481 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 463 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 696 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 678 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "callv") == 0) { { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -129021,7 +129316,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 697 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 679 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_CALLV(Calculus__Deferrals__allow_no_further_deferrals); ALLOW_CALLV(Chronology__allow_no_further_past_tenses); @@ -129055,9 +129350,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ALLOW_CALLV(Extensions__Inclusion__traverse); ALLOW_CALLV(Index__complete); ALLOW_CALLV(Index__DocReferences__log_statistics); - ALLOW_CALLV(Memory__free_memory); ALLOW_CALLV(Memory__log_statistics); - ALLOW_CALLV(Memory__start); ALLOW_CALLV(ParseTree__plant_parse_tree); ALLOW_CALLV(ParseTree__Verification__verify); ALLOW_CALLV(Sentences__break_source); @@ -129087,7 +129380,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ALLOW_CALLV(Properties__Measurement__validate_definitions); ALLOW_CALLV(BinaryPredicates__make_built_in_further); ALLOW_CALLV(BinaryPredicates__make_built_in); - ALLOW_CALLV(Semantics__Nouns__LiteralPatterns__define_named_phrases); + ALLOW_CALLV(LiteralPatterns__define_named_phrases); ALLOW_CALLV(Quantifiers__make_built_in); ALLOW_CALLV(Verbs__log_all); ALLOW_CALLV(Verbs__stock); @@ -129111,16 +129404,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 482 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 464 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 793 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 773 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "call") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -129129,7 +129422,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 795 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 775 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_CALL(Calculus__Propositions__Deferred__compile_remaining_deferred); ALLOW_CALL(Activities__compile_activity_constants); @@ -129189,16 +129482,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 483 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 465 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 870 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 850 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "array") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -129207,7 +129500,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 872 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 852 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_ARRAY(PL__Actions__ActionCoding); ALLOW_ARRAY(PL__Actions__ActionData); @@ -129232,16 +129525,16 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 484 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 466 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 903 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 883 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "routine") == 0) { if (OUT == NULL) continue; { -#line 856 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 836 "inform7/Chapter 38/I6 Template Interpreter.w" int i; for (i=0; argument[i]; i++) if ((argument[i] == ':') && (argument[i+1] == ':')) { @@ -129250,7 +129543,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 905 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 885 "inform7/Chapter 38/I6 Template Interpreter.w" ; ALLOW_ROUTINE(Properties__ObjectImplementation__CreatePropertyOffsets); ALLOW_ROUTINE(Kinds__RunTime__I7_Kind_Name); @@ -129268,11 +129561,11 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 485 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 467 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 927 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 907 "inform7/Chapter 38/I6 Template Interpreter.w" if (strcmp(command, "testing-command") == 0) { if (OUT == NULL) continue; PL__Parsing__Verbs__reserve(argument); @@ -129281,7 +129574,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } } -#line 486 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 468 "inform7/Chapter 38/I6 Template Interpreter.w" ; LOG("command: <%s> argument: <%s>\n", command, argument); Problems__quote_text(1, command); @@ -129299,7 +129592,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N } else if ((cr == 'N') && (N_escape >= 0)) { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -129323,7 +129616,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (cr == '(') { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -129336,12 +129629,12 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (cr == '+') { { -#line 434 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 416 "inform7/Chapter 38/I6 Template Interpreter.w" int i=0; while (i<MAX_I6T_LINE_LENGTH) { { -#line 293 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 275 "inform7/Chapter 38/I6 Template Interpreter.w" if (Input_File) cr = fgetc(Input_File); else if (sf) { cr = sf[sfp]; if (cr == 0) cr = EOF; else sfp++; @@ -129349,7 +129642,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N col++; if ((cr == 10) || (cr == 13)) col = 0; } -#line 436 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 418 "inform7/Chapter 38/I6 Template Interpreter.w" ; if (cr == EOF) { I6T_buffer[i] = 0; break; } if ((cr == ')') && (i>0) && (I6T_buffer[i-1] == '+')) { I6T_buffer[i-1] = 0; break; } @@ -129361,7 +129654,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N ; { -#line 445 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 427 "inform7/Chapter 38/I6 Template Interpreter.w" TEMPORARY_STREAM; TemplateFiles__compile_I7_from_I6(TEMP, I6T_buffer); STREAM_COPY(OUT, TEMP); @@ -129388,7 +129681,7 @@ void TemplateFiles__interpret(OUTPUT_STREAM, char *sf, char *segment_name, int N if (segment_name) TemplateFiles__I6T_file_intervene(OUT, 1, segment_name, NULL); } -#line 942 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 922 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__compile_I7_from_I6(OUTPUT_STREAM, char *p) { SourceFiles__feed_into_lexer(p, FALSE, NULL); int lw1 = lexer_feed_w1, lw2 = lexer_feed_w2; @@ -129433,7 +129726,7 @@ void TemplateFiles__compile_I7_from_I6(OUTPUT_STREAM, char *p) { END_COMPILATION_MODE; } -#line 991 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 971 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__new_intervention(int stage, char *segment, char *part, char *i6, char *seg) { I6T_intervention *i6ti = NULL; if (stage == 0) { @@ -129458,7 +129751,7 @@ void TemplateFiles__new_intervention(int stage, char *segment, char *part, char LOGIF(TEMPLATE_READING, "New stage %d Segment %s Part %s\n", stage, segment, (part)?part:"<none>"); } -#line 1019 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 999 "inform7/Chapter 38/I6 Template Interpreter.w" int TemplateFiles__I6T_file_intervene(OUTPUT_STREAM, int stage, char *segment, char *part) { I6T_intervention *i6ti; int rv = FALSE; @@ -129481,7 +129774,7 @@ int TemplateFiles__I6T_file_intervene(OUTPUT_STREAM, int stage, char *segment, c return rv; } -#line 1046 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1026 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__report_unacted_upon_interventions(void) { I6T_intervention *i6ti; LOOP_OVER(i6ti, I6T_intervention) { @@ -129507,16 +129800,16 @@ void TemplateFiles__report_unacted_upon_interventions(void) { } } -#line 1077 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1057 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__compile_build_number(OUTPUT_STREAM) { WRITE("Constant NI_BUILD_COUNT \"%s\";\n", NI_BUILD); } -#line 1087 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1067 "inform7/Chapter 38/I6 Template Interpreter.w" void TemplateFiles__register_sentence_handlers(void) { { -#line 1096 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1076 "inform7/Chapter 38/I6 Template Interpreter.w" REGISTER_SENTENCE_HANDLER(TRACE_SH); REGISTER_SENTENCE_HANDLER(BEGINHERE_SH); REGISTER_SENTENCE_HANDLER(ENDHERE_SH); @@ -129530,11 +129823,11 @@ void TemplateFiles__register_sentence_handlers(void) { REGISTER_SENTENCE_HANDLER(SENTENCE_SH); } -#line 1088 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1068 "inform7/Chapter 38/I6 Template Interpreter.w" ; { -#line 1112 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1092 "inform7/Chapter 38/I6 Template Interpreter.w" REGISTER_SENTENCE_HANDLER(ASSERT_SH); REGISTER_SENTENCE_HANDLER(HAS_SH); REGISTER_SENTENCE_HANDLER(CANBE_SH); @@ -129561,7 +129854,7 @@ void TemplateFiles__register_sentence_handlers(void) { REGISTER_SENTENCE_HANDLER(NEW_ADJ_SH); } -#line 1089 "inform7/Chapter 38/I6 Template Interpreter.w" +#line 1069 "inform7/Chapter 38/I6 Template Interpreter.w" ; } @@ -129928,9 +130221,9 @@ int Plugins__Call__annotate_in_World_index(instance *O) { } void register_tangled_nonterminals(void) { -#line 421 "inform7/Chapter 2/Debugging Log.w" +#line 419 "inform7/Chapter 2/Debugging Log.w" REGISTER_NONTERMINAL("<include-in-debugging-sentence-subject>", include_in_debugging_sentence_subject_NTM); -#line 425 "inform7/Chapter 2/Debugging Log.w" +#line 423 "inform7/Chapter 2/Debugging Log.w" REGISTER_NONTERMINAL("<debugging-log-request>", debugging_log_request_NTM); #line 69 "inform7/Chapter 4/HTML Documentation.w" REGISTER_NONTERMINAL("<extension-documentation-heading>", extension_documentation_heading_NTM); @@ -129946,10 +130239,10 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<documentation-symbol>", documentation_symbol_NTM); #line 618 "inform7/Chapter 7/Tries and Inflections.w" REGISTER_NONTERMINAL("<small-trie-test>", small_trie_test_NTM); -#line 286 "inform7/Chapter 7/Natural Languages.w" +#line 273 "inform7/Chapter 7/Natural Languages.w" INTERNAL_NONTERMINAL("<natural-language>", natural_language_NTM, 1, 1000000000); natural_language_NTM->voracious = 0; -#line 471 "inform7/Chapter 7/Preform.w" +#line 467 "inform7/Chapter 7/Preform.w" INTERNAL_NONTERMINAL("<preform-nonterminal>", preform_nonterminal_NTM, 1, 1); preform_nonterminal_NTM->voracious = 0; #line 74 "inform7/Chapter 7/English Inflections.w" @@ -130163,41 +130456,41 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<turn-repetitions>", turn_repetitions_NTM); #line 198 "inform7/Chapter 8/Time Periods.w" REGISTER_NONTERMINAL("<rep-number>", rep_number_NTM); -#line 61 "inform7/Chapter 9/Adjectives.w" +#line 63 "inform7/Chapter 9/Adjectives.w" INTERNAL_NONTERMINAL("<adjective-name>", adjective_name_NTM, 1, 1000000000); adjective_name_NTM->voracious = 0; #line 1023 "inform7/Chapter 9/Adjective Meanings.w" INTERNAL_NONTERMINAL("<adaptive-adjective>", adaptive_adjective_NTM, 1, 1000000000); adaptive_adjective_NTM->voracious = 0; -#line 1490 "inform7/Chapter 10/Literal Patterns.w" +#line 1492 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<specifies-sentence-subject>", specifies_sentence_subject_NTM); -#line 1496 "inform7/Chapter 10/Literal Patterns.w" +#line 1498 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-group-list>", literal_pattern_group_list_NTM); -#line 1500 "inform7/Chapter 10/Literal Patterns.w" +#line 1502 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-group-tail>", literal_pattern_group_tail_NTM); -#line 1504 "inform7/Chapter 10/Literal Patterns.w" +#line 1506 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-group>", literal_pattern_group_NTM); -#line 1560 "inform7/Chapter 10/Literal Patterns.w" +#line 1562 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<specifies-sentence-object>", specifies_sentence_object_NTM); -#line 1564 "inform7/Chapter 10/Literal Patterns.w" +#line 1566 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<kind-specified>", kind_specified_NTM); -#line 1568 "inform7/Chapter 10/Literal Patterns.w" +#line 1570 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-specification-tail>", literal_pattern_specification_tail_NTM); -#line 1575 "inform7/Chapter 10/Literal Patterns.w" +#line 1577 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<scaling-instruction>", scaling_instruction_NTM); -#line 1601 "inform7/Chapter 10/Literal Patterns.w" +#line 1603 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part-list>", literal_pattern_part_list_NTM); -#line 1605 "inform7/Chapter 10/Literal Patterns.w" +#line 1607 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part-tail>", literal_pattern_part_tail_NTM); -#line 1609 "inform7/Chapter 10/Literal Patterns.w" +#line 1611 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part>", literal_pattern_part_NTM); -#line 1613 "inform7/Chapter 10/Literal Patterns.w" +#line 1615 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part-option-list>", literal_pattern_part_option_list_NTM); -#line 1617 "inform7/Chapter 10/Literal Patterns.w" +#line 1619 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part-option-tail>", literal_pattern_part_option_tail_NTM); -#line 1621 "inform7/Chapter 10/Literal Patterns.w" +#line 1623 "inform7/Chapter 10/Literal Patterns.w" REGISTER_NONTERMINAL("<literal-pattern-part-option>", literal_pattern_part_option_NTM); -#line 1905 "inform7/Chapter 10/Literal Patterns.w" +#line 1907 "inform7/Chapter 10/Literal Patterns.w" INTERNAL_NONTERMINAL("<literal-pattern-group-name>", literal_pattern_group_name_NTM, 1, 1000000000); literal_pattern_group_name_NTM->voracious = 0; #line 71 "inform7/Chapter 10/Times of Day.w" @@ -130225,7 +130518,7 @@ void register_tangled_nonterminals(void) { #line 84 "inform7/Chapter 10/Unicode Translations.w" INTERNAL_NONTERMINAL("<unicode-character-name>", unicode_character_name_NTM, 1, 1000000000); unicode_character_name_NTM->voracious = 0; -#line 335 "inform7/Chapter 10/Nametags.w" +#line 338 "inform7/Chapter 10/Nametags.w" REGISTER_NONTERMINAL("<translates-into-nl-sentence-subject>", translates_into_nl_sentence_subject_NTM); #line 349 "inform7/Chapter 10/Instances.w" INTERNAL_NONTERMINAL("<instance-of-object>", instance_of_object_NTM, 1, 1000000000); @@ -130240,7 +130533,7 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<notable-variables>", notable_variables_NTM); #line 629 "inform7/Chapter 10/Nonlocal Variables.w" REGISTER_NONTERMINAL("<value-understood-variable-name>", value_understood_variable_name_NTM); -#line 700 "inform7/Chapter 11/Binary Predicates.w" +#line 694 "inform7/Chapter 11/Binary Predicates.w" INTERNAL_NONTERMINAL("<relation-name>", relation_name_NTM, 1, 1000000000); relation_name_NTM->voracious = 0; #line 66 "inform7/Chapter 11/Relations.w" @@ -130526,9 +130819,9 @@ void register_tangled_nonterminals(void) { #line 103 "inform7/Chapter 14/Including Extensions.w" INTERNAL_NONTERMINAL("<extension-version>", extension_version_NTM, 1, 1); extension_version_NTM->voracious = 0; -#line 251 "inform7/Chapter 14/Including Extensions.w" +#line 238 "inform7/Chapter 14/Including Extensions.w" REGISTER_NONTERMINAL("<extension-body>", extension_body_NTM); -#line 367 "inform7/Chapter 14/Including Extensions.w" +#line 354 "inform7/Chapter 14/Including Extensions.w" REGISTER_NONTERMINAL("<begins-here-sentence-subject>", begins_here_sentence_subject_NTM); #line 301 "inform7/Chapter 15/Traverse for Assertions.w" REGISTER_NONTERMINAL("<no-verb-diagnosis>", no_verb_diagnosis_NTM); @@ -130554,15 +130847,15 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<unfortunate-name>", unfortunate_name_NTM); #line 1690 "inform7/Chapter 15/Make Assertions.w" REGISTER_NONTERMINAL("<something-loose-diagnosis>", something_loose_diagnosis_NTM); -#line 33 "inform7/Chapter 15/Property Declarations.w" +#line 31 "inform7/Chapter 15/Property Declarations.w" REGISTER_NONTERMINAL("<forbidden-property-owners>", forbidden_property_owners_NTM); -#line 131 "inform7/Chapter 15/Property Declarations.w" +#line 129 "inform7/Chapter 15/Property Declarations.w" REGISTER_NONTERMINAL("<can-be-sentence-object>", can_be_sentence_object_NTM); -#line 137 "inform7/Chapter 15/Property Declarations.w" +#line 135 "inform7/Chapter 15/Property Declarations.w" REGISTER_NONTERMINAL("<condition-name>", condition_name_NTM); -#line 141 "inform7/Chapter 15/Property Declarations.w" +#line 139 "inform7/Chapter 15/Property Declarations.w" REGISTER_NONTERMINAL("<condition-name-inner>", condition_name_inner_NTM); -#line 146 "inform7/Chapter 15/Property Declarations.w" +#line 144 "inform7/Chapter 15/Property Declarations.w" REGISTER_NONTERMINAL("<condition-name-innermost>", condition_name_innermost_NTM); #line 26 "inform7/Chapter 16/Architecture of the S-Parser.w" INTERNAL_NONTERMINAL("<s-plain-text>", s_plain_text_NTM, 1, 1000000000); @@ -130812,7 +131105,7 @@ void register_tangled_nonterminals(void) { s_text_substitution_NTM->voracious = 0; #line 356 "inform7/Chapter 16/Conditions and Phrases.w" REGISTER_NONTERMINAL("<s-unpacked-text-with-substitutions>", s_unpacked_text_with_substitutions_NTM); -#line 631 "inform7/Chapter 19/Kinds.w" +#line 629 "inform7/Chapter 19/Kinds.w" REGISTER_NONTERMINAL("<notable-linguistic-kinds>", notable_linguistic_kinds_NTM); #line 41 "inform7/Chapter 19/Describing Kinds.w" INTERNAL_NONTERMINAL("<if-parsing-phrase-tokens>", if_parsing_phrase_tokens_NTM, 0, 0); @@ -130921,25 +131214,25 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<condition-problem-part-tail>", condition_problem_part_tail_NTM); #line 3472 "inform7/Chapter 20/Type Checking.w" REGISTER_NONTERMINAL("<condition-problem-part>", condition_problem_part_NTM); -#line 230 "inform7/Chapter 21/Properties.w" +#line 227 "inform7/Chapter 21/Properties.w" REGISTER_NONTERMINAL("<notable-properties>", notable_properties_NTM); -#line 271 "inform7/Chapter 21/Properties.w" +#line 268 "inform7/Chapter 21/Properties.w" REGISTER_NONTERMINAL("<property-name-construction>", property_name_construction_NTM); -#line 313 "inform7/Chapter 21/Properties.w" +#line 310 "inform7/Chapter 21/Properties.w" INTERNAL_NONTERMINAL("<property-name>", property_name_NTM, 1, 1000000000); property_name_NTM->voracious = 0; -#line 329 "inform7/Chapter 21/Properties.w" +#line 326 "inform7/Chapter 21/Properties.w" INTERNAL_NONTERMINAL("<either-or-property-name>", either_or_property_name_NTM, 1, 1000000000); either_or_property_name_NTM->voracious = 0; -#line 343 "inform7/Chapter 21/Properties.w" +#line 340 "inform7/Chapter 21/Properties.w" INTERNAL_NONTERMINAL("<value-property-name>", value_property_name_NTM, 1, 1000000000); value_property_name_NTM->voracious = 0; -#line 361 "inform7/Chapter 21/Properties.w" +#line 358 "inform7/Chapter 21/Properties.w" INTERNAL_NONTERMINAL("<property-name-v>", property_name_v_NTM, 1, 1000000000); property_name_v_NTM->voracious = 1; -#line 379 "inform7/Chapter 21/Properties.w" +#line 376 "inform7/Chapter 21/Properties.w" REGISTER_NONTERMINAL("<name-looking-like-property-test>", name_looking_like_property_test_NTM); -#line 386 "inform7/Chapter 21/Properties.w" +#line 383 "inform7/Chapter 21/Properties.w" INTERNAL_NONTERMINAL("<ambiguous-property-name>", ambiguous_property_name_NTM, 1, 1000000000); ambiguous_property_name_NTM->voracious = 1; #line 232 "inform7/Chapter 21/Measurement Adjectives.w" @@ -131003,22 +131296,22 @@ void register_tangled_nonterminals(void) { #line 641 "inform7/Chapter 26/Equations.w" INTERNAL_NONTERMINAL("<valid-equation-symbol>", valid_equation_symbol_NTM, 1, 1000000000); valid_equation_symbol_NTM->voracious = 0; -#line 160 "inform7/Chapter 27/Rulebooks.w" +#line 159 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<new-rulebook-name>", new_rulebook_name_NTM); -#line 209 "inform7/Chapter 27/Rulebooks.w" +#line 208 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-name-construction>", rulebook_name_construction_NTM); -#line 407 "inform7/Chapter 27/Rulebooks.w" +#line 406 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-variable-name>", rulebook_variable_name_NTM); -#line 593 "inform7/Chapter 27/Rulebooks.w" +#line 592 "inform7/Chapter 27/Rulebooks.w" INTERNAL_NONTERMINAL("<rulebook-stem>", rulebook_stem_NTM, 1, 1000000000); rulebook_stem_NTM->voracious = 1; -#line 621 "inform7/Chapter 27/Rulebooks.w" +#line 620 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-stem-inner>", rulebook_stem_inner_NTM); -#line 626 "inform7/Chapter 27/Rulebooks.w" +#line 625 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-stem-inner-unarticled>", rulebook_stem_inner_unarticled_NTM); -#line 633 "inform7/Chapter 27/Rulebooks.w" +#line 632 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-stem-name>", rulebook_stem_name_NTM); -#line 863 "inform7/Chapter 27/Rulebooks.w" +#line 862 "inform7/Chapter 27/Rulebooks.w" REGISTER_NONTERMINAL("<rulebook-property>", rulebook_property_NTM); #line 110 "inform7/Chapter 27/Focus and Outcome.w" REGISTER_NONTERMINAL("<rulebook-default-outcome>", rulebook_default_outcome_NTM); @@ -131076,37 +131369,37 @@ void register_tangled_nonterminals(void) { #line 578 "inform7/Chapter 27/Activities.w" INTERNAL_NONTERMINAL("<if-parsing-al-conditions>", if_parsing_al_conditions_NTM, 0, 0); if_parsing_al_conditions_NTM->voracious = 0; -#line 307 "inform7/Chapter 28/Phrases.w" +#line 289 "inform7/Chapter 28/Phrases.w" REGISTER_NONTERMINAL("<inline-phrase-definition>", inline_phrase_definition_NTM); -#line 137 "inform7/Chapter 28/Phrase Usage.w" +#line 136 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<rule-preamble>", rule_preamble_NTM); -#line 191 "inform7/Chapter 28/Phrase Usage.w" +#line 190 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<now-phrase-preamble>", now_phrase_preamble_NTM); -#line 201 "inform7/Chapter 28/Phrase Usage.w" +#line 200 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<rule-preamble-fine>", rule_preamble_fine_NTM); -#line 205 "inform7/Chapter 28/Phrase Usage.w" +#line 204 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<rule-preamble-finer>", rule_preamble_finer_NTM); -#line 210 "inform7/Chapter 28/Phrase Usage.w" +#line 209 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<rulebook-stem-embellished>", rulebook_stem_embellished_NTM); -#line 215 "inform7/Chapter 28/Phrase Usage.w" +#line 214 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<rulebook-bud>", rulebook_bud_NTM); -#line 453 "inform7/Chapter 28/Phrase Usage.w" +#line 450 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<unrecognised-rule-stem-diagnosis>", unrecognised_rule_stem_diagnosis_NTM); -#line 541 "inform7/Chapter 28/Phrase Usage.w" +#line 538 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<when-while-clause>", when_while_clause_NTM); -#line 947 "inform7/Chapter 28/Phrase Usage.w" +#line 944 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<parametric-problem-diagnosis>", parametric_problem_diagnosis_NTM); -#line 974 "inform7/Chapter 28/Phrase Usage.w" +#line 971 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<action-problem-diagnosis>", action_problem_diagnosis_NTM); -#line 1013 "inform7/Chapter 28/Phrase Usage.w" +#line 1010 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<action-when-diagnosis>", action_when_diagnosis_NTM); -#line 1023 "inform7/Chapter 28/Phrase Usage.w" +#line 1020 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<anl-diagnosis>", anl_diagnosis_NTM); -#line 1027 "inform7/Chapter 28/Phrase Usage.w" +#line 1024 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<anl-inner-diagnosis>", anl_inner_diagnosis_NTM); -#line 1031 "inform7/Chapter 28/Phrase Usage.w" +#line 1028 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<anl-tail-diagnosis>", anl_tail_diagnosis_NTM); -#line 1035 "inform7/Chapter 28/Phrase Usage.w" +#line 1032 "inform7/Chapter 28/Phrase Usage.w" REGISTER_NONTERMINAL("<anl-entry-diagnosis>", anl_entry_diagnosis_NTM); #line 433 "inform7/Chapter 28/Describing Phrase Type Data.w" REGISTER_NONTERMINAL("<phrase-preamble>", phrase_preamble_NTM); @@ -131210,7 +131503,7 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<privacy-indicator>", privacy_indicator_NTM); #line 107 "inform7/Chapter 33/Release Instructions.w" REGISTER_NONTERMINAL("<exposed-innards>", exposed_innards_NTM); -#line 50 "inform7/Chapter 34/The Naming Thicket.w" +#line 49 "inform7/Chapter 34/The Naming Thicket.w" REGISTER_NONTERMINAL("<notable-naming-properties>", notable_naming_properties_NTM); #line 237 "inform7/Chapter 34/Spatial Model.w" REGISTER_NONTERMINAL("<notable-spatial-kinds>", notable_spatial_kinds_NTM); @@ -131236,13 +131529,13 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<notable-regions-kinds>", notable_regions_kinds_NTM); #line 139 "inform7/Chapter 34/Regions.w" REGISTER_NONTERMINAL("<notable-regions-properties>", notable_regions_properties_NTM); -#line 171 "inform7/Chapter 34/The Map.w" +#line 167 "inform7/Chapter 34/The Map.w" REGISTER_NONTERMINAL("<notable-map-kinds>", notable_map_kinds_NTM); -#line 261 "inform7/Chapter 34/The Map.w" +#line 257 "inform7/Chapter 34/The Map.w" REGISTER_NONTERMINAL("<notable-map-directions>", notable_map_directions_NTM); -#line 432 "inform7/Chapter 34/The Map.w" +#line 428 "inform7/Chapter 34/The Map.w" REGISTER_NONTERMINAL("<notable-map-properties>", notable_map_properties_NTM); -#line 513 "inform7/Chapter 34/The Map.w" +#line 509 "inform7/Chapter 34/The Map.w" REGISTER_NONTERMINAL("<notable-map-noun-phrases>", notable_map_noun_phrases_NTM); #line 91 "inform7/Chapter 34/Map Connection Relations.w" REGISTER_NONTERMINAL("<mapping-relation-construction>", mapping_relation_construction_NTM); @@ -131276,81 +131569,81 @@ void register_tangled_nonterminals(void) { map_offset_NTM->voracious = 0; #line 466 "inform7/Chapter 34/EPS Map.w" REGISTER_NONTERMINAL("<map-rubric>", map_rubric_NTM); -#line 121 "inform7/Chapter 34/Scenes.w" +#line 119 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<notable-scene-properties>", notable_scene_properties_NTM); -#line 179 "inform7/Chapter 34/Scenes.w" +#line 177 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<notable-scenes>", notable_scenes_NTM); -#line 342 "inform7/Chapter 34/Scenes.w" +#line 340 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<scene-ends-sentence-subject>", scene_ends_sentence_subject_NTM); -#line 359 "inform7/Chapter 34/Scenes.w" +#line 357 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<scene-ends-sentence-adverb>", scene_ends_sentence_adverb_NTM); -#line 367 "inform7/Chapter 34/Scenes.w" +#line 365 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<scene-ends-sentence-object>", scene_ends_sentence_object_NTM); -#line 411 "inform7/Chapter 34/Scenes.w" +#line 409 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<scene-name>", scene_name_NTM); -#line 415 "inform7/Chapter 34/Scenes.w" +#line 413 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<scene-name-unarticled>", scene_name_unarticled_NTM); -#line 431 "inform7/Chapter 34/Scenes.w" +#line 429 "inform7/Chapter 34/Scenes.w" INTERNAL_NONTERMINAL("<scene-end-name>", scene_end_name_NTM, 1, 1000000000); scene_end_name_NTM->voracious = 0; -#line 437 "inform7/Chapter 34/Scenes.w" +#line 435 "inform7/Chapter 34/Scenes.w" INTERNAL_NONTERMINAL("<scene-end-name-creating>", scene_end_name_creating_NTM, 1, 1000000000); scene_end_name_creating_NTM->voracious = 0; -#line 864 "inform7/Chapter 34/Scenes.w" +#line 862 "inform7/Chapter 34/Scenes.w" REGISTER_NONTERMINAL("<spec-scene-description>", spec_scene_description_NTM); -#line 245 "inform7/Chapter 35/Actions.w" +#line 244 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<notable-actions>", notable_actions_NTM); -#line 252 "inform7/Chapter 35/Actions.w" +#line 251 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-name-construction>", action_name_construction_NTM); -#line 353 "inform7/Chapter 35/Actions.w" +#line 352 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-pronoun>", action_pronoun_NTM); -#line 380 "inform7/Chapter 35/Actions.w" +#line 379 "inform7/Chapter 35/Actions.w" INTERNAL_NONTERMINAL("<action-name>", action_name_NTM, 1, 1000000000); action_name_NTM->voracious = 0; -#line 408 "inform7/Chapter 35/Actions.w" +#line 407 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-optional-trailing-prepositions>", action_optional_trailing_prepositions_NTM); -#line 520 "inform7/Chapter 35/Actions.w" +#line 519 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-variable>", action_variable_NTM); -#line 528 "inform7/Chapter 35/Actions.w" +#line 527 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-variable-name>", action_variable_name_NTM); -#line 730 "inform7/Chapter 35/Actions.w" +#line 729 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-sentence-subject>", action_sentence_subject_NTM); -#line 758 "inform7/Chapter 35/Actions.w" +#line 757 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-clause>", action_clause_NTM); -#line 765 "inform7/Chapter 35/Actions.w" +#line 764 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-applications>", action_applications_NTM); -#line 776 "inform7/Chapter 35/Actions.w" +#line 775 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<act-req>", act_req_NTM); -#line 780 "inform7/Chapter 35/Actions.w" +#line 779 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-access>", action_access_NTM); -#line 788 "inform7/Chapter 35/Actions.w" +#line 787 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-sentence-object>", action_sentence_object_NTM); -#line 792 "inform7/Chapter 35/Actions.w" +#line 791 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-clauses>", action_clauses_NTM); -#line 797 "inform7/Chapter 35/Actions.w" +#line 796 "inform7/Chapter 35/Actions.w" REGISTER_NONTERMINAL("<action-clause-terminated>", action_clause_terminated_NTM); -#line 113 "inform7/Chapter 35/Action Name Lists.w" +#line 112 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<action-list>", action_list_NTM); -#line 121 "inform7/Chapter 35/Action Name Lists.w" +#line 120 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-excluded>", anl_excluded_NTM); -#line 125 "inform7/Chapter 35/Action Name Lists.w" +#line 124 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-minimal-common-operand>", anl_minimal_common_operand_NTM); -#line 150 "inform7/Chapter 35/Action Name Lists.w" +#line 149 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-to-tail>", anl_to_tail_NTM); -#line 154 "inform7/Chapter 35/Action Name Lists.w" +#line 153 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-operand>", anl_operand_NTM); -#line 157 "inform7/Chapter 35/Action Name Lists.w" +#line 156 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-in-tail>", anl_in_tail_NTM); -#line 189 "inform7/Chapter 35/Action Name Lists.w" +#line 188 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl>", anl_NTM); -#line 193 "inform7/Chapter 35/Action Name Lists.w" +#line 192 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-tail>", anl_tail_NTM); -#line 208 "inform7/Chapter 35/Action Name Lists.w" +#line 207 "inform7/Chapter 35/Action Name Lists.w" REGISTER_NONTERMINAL("<anl-entry>", anl_entry_NTM); -#line 213 "inform7/Chapter 35/Action Name Lists.w" +#line 212 "inform7/Chapter 35/Action Name Lists.w" INTERNAL_NONTERMINAL("<named-action-pattern>", named_action_pattern_NTM, 1, 1000000000); named_action_pattern_NTM->voracious = 0; -#line 221 "inform7/Chapter 35/Action Name Lists.w" +#line 220 "inform7/Chapter 35/Action Name Lists.w" INTERNAL_NONTERMINAL("<anl-entry-with-action>", anl_entry_with_action_NTM, 1, 1000000000); anl_entry_with_action_NTM->voracious = 0; #line 587 "inform7/Chapter 35/Action Patterns.w" @@ -131433,7 +131726,7 @@ void register_tangled_nonterminals(void) { REGISTER_NONTERMINAL("<understand-property-sentence-object-unconditional>", understand_property_sentence_object_unconditional_NTM); #line 416 "inform7/Chapter 36/Traverse for Grammar.w" REGISTER_NONTERMINAL("<understand-property-reference>", understand_property_reference_NTM); -#line 97 "inform7/Chapter 36/Grammar Properties.w" +#line 95 "inform7/Chapter 36/Grammar Properties.w" REGISTER_NONTERMINAL("<notable-parsing-variables>", notable_parsing_variables_NTM); #line 187 "inform7/Chapter 36/Grammar Lines.w" REGISTER_NONTERMINAL("<understand-condition>", understand_condition_NTM); diff --git a/retrospective/6L30/I6T/Actions.i6t b/retrospective/6M62/Internal/I6T/Actions.i6t similarity index 99% rename from retrospective/6L30/I6T/Actions.i6t rename to retrospective/6M62/Internal/I6T/Actions.i6t index f6c8d3e11..187123978 100644 --- a/retrospective/6L30/I6T/Actions.i6t +++ b/retrospective/6M62/Internal/I6T/Actions.i6t @@ -181,6 +181,7 @@ This is method (iv) in the summary above. Global converted_action_outcome = -1; [ GVS_Convert ac n s; converted_action_outcome = BeginAction(ac, n, s); + if (converted_action_outcome == true) FollowRulebook( (+ after rules +), nothing, true ); rtrue; ]; @@ -346,6 +347,7 @@ more discussion of this. Mstack_Create_Frame(ActionData-->(p1+AD_VARIABLES_CREATOR), frame_id); } if (ActionVariablesNotTypeSafe()) { + if (actor ~= player) { ACTION_PROCESSING_INTERNAL_RM('K'); new_line; } if (frame_id ~= -1) Mstack_Destroy_Frame(ActionData-->(p1+AD_VARIABLES_CREATOR), frame_id); MStack_DestroyRBVars(ACTION_PROCESSING_RB); diff --git a/retrospective/6L30/I6T/Activities.i6t b/retrospective/6M62/Internal/I6T/Activities.i6t similarity index 100% rename from retrospective/6L30/I6T/Activities.i6t rename to retrospective/6M62/Internal/I6T/Activities.i6t diff --git a/retrospective/6L30/I6T/BlockValues.i6t b/retrospective/6M62/Internal/I6T/BlockValues.i6t similarity index 99% rename from retrospective/6L30/I6T/BlockValues.i6t rename to retrospective/6M62/Internal/I6T/BlockValues.i6t index 2445de031..f19c2251e 100644 --- a/retrospective/6L30/I6T/BlockValues.i6t +++ b/retrospective/6M62/Internal/I6T/BlockValues.i6t @@ -44,7 +44,7 @@ into L2, because only L2's short block needs to change. The rules for customers who want to deal with values like this are much like the rules for allocating memory with Flex. Calling |BlkValueCreate| creates a new value, but this must always, and only once, later be disposed -of using |BlkFree|. +of using |BlkValueFree|. So if the short blocks of L1 and L2 both point to the same long block of actual data, what happens when only one of them is freed? The answer is that @@ -751,6 +751,7 @@ which should return true if a quick copy is okay, or false if not. [ BlkValueCopy to_bv from_bv to_kind from_kind kovs; if (to_bv == 0) BlkValueError("copy to null value"); if (from_bv == 0) BlkValueError("copy from null value"); + if (to_bv == from_bv) return; #ifdef BLKVALUE_TRACE; print "Copy: ", (BlkValueDebug) to_bv, " to equal ", (BlkValueDebug) from_bv, "^"; @@ -770,6 +771,11 @@ which should return true if a quick copy is okay, or false if not. return to_bv; ]; +[ BlkValueCopyAZ to_bv from_bv; + if (from_bv) return BlkValueCopy(to_bv, from_bv); + return to_bv; +]; + @p Destruction. We will also need primitives for two different forms of destruction. This is something which should happen whenever a block value is thrown away, diff --git a/retrospective/6L30/I6T/Char.i6t b/retrospective/6M62/Internal/I6T/Char.i6t similarity index 100% rename from retrospective/6L30/I6T/Char.i6t rename to retrospective/6M62/Internal/I6T/Char.i6t diff --git a/retrospective/6L30/I6T/Chronology.i6t b/retrospective/6M62/Internal/I6T/Chronology.i6t similarity index 100% rename from retrospective/6L30/I6T/Chronology.i6t rename to retrospective/6M62/Internal/I6T/Chronology.i6t diff --git a/retrospective/6L30/I6T/Combinations.i6t b/retrospective/6M62/Internal/I6T/Combinations.i6t similarity index 100% rename from retrospective/6L30/I6T/Combinations.i6t rename to retrospective/6M62/Internal/I6T/Combinations.i6t diff --git a/retrospective/6L30/I6T/Definitions.i6t b/retrospective/6M62/Internal/I6T/Definitions.i6t similarity index 99% rename from retrospective/6L30/I6T/Definitions.i6t rename to retrospective/6M62/Internal/I6T/Definitions.i6t index 92cbfdb6c..e7713f1d8 100644 --- a/retrospective/6L30/I6T/Definitions.i6t +++ b/retrospective/6M62/Internal/I6T/Definitions.i6t @@ -349,6 +349,11 @@ Constant RTP_RELKINDVIOLATION = 62; Constant RTP_CANTMAKEPART = 63; Constant RTP_TEXTTOKENTOOHARD = 64; Constant RTP_TABLE_NOTABLE2 = 65; +Constant RTP_RELATIONCHANGEIMPOSSIBLE = 66; +Constant RTP_RELMINIMAL = 67; +Constant RTP_LISTSIZENEGATIVE = 68; +Constant RTP_REGIONSNOTADJACENT = 69; + @p Template Activities. These are the activities defined in the Standard Rules. Most, though not @@ -432,6 +437,8 @@ Constant UNSUCCESSFUL_ATTEMPT_RB = 18; Constant AFTER_RB = 23; Constant REPORT_RB = 24; +Constant MULTIPLE_ACTION_PROCESSING_RB = 26; + @p Kind IDs. These are filled in automatically by NI, and have the same names as are used in the NI source (and in the Load-.i6t sections): for instance |NUMBER_TY|. diff --git a/retrospective/6L30/I6T/Figures.i6t b/retrospective/6M62/Internal/I6T/Figures.i6t similarity index 100% rename from retrospective/6L30/I6T/Figures.i6t rename to retrospective/6M62/Internal/I6T/Figures.i6t diff --git a/retrospective/6L30/I6T/FileIO.i6t b/retrospective/6M62/Internal/I6T/FileIO.i6t similarity index 96% rename from retrospective/6L30/I6T/FileIO.i6t rename to retrospective/6M62/Internal/I6T/FileIO.i6t index bd77bb522..5af5d8b9c 100644 --- a/retrospective/6L30/I6T/FileIO.i6t +++ b/retrospective/6M62/Internal/I6T/FileIO.i6t @@ -248,6 +248,9 @@ asterisk or hyphen into the initial character as needed. ]; @p Close File. +Note that a call to the following, in write mode, must be followed by a +|glk_stream_set_current()|, or else the next print statement will run into +Glk errors. @c [ FileIO_Close extf struc; @@ -259,12 +262,6 @@ asterisk or hyphen into the initial character as needed. AUXF_STATUS_IS_OPEN_FOR_WRITE or AUXF_STATUS_IS_OPEN_FOR_APPEND) return FileIO_Error(extf, "tried to close a file which is not open"); - if ((struc-->AUXF_BINARY == false) && - (struc-->AUXF_STATUS == - AUXF_STATUS_IS_OPEN_FOR_WRITE or - AUXF_STATUS_IS_OPEN_FOR_APPEND)) { - glk_set_window(gg_mainwin); - } if (struc-->AUXF_STATUS == AUXF_STATUS_IS_OPEN_FOR_WRITE or AUXF_STATUS_IS_OPEN_FOR_APPEND) { @@ -343,18 +340,20 @@ either as the whole file (if |append_flag| is false) or adding only to the end (if true). @c -[ FileIO_PutContents extf text append_flag struc str ch; +[ FileIO_PutContents extf text append_flag struc str ch oldstream; if ((extf < 1) || (extf > NO_EXTERNAL_FILES)) return FileIO_Error(extf, "tried to access a non-file"); struc = TableOfExternalFiles-->extf; if (struc-->AUXF_BINARY) return FileIO_Error(extf, "writing text will not work with binary files"); + oldstream = glk_stream_get_current(); str = FileIO_Open(extf, true, append_flag); if (str == 0) rfalse; @push say__p; @push say__pc; ClearParagraphing(19); TEXT_TY_Say(text); FileIO_Close(extf); + if (oldstream) glk_stream_set_current(oldstream); @pull say__pc; @pull say__p; rfalse; ]; @@ -366,15 +365,17 @@ external file -- are Tables. Here we only carry out the file-handling; the actual translations are in "Tables.i6t". @c -[ FileIO_PutTable extf tab rv struc; +[ FileIO_PutTable extf tab rv struc oldstream; if ((extf < 1) || (extf > NO_EXTERNAL_FILES)) return FileIO_Error(extf, "tried to write table to a non-file"); struc = TableOfExternalFiles-->extf; if (struc-->AUXF_BINARY) return FileIO_Error(extf, "writing a table will not work with binary files"); + oldstream = glk_stream_get_current(); if (FileIO_Open(extf, true) == 0) rfalse; rv = TablePrint(tab); FileIO_Close(extf); + if (oldstream) glk_stream_set_current(oldstream); if (rv) return RunTimeProblem(RTP_TABLE_CANTSAVE, tab); rtrue; ]; diff --git a/retrospective/6L30/I6T/Flex.i6t b/retrospective/6M62/Internal/I6T/Flex.i6t similarity index 100% rename from retrospective/6L30/I6T/Flex.i6t rename to retrospective/6M62/Internal/I6T/Flex.i6t diff --git a/retrospective/6L30/I6T/Glulx.i6t b/retrospective/6M62/Internal/I6T/Glulx.i6t similarity index 99% rename from retrospective/6L30/I6T/Glulx.i6t rename to retrospective/6M62/Internal/I6T/Glulx.i6t index d88f49302..f18213145 100644 --- a/retrospective/6L30/I6T/Glulx.i6t +++ b/retrospective/6M62/Internal/I6T/Glulx.i6t @@ -1031,6 +1031,9 @@ light to the Dark Room.") glk_set_window(gg_mainwin); InitGlkWindow(1); + + ! Empty the parse buffer (see bug 0001451) + buffer3-->0 = 0; ]; [ GGRecoverObjects id; @@ -1096,6 +1099,7 @@ light to the Dark Room.") switch (gg_arguments-->0) { GG_FOREGROUNDCHAN_ROCK: gg_foregroundchan = id; GG_BACKGROUNDCHAN_ROCK: gg_backgroundchan = id; + default: IdentifyGlkObject(1, 3, id, gg_arguments-->0); } id = glk_schannel_iterate(id, gg_arguments); } diff --git a/retrospective/6L30/I6T/Introduction.i6t b/retrospective/6M62/Internal/I6T/Introduction.i6t similarity index 100% rename from retrospective/6L30/I6T/Introduction.i6t rename to retrospective/6M62/Internal/I6T/Introduction.i6t diff --git a/retrospective/6L30/I6T/Language.i6t b/retrospective/6M62/Internal/I6T/Language.i6t similarity index 100% rename from retrospective/6L30/I6T/Language.i6t rename to retrospective/6M62/Internal/I6T/Language.i6t diff --git a/retrospective/6L30/I6T/Light.i6t b/retrospective/6M62/Internal/I6T/Light.i6t similarity index 100% rename from retrospective/6L30/I6T/Light.i6t rename to retrospective/6M62/Internal/I6T/Light.i6t diff --git a/retrospective/6L30/I6T/ListWriter.i6t b/retrospective/6M62/Internal/I6T/ListWriter.i6t similarity index 92% rename from retrospective/6L30/I6T/ListWriter.i6t rename to retrospective/6M62/Internal/I6T/ListWriter.i6t index f47e1bdeb..2a20b7dc4 100644 --- a/retrospective/6L30/I6T/ListWriter.i6t +++ b/retrospective/6M62/Internal/I6T/ListWriter.i6t @@ -52,7 +52,7 @@ to be adjacent in the list. The list-writer therefore carries out the activity together into a single entry: what this does is to set suitable |list_together| properties for the objects. NI has already given plural objects a similar |list_together| property. The net effect is that any entries in the list with -a non-zero value of |list_together| must be adjacent to each other. +a non-blank value of |list_together| must be adjacent to each other. We could achieve that by sorting the list in order of |list_together| value, but that would result in drastic movements, whereas we want to upset the @@ -225,6 +225,12 @@ prior named list number and gender for everything matching a description. prior_named_noun = obj; ]; +[ RegardingNumber n; + prior_named_list = n; + prior_named_list_gender = -1; + prior_named_noun = nothing; +]; + [ PNToVP gna; if (prior_named_noun == player) return story_viewpoint; if (prior_named_noun) gna = GetGNAOfObject(prior_named_noun); @@ -328,7 +334,8 @@ very rapid anyway (because the player can only read very slowly). @c [ MarkedListIterator obj depth required_lt function i; if (obj == nothing) return nothing; - switch(function) { + if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE; + switch(function) { START_ITF: return MarkedObjectArray-->0; COALESCE_ITF: return MarkedListCoalesce(); SEEK_ITF, ADVANCE_ITF: @@ -337,12 +344,11 @@ very rapid anyway (because the player can only read very slowly). if (function == ADVANCE_ITF) i++; for (:i<MarkedObjectLength: i++) { obj = MarkedObjectArray-->i; - if ((required_lt) && + if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) && (LT_Compare(obj.list_together, required_lt) ~= 0)) continue; if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag)) continue; - if ((c_style & CONCEAL_BIT) && - ((obj has concealed) || (obj has scenery))) continue; + if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue; return obj; } return nothing; @@ -351,6 +357,19 @@ very rapid anyway (because the player can only read very slowly). return nothing; ]; +@p Concealment. +This is the definition of concealment used by the list-writer, and means that, +for example, the "deciding the concealed possessions" activity is taken into +account. + +@c +[ ConcealedFromLists obj c; + if ((obj has concealed) || (obj has scenery)) rtrue; + c = parent(obj); + if ((c) && (c ofclass K5_container or K6_supporter) && (TestConcealment(c, obj))) rtrue; + rfalse; +]; + @p Coalesce Marked List. The return value is the new first entry in the raw list. @@ -358,7 +377,7 @@ The return value is the new first entry in the raw list. [ MarkedListCoalesce o i lt l swap m; for (i=0: i<MarkedObjectLength: i++) { lt = (MarkedObjectArray-->i).list_together; - if (lt ~= 0) { + if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) { ! Find first object in list after contiguous run with this list_together value: for (i++: (i<MarkedObjectLength) && (LT_Compare((MarkedObjectArray-->i).list_together, lt) == 0): i++) ; @@ -395,13 +414,15 @@ Global list_filter_routine; if (function == START_ITF) obj = child(parent(obj)); if (function == COALESCE_ITF) return ObjectTreeCoalesce(obj); if (function == ADVANCE_ITF) obj = sibling(obj); + if (required_lt == 0) required_lt = EMPTY_TEXT_VALUE; for (:: obj = sibling(obj)) { if (obj == nothing) return nothing; - if ((required_lt) && (LT_Compare(obj.list_together, required_lt) ~= 0)) continue; +!if (function == ADVANCE_ITF) print "Considering ", (the) obj, ": ", (TEXT_TY_Say) obj.list_together, ": ", (TEXT_TY_Say) required_lt, ": ", ": ", (TEXT_TY_Say) lt_value, ": ", LT_Compare(obj.list_together, required_lt), "^"; + if ((LT_Compare(required_lt, EMPTY_TEXT_VALUE) ~= 0) && + (LT_Compare(obj.list_together, required_lt) ~= 0)) continue; if ((c_style & WORKFLAG_BIT) && (depth==0) && (obj hasnt workflag)) continue; if (obj hasnt list_filter_permits) continue; - if ((c_style & CONCEAL_BIT) && - ((obj has concealed) || (obj has scenery))) continue; + if ((c_style & CONCEAL_BIT) && (ConcealedFromLists(obj))) continue; return obj; } ]; @@ -415,7 +436,7 @@ Again, the return value is the new first entry in the raw list. .StartAgain; for (memb=obj: memb~=nothing: memb=sibling(memb)) { lt = memb.list_together; - if (lt ~= 0) { + if (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) { ! Find first object in list after contiguous run with this list_together value: for (memb=sibling(memb): (memb) && (LT_Compare(memb.list_together, lt) == 0): memb = sibling(memb)) ; @@ -425,7 +446,7 @@ Again, the return value is the new first entry in the raw list. for (later=sibling(memb): later: later=sibling(later)) if (LT_Compare(later.list_together, lt) == 0) { ! Yes, they do: so we perform a regrouping of the list and start again: - obj = GroupChildren(parent(obj), list_together, lt); + obj = GroupChildren(parent(obj), lt); #Ifdef DBLW; print "^^Sorted to: "; DiagnoseSortList(obj); #Endif; jump StartAgain; } @@ -466,7 +487,8 @@ variables detailing the current list-writing process, and begin. WriteListR(first, c_depth, true); say__p = 1; } else { - objectloop (ol provides list_together) ol.list_together = 0; + objectloop (ol provides list_together) + BlkValueCopy(ol.list_together, EMPTY_TEXT_VALUE); CarryOutActivity(LISTING_CONTENTS_ACT, parent(first)); } } @@ -630,6 +652,8 @@ in the above sense. @c [ NumberOfGroupsInList o no_classes depth partition_classes partition_class_sizes no_groups cl memb k current_lt lt; + current_lt = EMPTY_TEXT_VALUE; + lt = EMPTY_TEXT_VALUE; no_groups = no_classes; for (cl=1, memb=o, k=0: cl<=no_classes: cl++) { ! Advance to first member of class number cl @@ -639,7 +663,8 @@ in the above sense. if (memb) { ! In case of accidents, but should always happen lt = memb.list_together; if ((LT_Compare(lt, lt_value) ~= 0) && - (lt) && (LT_Compare(lt, current_lt) == 0)) { + (LT_Compare(lt, EMPTY_TEXT_VALUE) ~= 0) && + (LT_Compare(lt, current_lt) == 0)) { no_groups--; } current_lt = lt; @@ -650,9 +675,16 @@ in the above sense. ]; [ LT_Compare lt1 lt2; -if (lt1 == lt2) return 0; - if (lt1 == 0) { if (lt2 == 0) return 0; else return -1; } - if (lt2 == 0) return 1; + if (lt1 == lt2) return 0; + if (lt1 == 0) lt1 = EMPTY_TEXT_VALUE; + if (lt2 == 0) lt2 = EMPTY_TEXT_VALUE; + if (TEXT_TY_IsSubstituted(lt1) == false) { + if (TEXT_TY_IsSubstituted(lt2) == false) return (lt1-->1)-(lt2-->1); + return -1; + } + if (TEXT_TY_IsSubstituted(lt2) == false) { + return -1; + } return BlkValueCompare(lt1, lt2); ]; @@ -693,7 +725,7 @@ The big one: |WriteListR| is the heart of the list-writer. groups_to_do = NumberOfGroupsInList(o, no_classes, depth, partition_classes, partition_class_sizes); - for (cl=1, memb=o, index=0, current_lt=0: groups_to_do>0: cl++) { + for (cl=1, memb=o, index=0, current_lt=EMPTY_TEXT_VALUE: groups_to_do>0: cl++) { ! Set memb to first object of partition class cl while (partition_classes->index ~= cl) { index++; memb=c_iterator(memb, depth, lt_value, ADVANCE_ITF); @@ -709,7 +741,7 @@ The big one: |WriteListR| is the heart of the list-writer. #Endif; if ((LT_Compare(memb.list_together, lt_value) == 0) || - (memb.list_together == 0)) current_lt = 0; + (LT_Compare(memb.list_together, EMPTY_TEXT_VALUE) == 0)) current_lt = EMPTY_TEXT_VALUE; else { if (LT_Compare(memb.list_together, current_lt) == 0) continue; @@ -732,7 +764,7 @@ The big one: |WriteListR| is the heart of the list-writer. current_lt = memb.list_together; jump GroupComplete; } - current_lt = 0; + current_lt = EMPTY_TEXT_VALUE; @pull listing_size; } @@ -810,7 +842,7 @@ below, and {\it that} is where they are printed. inventory_stage = 2; parser_one = memb; parser_two = depth+c_margin; (pv-->1)(); - } else if (pv) { + } else if (LT_Compare(pv, EMPTY_TEXT_VALUE) ~= 0) { if (q & ENGLISH_BIT ~= 0) print ")"; } .Omit__Sublist2; @@ -927,7 +959,7 @@ the iterator used at the top level) and increasing the depth by 1. if (parenth_flag) { LIST_WRITER_INTERNAL_RM('C'); LIST_WRITER_INTERNAL_RM('F'); } else { LIST_WRITER_INTERNAL_RM('A'); LIST_WRITER_INTERNAL_RM('F'); LIST_WRITER_INTERNAL_RM('B'); } - if (parenth_flag) print ")"; + if (parenth_flag) LIST_WRITER_INTERNAL_RM('B'); } EndActivity(PRINTING_INVENTORY_DETAILS_ACT, o); } ! end of FULLINV_BIT processing @@ -935,7 +967,7 @@ the iterator used at the top level) and increasing the depth by 1. child_count = 0; eldest_child = nothing; objectloop (p in o) - if ((c_style & CONCEAL_BIT == 0) || (p hasnt concealed && p hasnt scenery)) + if ((c_style & CONCEAL_BIT == 0) || (ConcealedFromLists(p) == false)) if (p has list_filter_permits) { child_count++; if (eldest_child == nothing) eldest_child = p; @@ -949,15 +981,19 @@ the iterator used at the top level) and increasing the depth by 1. if (child_count && (c_style & RECURSE_BIT)) { if (o has supporter) { if (c_style & ENGLISH_BIT) { - if (c_style & TERSE_BIT) LIST_WRITER_INTERNAL_RM('R', o); - else LIST_WRITER_INTERNAL_RM('S', o); + if (c_style & TERSE_BIT) { + LIST_WRITER_INTERNAL_RM('A', o); + LIST_WRITER_INTERNAL_RM('R', o); + } else LIST_WRITER_INTERNAL_RM('S', o); } recurse_flag = true; } if (o has container && (o has open || o has transparent)) { if (c_style & ENGLISH_BIT) { - if (c_style & TERSE_BIT) LIST_WRITER_INTERNAL_RM('T', o); - else LIST_WRITER_INTERNAL_RM('U', o); + if (c_style & TERSE_BIT) { + LIST_WRITER_INTERNAL_RM('A', o); + LIST_WRITER_INTERNAL_RM('T', o); + } else LIST_WRITER_INTERNAL_RM('U', o); } recurse_flag = true; } @@ -975,11 +1011,11 @@ the iterator used at the top level) and increasing the depth by 1. @push lt_value; @push listing_together; @push listing_size; @push c_iterator; c_iterator = ObjectTreeIterator; - lt_value = 0; listing_together = 0; listing_size = 0; + lt_value = EMPTY_TEXT_VALUE; listing_together = 0; listing_size = 0; WriteListR(o, depth+1, true); @pull c_iterator; @pull listing_size; @pull listing_together; @pull lt_value; - if (c_style & TERSE_BIT) print ")"; + if (c_style & TERSE_BIT) LIST_WRITER_INTERNAL_RM('B'); } ]; diff --git a/retrospective/6L30/I6T/Lists.i6t b/retrospective/6M62/Internal/I6T/Lists.i6t similarity index 98% rename from retrospective/6L30/I6T/Lists.i6t rename to retrospective/6M62/Internal/I6T/Lists.i6t index 2f22cad33..aa52fe268 100644 --- a/retrospective/6L30/I6T/Lists.i6t +++ b/retrospective/6M62/Internal/I6T/Lists.i6t @@ -291,6 +291,7 @@ where $N$ is the number of items in the list at present. if ((list==0) || (BlkValueWeakKind(list) ~= LIST_OF_TY)) return false; if (nodups && (LIST_OF_TY_FindItem(list, v))) return list; no_items = BlkValueRead(list, LIST_LENGTH_F); + BlkValueWrite(list, LIST_LENGTH_F, no_items); ! Forces the list to be mutable contents_kind = BlkValueRead(list, LIST_ITEM_KOV_F); if ((posnflag) && ((posn<1) || (posn > no_items+1))) { print "*** Couldn't add at entry ", posn, " in the list "; @@ -334,6 +335,7 @@ value |v| to insert, the specification is the same as for if ((list==0) || (BlkValueWeakKind(list) ~= LIST_OF_TY)) return false; if ((more==0) || (BlkValueWeakKind(more) ~= LIST_OF_TY)) return list; no_items = BlkValueRead(list, LIST_LENGTH_F); + BlkValueWrite(list, LIST_LENGTH_F, no_items); ! Forces the list to be mutable if ((posnflag) && ((posn<1) || (posn > no_items+1))) { print "*** Couldn't add at entry ", posn, " in the list "; LIST_OF_TY_Say(list, true); @@ -394,6 +396,7 @@ destroyed with |BlkValueFree| before being overwritten as the items shuffle down if ((list==0) || (BlkValueWeakKind(list) ~= LIST_OF_TY)) rfalse; cf = LIST_OF_TY_ComparisonFn(list); no_items = BlkValueRead(list, LIST_LENGTH_F); odsize = no_items; + BlkValueWrite(list, LIST_LENGTH_F, no_items); ! Forces the list to be mutable for (i=0: i<no_items: i++) { delendum = BlkValueRead(list, i+LIST_ITEM_BASE); if (cf == 0 or UnsignedCompare) @@ -533,7 +536,7 @@ if |truncation_end| is 1, or from the start if it is $-1$. @c [ LIST_OF_TY_SetLength list newsize this_way_only truncation_end no_items ex i dv; if ((list==0) || (BlkValueWeakKind(list) ~= LIST_OF_TY)) return 0; - if (newsize < 0) "*** Cannot resize a list to negative length ***"; + if (newsize < 0) return RunTimeProblem(RTP_LISTSIZENEGATIVE, newsize); BlkMakeMutable(list); no_items = BlkValueRead(list, LIST_LENGTH_F); if (no_items < newsize) { diff --git a/retrospective/6L30/I6T/Load-Actions.i6t b/retrospective/6M62/Internal/I6T/Load-Actions.i6t similarity index 97% rename from retrospective/6L30/I6T/Load-Actions.i6t rename to retrospective/6M62/Internal/I6T/Load-Actions.i6t index e5f44cf67..c7e280dbe 100644 --- a/retrospective/6L30/I6T/Load-Actions.i6t +++ b/retrospective/6M62/Internal/I6T/Load-Actions.i6t @@ -24,8 +24,8 @@ index-priority:0 STORED_ACTION_TY: apply-macro:#BASE-KIND -singular:stored action -plural:stored actions +singular:action +plural:actions instance-of:POINTER_VALUE_TY instance-of:SAYABLE_VALUE_TY diff --git a/retrospective/6L30/I6T/Load-Core.i6t b/retrospective/6M62/Internal/I6T/Load-Core.i6t similarity index 98% rename from retrospective/6L30/I6T/Load-Core.i6t rename to retrospective/6M62/Internal/I6T/Load-Core.i6t index 39d225d59..bea1694d1 100644 --- a/retrospective/6L30/I6T/Load-Core.i6t +++ b/retrospective/6M62/Internal/I6T/Load-Core.i6t @@ -17,7 +17,7 @@ parameters to the |{-type:...}| command, until the next |{-endlines}| command. @c -{-callv:Specifications::Taxa::make_type_IDs_table} +{-callv:Kinds::Interpreter::start} {-lines:type} #DEFAULTS: @@ -107,7 +107,7 @@ apply-macro:#KIND-OF-KIND singular:enumerated value plural:enumerated values -SAYABLE_VALUE_TY: ++SAYABLE_VALUE_TY: apply-macro:#KIND-OF-KIND singular:sayable value plural:sayable values @@ -460,6 +460,18 @@ index-priority:0 ! Represents an entry in a multiple ++VARIABLE_TY: +apply-macro:#KIND-CONSTRUCTOR +constructor-arity:covariant +singular:variable-pointer | k variable-pointer +plural:variable-pointers | k variable-pointers + +instance-of:WORD_VALUE_TY + +index-priority:0 +! Represents a variable name + + +RELATION_TY: apply-macro:#KIND-CONSTRUCTOR singular:relation | relation of k to l | relation of k diff --git a/retrospective/6L30/I6T/Load-Figures.i6t b/retrospective/6M62/Internal/I6T/Load-Figures.i6t similarity index 100% rename from retrospective/6L30/I6T/Load-Figures.i6t rename to retrospective/6M62/Internal/I6T/Load-Figures.i6t diff --git a/retrospective/6L30/I6T/Load-Files.i6t b/retrospective/6M62/Internal/I6T/Load-Files.i6t similarity index 100% rename from retrospective/6L30/I6T/Load-Files.i6t rename to retrospective/6M62/Internal/I6T/Load-Files.i6t diff --git a/retrospective/6L30/I6T/Load-Scenes.i6t b/retrospective/6M62/Internal/I6T/Load-Scenes.i6t similarity index 100% rename from retrospective/6L30/I6T/Load-Scenes.i6t rename to retrospective/6M62/Internal/I6T/Load-Scenes.i6t diff --git a/retrospective/6L30/I6T/Load-Sounds.i6t b/retrospective/6M62/Internal/I6T/Load-Sounds.i6t similarity index 100% rename from retrospective/6L30/I6T/Load-Sounds.i6t rename to retrospective/6M62/Internal/I6T/Load-Sounds.i6t diff --git a/retrospective/6L30/I6T/Load-Times.i6t b/retrospective/6M62/Internal/I6T/Load-Times.i6t similarity index 100% rename from retrospective/6L30/I6T/Load-Times.i6t rename to retrospective/6M62/Internal/I6T/Load-Times.i6t diff --git a/retrospective/6L30/I6T/MStack.i6t b/retrospective/6M62/Internal/I6T/MStack.i6t similarity index 100% rename from retrospective/6L30/I6T/MStack.i6t rename to retrospective/6M62/Internal/I6T/MStack.i6t diff --git a/retrospective/6L30/I6T/Main.i6t b/retrospective/6M62/Internal/I6T/Main.i6t similarity index 96% rename from retrospective/6L30/I6T/Main.i6t rename to retrospective/6M62/Internal/I6T/Main.i6t index 969734f3a..19b2398d6 100644 --- a/retrospective/6L30/I6T/Main.i6t +++ b/retrospective/6M62/Internal/I6T/Main.i6t @@ -23,7 +23,6 @@ to override the template files -- will not be understood until long after this paragraph has been fully dealt with. But perhaps that's no bad thing. @c -{-callv:Memory::start} {-callv:Lexer::start} {-callv:Preform::read_definition} {-callv:Plugins::Manage::start} @@ -64,7 +63,7 @@ forgotten. {-callv:Kinds::Interpreter::include_templates_for_kinds} {-log-phase:Semantic analysis II} -{-callv:ParseTree::Verification::verify} ! Purely to check that NI is running correctly +{-callv:ParseTree::verify} ! Purely to check that NI is running correctly {-callv:Extensions::Files::check_versions} ! Do the extension version numbers meet needs? {-callv:Sentences::Headings::make_tree} ! Stratify headings and subheadings {-callv:Sentences::Headings::write_as_xml} ! Dump them to a file for the GUI to use @@ -112,15 +111,14 @@ be too late to work before or instead of it. @c {-progress-stage:3} {-log-phase:Phrases and rules} -{-callv:Semantics::Nouns::LiteralPatterns::define_named_phrases} +{-callv:LiteralPatterns::define_named_phrases} {-callv:Phrases::Manager::traverse} {-callv:Phrases::Manager::register_meanings} {-callv:Phrases::Manager::parse_rule_parameters} {-callv:Phrases::Manager::add_rules_to_rulebooks} {-callv:Phrases::Manager::parse_rule_placements} {-callv:Equations::traverse_to_stock} - -{-callv:Problems::empty_all_headings} +{-callv:Tables::traverse_to_stock} @p Code Generation. This is where we hand over to regular template files -- containing code @@ -210,8 +208,7 @@ Making any final reports to the debugging log, and that's then it. @c {-callv:TemplateFiles::report_unacted_upon_interventions} -{! -callv:Specifications::Taxa::report_pairs_observed} -{! -callv:Specifications::Taxa::report_pairs_allowed} +{! -callv:ParseTree::write_main_source_to_log} {! -callv:Memory::log_statistics} {! -callv:Preform::log_language} {! -callv:Index::DocReferences::log_statistics} diff --git a/retrospective/6L30/I6T/Number.i6t b/retrospective/6M62/Internal/I6T/Number.i6t similarity index 100% rename from retrospective/6L30/I6T/Number.i6t rename to retrospective/6M62/Internal/I6T/Number.i6t diff --git a/retrospective/6L30/I6T/OrderOfPlay.i6t b/retrospective/6M62/Internal/I6T/OrderOfPlay.i6t similarity index 97% rename from retrospective/6L30/I6T/OrderOfPlay.i6t rename to retrospective/6M62/Internal/I6T/OrderOfPlay.i6t index a29319897..8f18f9ea7 100644 --- a/retrospective/6L30/I6T/OrderOfPlay.i6t +++ b/retrospective/6M62/Internal/I6T/OrderOfPlay.i6t @@ -388,7 +388,7 @@ the end of action generation: this is what prevents the time of day advancing, every turn rules from firing, and so forth -- see the Standard Rules. @c -[ GENERATE_ACTION_R i j k l; +[ GENERATE_ACTION_R i; if (EarlyInTurnSequence == false) rfalse; ! Prevent use outside top level EarlyInTurnSequence = false; @@ -403,13 +403,8 @@ every turn rules from firing, and so forth -- see the Standard Rules. inp2 = parser_results-->INP2_PRES; if (inp2 == 0) multiflag = true; } - if (inp1 == 1) { - noun = nothing; ! noun = special_number1; - } else noun = inp1; - if (inp2 == 1) { - second = nothing; - ! if (inp1 == 1) second = special_number2; else second = special_number1; - } else second = inp2; + if (inp1 == 1) noun = nothing; else noun = inp1; + if (inp2 == 1) second = nothing; else second = inp2; if (multiflag) { if (multiple_object-->0 == 0) { @@ -420,6 +415,18 @@ every turn rules from firing, and so forth -- see the Standard Rules. toomany_flag = false; if (actor == player) { GENERATE_ACTION_RM('A'); } } + i = multiple_object-->0; + FollowRulebook(MULTIPLE_ACTION_PROCESSING_RB); + if ((multiple_object-->0 == 1) && (i > 1)) { + multiflag = false; + if (inp1 == 0) noun = multiple_object-->1; + if ((inp2 == 0) && (parser_results-->NO_INPS_PRES >= 2)) + second = multiple_object-->1; + } + if (multiple_object-->0 == 0) rfalse; + } + + if (multiflag) { GenerateMultipleActions(); multiflag = false; } else BeginAction(action, noun, second); @@ -484,7 +491,7 @@ to be a blank slot in the timer array at or before the current position because we have just blanked one. @c -[ TIMED_EVENTS_R i event_timer fire rule; +[ TIMED_EVENTS_R i d event_timer fire rule; for (i=1: i<=(TimedEventsTable-->0): i++) if ((rule=TimedEventsTable-->i) ~= 0) { event_timer = TimedEventTimesTable-->i; fire = false; @@ -492,7 +499,8 @@ because we have just blanked one. (TimedEventTimesTable-->i)++; if (TimedEventTimesTable-->i == 0) fire = true; } else { - if ((the_time >= event_timer) && (the_time < event_timer+30)) fire = true; + d = (the_time - event_timer + TWENTY_FOUR_HOURS) % TWENTY_FOUR_HOURS; + if ((d >= 0) && (d < 30)) fire = true; } if (fire) { TimedEventsTable-->i = 0; diff --git a/retrospective/6L30/I6T/OutOfWorld.i6t b/retrospective/6M62/Internal/I6T/OutOfWorld.i6t similarity index 98% rename from retrospective/6L30/I6T/OutOfWorld.i6t rename to retrospective/6M62/Internal/I6T/OutOfWorld.i6t index b25e14e17..5d18dc10a 100644 --- a/retrospective/6L30/I6T/OutOfWorld.i6t +++ b/retrospective/6M62/Internal/I6T/OutOfWorld.i6t @@ -12,7 +12,7 @@ B/oowt: OutOfWorld Template. if (IterationsOfTurnSequence == 0) { IMMEDIATELY_UNDO_RM('B'); new_line; return; } if (undo_flag == 0) { IMMEDIATELY_UNDO_RM('C'); new_line; return; } if (undo_flag == 1) { IMMEDIATELY_UNDO_RM('D'); new_line; return; } - if (VM_Undo() == 0) { IMMEDIATELY_UNDO_RM('A'); new_line; } + if (VM_Undo() == 0) { IMMEDIATELY_UNDO_RM('F'); new_line; } ]; @p Announce Score Rule. diff --git a/retrospective/6M62/Internal/I6T/Output-Stub.i6t b/retrospective/6M62/Internal/I6T/Output-Stub.i6t new file mode 100644 index 000000000..e05a33668 --- /dev/null +++ b/retrospective/6M62/Internal/I6T/Output-Stub.i6t @@ -0,0 +1,14 @@ +B/outst: Output Stub Template. + +@Purpose: This is the replacement for Output used on runs where Inform 6 +is not intended to do any work, because an existing story file will be used. + +@------------------------------------------------------------------------------- + +@p Stub. +The minimum legal program in Inform 6: + +@c +[ Main; ]; + +! -------------------------------------------------------------------------- diff --git a/retrospective/6L30/I6T/Output.i6t b/retrospective/6M62/Internal/I6T/Output.i6t similarity index 99% rename from retrospective/6L30/I6T/Output.i6t rename to retrospective/6M62/Internal/I6T/Output.i6t index fc62a2976..614501ad1 100644 --- a/retrospective/6L30/I6T/Output.i6t +++ b/retrospective/6M62/Internal/I6T/Output.i6t @@ -319,7 +319,7 @@ Global lookmode = 2; ! 1 = BRIEF, 2 = VERBOSE, 3 = SUPERBRIEF Global c_style; ! current list-writer style Global c_depth; ! current recursion depth Global c_iterator; ! current iteration function -Global lt_value; ! common value of list_together +Global lt_value = EMPTY_TEXT_VALUE; ! common value of list_together Global listing_together; ! object number of one member of a group being listed together Global listing_size; ! size of such a group Global c_margin; ! current level of indentation printed by WriteListFrom() diff --git a/retrospective/6L30/I6T/Parser.i6t b/retrospective/6M62/Internal/I6T/Parser.i6t similarity index 99% rename from retrospective/6L30/I6T/Parser.i6t rename to retrospective/6M62/Internal/I6T/Parser.i6t index f46a741c2..36cb104c7 100644 --- a/retrospective/6L30/I6T/Parser.i6t +++ b/retrospective/6M62/Internal/I6T/Parser.i6t @@ -530,8 +530,23 @@ fairly thorough description of its output, which is written into the Get the input, do OOPS and AGAIN. @c - if (held_back_mode == 1) { - held_back_mode = 0; + if (held_back_mode) { + held_back_mode = false; wn = hb_wn; + if (verb_wordnum > 0) i = WordAddress(verb_wordnum); else i = WordAddress(1); + j = WordAddress(wn); + if (i<=j) for (: i<j : i++) i->0 = ' '; + i = NextWord(); + if (i == AGAIN1__WD or AGAIN2__WD or AGAIN3__WD) { + ! Delete the words "then again" from the again buffer, + ! in which we have just realised that it must occur: + ! prevents an infinite loop on "i. again" + + i = WordAddress(wn-2)-buffer; + if (wn > num_words) j = INPUT_BUFFER_LEN-1; + else j = WordAddress(wn)-buffer; + for (: i<j : i++) buffer3->i = ' '; + } + VM_Tokenise(buffer, parse); jump ReParse; } @@ -808,10 +823,8 @@ Get the verb: try all the syntax lines for that verb. @c .NotConversation; if (verb_word == 0 || ((verb_word->#dict_par1) & 1) == 0) { - if (actor == player) { - verb_word = UnknownVerb(verb_word); - if (verb_word ~= 0) jump VerbAccepted; - } + verb_word = UnknownVerb(verb_word); + if (verb_word ~= 0) jump VerbAccepted; best_etype = VERB_PE; jump GiveError; } @@ -1134,9 +1147,8 @@ so that it may be reprinted by the parser later on. if (wn <= num_words) { l = NextWord(); if (l == THEN1__WD or THEN2__WD or THEN3__WD or comma_word) { - held_back_mode = 1; hb_wn = wn-1; - } - else { + held_back_mode = true; hb_wn = wn-1; + } else { for (m=0 : m<32 : m++) pattern2-->m = pattern-->m; pcount2 = pcount; etype = UPTO_PE; @@ -1218,7 +1230,7 @@ so that it may be reprinted by the parser later on. ! ...and return from the parser altogether, having successfully matched ! a line. - if (held_back_mode == 1) { + if (held_back_mode) { wn=hb_wn; jump LookForMore; } @@ -1392,23 +1404,9 @@ Last thing: check for THEN and further instructions(s), return. held_back_mode = false; return; } - if (verb_wordnum > 0) i = WordAddress(verb_wordnum); else i = WordAddress(1); - j = WordAddress(wn); - if (i<=j) for (: i<j : i++) i->0 = ' '; - i = NextWord(); - if (i == AGAIN1__WD or AGAIN2__WD or AGAIN3__WD) { - ! Delete the words "then again" from the again buffer, - ! in which we have just realised that it must occur: - ! prevents an infinite loop on "i. again" - - i = WordAddress(wn-2)-buffer; - if (wn > num_words) j = INPUT_BUFFER_LEN-1; - else j = WordAddress(wn)-buffer; - for (: i<j : i++) buffer3->i = ' '; - } - VM_Tokenise(buffer,parse); + hb_wn = wn; held_back_mode = true; - return; + return; } best_etype = UPTO_PE; jump GiveError; @@ -1741,7 +1739,7 @@ Parse an object name. wn = desc_wn; jump TryAgain2; } - if (etype == MULTI_PE or TOOFEW_PE && multiflag) etype = STUCK_PE; + if (etype == MULTI_PE && multiflag) etype = STUCK_PE; etype=CantSee(); jump FailToken; } ! Choose best error @@ -2378,7 +2376,7 @@ because we want to allow duplicates). for (i=1 : i<=answer_words : i++) if (WordFrom(i, parse2) == comma_word) { VM_CopyBuffer(buffer, buffer2); - return REPARSE_CODE; + jump RECONSTRUCT_INPUT; } first_word=(parse2-->1); @@ -2395,7 +2393,7 @@ because we want to allow duplicates). j = first_word->#dict_par1; if ((0 ~= j&1) && ~~LanguageVerbMayBeName(first_word)) { VM_CopyBuffer(buffer, buffer2); - return REPARSE_CODE; + jump RECONSTRUCT_INPUT; } } @@ -2491,7 +2489,7 @@ because we want to allow duplicates). for (: i<INPUT_BUFFER_LEN : i++) buffer->i = ' '; #Endif; ! TARGET_ZCODE - return REPARSE_CODE; + jump RECONSTRUCT_INPUT; ]; ! end of NounDomain @@ -2629,9 +2627,7 @@ routines to clear up this mess, so we can't economise on working them out). flag = 0; BeginActivity(DECIDING_WHETHER_ALL_INC_ACT, j); if ((ForActivity(DECIDING_WHETHER_ALL_INC_ACT, j)) == 0) { - if (j hasnt concealed && j hasnt worn) flag = 1; - if (context == MULTIHELD_TOKEN or MULTIEXCEPT_TOKEN && parent(j) ~= actor) flag = 0; @@ -2664,6 +2660,7 @@ routines to clear up this mess, so we can't economise on working them out). } if (i < indef_wanted && indef_wanted < INDEF_ALL_WANTED) { etype = TOOFEW_PE; multi_wanted = indef_wanted; + if (parser_trace >= 4) print "Too few found^"; multi_had=i; return -1; } @@ -3842,16 +3839,16 @@ Manual}, 4th edition. [ YesOrNo i j; for (::) { #Ifdef TARGET_ZCODE; - if (location == nothing || parent(player) == nothing) read buffer parse; - else read buffer parse DrawStatusLine; - j = parse->1; + if (location == nothing || parent(player) == nothing) read buffer2 parse2; + else read buffer2 parse2 DrawStatusLine; + j = parse2->1; #Ifnot; ! TARGET_GLULX; if (location ~= nothing && parent(player) ~= nothing) DrawStatusLine(); - KeyboardPrimitive(buffer, parse); - j = parse-->0; + KeyboardPrimitive(buffer2, parse2); + j = parse2-->0; #Endif; ! TARGET_ if (j) { ! at least one word entered - i = parse-->1; + i = parse2-->1; if (i == YES1__WD or YES2__WD or YES3__WD) rtrue; if (i == NO1__WD or NO2__WD or NO3__WD) rfalse; } diff --git a/retrospective/6L30/I6T/Printing.i6t b/retrospective/6M62/Internal/I6T/Printing.i6t similarity index 100% rename from retrospective/6L30/I6T/Printing.i6t rename to retrospective/6M62/Internal/I6T/Printing.i6t diff --git a/retrospective/6L30/I6T/RTP.i6t b/retrospective/6M62/Internal/I6T/RTP.i6t similarity index 97% rename from retrospective/6L30/I6T/RTP.i6t rename to retrospective/6M62/Internal/I6T/RTP.i6t index 4b482a8eb..c3d72e452 100644 --- a/retrospective/6L30/I6T/RTP.i6t +++ b/retrospective/6M62/Internal/I6T/RTP.i6t @@ -195,6 +195,9 @@ Array RTP_Buffer --> 7; print "Memory allocation proved impossible.^"; RTP_LISTRANGEERROR: print "Attempt to use list item which does not exist.^"; + RTP_LISTSIZENEGATIVE: + print "Attempt to resize list to ", par1, " entries - there must ", + "always be 0 or more.^"; RTP_REGEXPSYNTAXERROR: print "Syntax error in regular expression.^"; RTP_NOGLULXUNICODE: @@ -229,6 +232,14 @@ Array RTP_Buffer --> 7; (the) par1, ".^"; RTP_TEXTTOKENTOOHARD: print "This use of '[text]' is too complicated.^"; + RTP_RELATIONCHANGEIMPOSSIBLE: + print "This change of the relation's nature is impossible in play.^"; + RTP_RELMINIMAL: + print "This operation can't be done with the relation '", + (string) RlnGetF(par3, RR_DESCRIPTION), "'.^"; + RTP_REGIONSNOTADJACENT: + print "You can't test whether something is adjacent to a region: ", + "such as, in this case, ", (the) par1, ".^"; } print "^"; ]; diff --git a/retrospective/6L30/I6T/RealNumber.i6t b/retrospective/6M62/Internal/I6T/RealNumber.i6t similarity index 100% rename from retrospective/6L30/I6T/RealNumber.i6t rename to retrospective/6M62/Internal/I6T/RealNumber.i6t diff --git a/retrospective/6L30/I6T/RegExp.i6t b/retrospective/6M62/Internal/I6T/RegExp.i6t similarity index 100% rename from retrospective/6L30/I6T/RegExp.i6t rename to retrospective/6M62/Internal/I6T/RegExp.i6t diff --git a/retrospective/6L30/I6T/RelationKind.i6t b/retrospective/6M62/Internal/I6T/RelationKind.i6t similarity index 99% rename from retrospective/6L30/I6T/RelationKind.i6t rename to retrospective/6M62/Internal/I6T/RelationKind.i6t index df13a3f9f..c3198a4c7 100644 --- a/retrospective/6L30/I6T/RelationKind.i6t +++ b/retrospective/6M62/Internal/I6T/RelationKind.i6t @@ -328,12 +328,11 @@ been added yet. @c [ RELATION_TY_SetValency rel val kov filled cur handler ext; filled = BlkValueRead(rel, RRV_FILLED); - if (filled) { print "*** Illegal valency change ***^"; rfalse; } + if (filled) { RunTimeProblem(RTP_RELATIONCHANGEIMPOSSIBLE); rfalse; } kov = BlkValueRead(rel, RRV_KIND); if (val == RRVAL_EQUIV or RRVAL_SYM_V_TO_V or RRVAL_SYM_O_TO_O) { if (KindBaseTerm(kov, 0) ~= KindBaseTerm(kov, 1)) { - print "*** Relation cannot be made symmetric ***^"; - rfalse; + RunTimeProblem(RTP_RELATIONCHANGEIMPOSSIBLE); rfalse; } } cur = BlkValueRead(rel, RRV_HANDLER); @@ -345,7 +344,7 @@ been added yet. RRVAL_EQUIV: handler = EquivHashTableRelationHandler; RRVAL_SYM_V_TO_V: handler = ChooseRelationHandler(kov, true); RRVAL_SYM_O_TO_O: handler = Sym2in1HashTableRelationHandler; - default: print "*** Illegal valency value ***^"; rfalse; + default: RunTimeProblem(RTP_RELATIONCHANGEIMPOSSIBLE); rfalse; } if (cur == handler) rtrue; ! adjust size when going to or from 2-in-1 @@ -1115,15 +1114,15 @@ the existing pair $(X, Y)$. mask = BlkValueRead(rel, RRV_STORAGE); i = hashv & mask; !print "hv=", hashv, ", trying ", i; - if (HashCoreEntryMatches(rel, i, kx, X)) { -!print " - found]^"; - return i; - } flags = BlkValueRead(rel, RRV_DATA_BASE + 3*i); if (flags == 0) { !print " - not found]^"; return ~i; } + if (HashCoreEntryMatches(rel, i, kx, X)) { +!print " - found]^"; + return i; + } ! not here, keep looking in sequence free = -1; if (flags & RRF_DELETED) free = i; diff --git a/retrospective/6L30/I6T/Relations.i6t b/retrospective/6M62/Internal/I6T/Relations.i6t similarity index 92% rename from retrospective/6L30/I6T/Relations.i6t rename to retrospective/6M62/Internal/I6T/Relations.i6t index f850613b0..122c97de8 100644 --- a/retrospective/6L30/I6T/Relations.i6t +++ b/retrospective/6M62/Internal/I6T/Relations.i6t @@ -617,6 +617,134 @@ form of the same code in which left and right are exchanged: this is it. } ]; +@p Relation Emptying. +These routines, mercifully a little simpler, define the adjective "empty" as +it applied to relations. Each routine has to forcibly empty the relation if +the clear flag is set, and in any case return either true or false to say +whether the relation is empty at the end of the call. For relations in groups, +"empty" is understood to mean that each object relates only to itself. + +@c +[ Relation_EmptyOtoO relation sym clear relation_property obj1 obj2 t1 t2 N1 N2; + relation_property = RlnGetF(relation, RR_STORAGE); + t1 = KindBaseTerm(RlnGetF(relation, RR_KIND), 0); ! Kind of left term + t2 = KindBaseTerm(RlnGetF(relation, RR_KIND), 1); ! Kind of right term + if (t2 == OBJECT_TY) { + objectloop (obj2 provides relation_property) { + obj1 = obj2.relation_property; + if (obj1) { + if (clear) obj2.relation_property = nothing; + else rfalse; + } + } + } else { + for (obj2=1: obj2<=N2: obj2++) { + obj1 = GProperty(t2, obj2, relation_property); + if (obj1) { + if (clear) WriteGProperty(t2, obj2, relation_property, 0); + else rfalse; + } + } + } + if (t1 ~= t2) { + if (t1 == OBJECT_TY) { + objectloop (obj1 provides relation_property) { + obj2 = obj1.relation_property; + if (obj2) { + if (clear) obj1.relation_property = nothing; + else rfalse; + } + } + } else { + for (obj1=1: obj1<=N2: obj1++) { + obj2 = GProperty(t1, obj1, relation_property); + if (obj2) { + if (clear) WriteGProperty(t1, obj1, relation_property, 0); + else rfalse; + } + } + } + } + rtrue; +]; +[ Relation_EmptyEquiv relation sym clear + relation_property obj1 obj2 t N v; + relation_property = RlnGetF(relation, RR_STORAGE); + t = KindBaseTerm(RlnGetF(relation, RR_KIND), 0); ! Kind of left term + N = KOVDomainSize(t); + if (clear) { + v = 1; + if (t == OBJECT_TY) { + objectloop (obj1 provides relation_property) + obj1.relation_property = v++; + } else { + for (obj1=1: obj1<=N: obj1++) + WriteGProperty(t, obj1, relation_property, v++); + } + rtrue; + } + if (t == OBJECT_TY) { + objectloop (obj1 provides relation_property) + objectloop (obj2 provides relation_property) + if ((obj1 < obj2) && (obj1.relation_property == obj2.relation_property)) + rfalse; + } else { + for (obj1=1: obj1<=N: obj1++) + for (obj2=obj1+1: obj1<=N: obj1++) + if (GProperty(t, obj1, relation_property) == GProperty(t, obj2, relation_property)) + rfalse; + } + rtrue; +]; +[ Relation_EmptyVtoV relation sym clear vtov_structure obj1 obj2 pr pr2 proutine1 proutine2; + vtov_structure = RlnGetF(relation, RR_STORAGE); + pr = vtov_structure-->VTOVS_LEFT_INDEX_PROP; + pr2 = vtov_structure-->VTOVS_RIGHT_INDEX_PROP; + proutine1 = vtov_structure-->VTOVS_LEFT_PRINTING_ROUTINE; + proutine2 = vtov_structure-->VTOVS_RIGHT_PRINTING_ROUTINE; + + if (pr && pr2) { + objectloop (obj1 provides pr) + objectloop (obj2 provides pr2) { + if (sym && obj2 > obj1) continue; + if (Relation_TestVtoV(obj1, relation, obj2)) { + if (clear) Relation_NowNVtoV(obj1, relation, obj2, sym); + else rfalse; + } + } + return; + } + if (pr && (pr2==0)) { + objectloop (obj1 provides pr) + for (obj2=1:obj2<=vtov_structure-->VTOVS_RIGHT_DOMAIN_SIZE:obj2++) { + if (Relation_TestVtoV(obj1, relation, obj2)) { + if (clear) Relation_NowNVtoV(obj1, relation, obj2, sym); + else rfalse; + } + } + return; + } + if ((pr==0) && (pr2)) { + for (obj1=1:obj1<=vtov_structure-->2:obj1++) + objectloop (obj2 provides pr2) { + if (Relation_TestVtoV(obj1, relation, obj2)) { + if (clear) Relation_NowNVtoV(obj1, relation, obj2, sym); + else rfalse; + } + } + return; + } + for (obj1=1:obj1<=vtov_structure-->2:obj1++) + for (obj2=1:obj2<=vtov_structure-->VTOVS_RIGHT_DOMAIN_SIZE:obj2++) + if (Relation_TestVtoV(obj1, relation, obj2)) { + if (Relation_TestVtoV(obj1, relation, obj2)) { + if (clear) Relation_NowNVtoV(obj1, relation, obj2, sym); + else rfalse; + } + } + rtrue; +]; + @p Map Route-Finding. The general problem we have to solve here is: given $x, y\in R$, where $R$ is the set of rooms and we write $x\sim y$ if there is a map connection from diff --git a/retrospective/6L30/I6T/Rulebooks.i6t b/retrospective/6M62/Internal/I6T/Rulebooks.i6t similarity index 100% rename from retrospective/6L30/I6T/Rulebooks.i6t rename to retrospective/6M62/Internal/I6T/Rulebooks.i6t diff --git a/retrospective/6L30/I6T/Sort.i6t b/retrospective/6M62/Internal/I6T/Sort.i6t similarity index 100% rename from retrospective/6L30/I6T/Sort.i6t rename to retrospective/6M62/Internal/I6T/Sort.i6t diff --git a/retrospective/6L30/I6T/StoredAction.i6t b/retrospective/6M62/Internal/I6T/StoredAction.i6t similarity index 98% rename from retrospective/6L30/I6T/StoredAction.i6t rename to retrospective/6M62/Internal/I6T/StoredAction.i6t index 42d9cf5b2..d76a7a817 100644 --- a/retrospective/6L30/I6T/StoredAction.i6t +++ b/retrospective/6M62/Internal/I6T/StoredAction.i6t @@ -168,7 +168,7 @@ command once printing is done. To do this, we need to save the old player's command, and we do that by creating a text for the duration. @c -[ STORED_ACTION_TY_Say stora text_of_command saved_command saved_pn saved_action K1 K2 at; +[ STORED_ACTION_TY_Say stora text_of_command saved_command saved_pn saved_action K1 K2 at cf cw; if ((stora==0) || (BlkValueWeakKind(stora) ~= STORED_ACTION_TY)) return; text_of_command = BlkValueRead(stora, STORA_COMMAND_TEXT_F); if (text_of_command) { @@ -178,6 +178,7 @@ command, and we do that by creating a text for the duration. } saved_pn = parsed_number; saved_action = action; action = BlkValueRead(stora, STORA_ACTION_F); + cf = consult_from; cw = consult_words; at = FindAction(-1); K1 = ActionData-->(at+AD_NOUN_KOV); K2 = ActionData-->(at+AD_SECOND_KOV); @@ -190,6 +191,7 @@ command, and we do that by creating a text for the duration. BlkValueCopy(text_of_command, parsed_number); SetPlayersCommand(text_of_command); parsed_number = players_command; + consult_from = parsed_number/100; consult_words = parsed_number%100; } } if (K2 ~= OBJECT_TY) { @@ -201,6 +203,7 @@ command, and we do that by creating a text for the duration. BlkValueCopy(text_of_command, parsed_number); SetPlayersCommand(text_of_command); parsed_number = players_command; + consult_from = parsed_number/100; consult_words = parsed_number%100; } } DB_Action( @@ -210,6 +213,7 @@ command, and we do that by creating a text for the duration. BlkValueRead(stora, STORA_NOUN_F), BlkValueRead(stora, STORA_SECOND_F), true); parsed_number = saved_pn; action = saved_action; + consult_from = cf; consult_words = cw; if (text_of_command) { SetPlayersCommand(saved_command); BlkValueFree(saved_command); diff --git a/retrospective/6L30/I6T/Tables.i6t b/retrospective/6M62/Internal/I6T/Tables.i6t similarity index 99% rename from retrospective/6L30/I6T/Tables.i6t rename to retrospective/6M62/Internal/I6T/Tables.i6t index fff4f8884..640672561 100644 --- a/retrospective/6L30/I6T/Tables.i6t +++ b/retrospective/6M62/Internal/I6T/Tables.i6t @@ -22,10 +22,11 @@ Each column |C| is also a |table| array, with |C-->1| holding the unique ID number for the column's name, |C-->2| holding the blank entry flags offset and |C-->3| up to |C-->(C-->0)| holding the entries. -|C-->1| also contains four upper bit flags. These are also defined in +|C-->1| also contains seven upper bit flags. These are also defined in "Tables.w" in the NI source, and the values must agree. @c +Constant TB_COLUMN_REAL $8000; Constant TB_COLUMN_SIGNED $4000; Constant TB_COLUMN_TOPIC $2000; Constant TB_COLUMN_DONTSORTME $1000; @@ -612,6 +613,9 @@ where other entries are not. if (f & TB_COLUMN_ALLOCATED) { if (BlkValueCompare(val2, val1) < 0) return 1; return -1; + } else if (f & TB_COLUMN_REAL) { + if (REAL_NUMBER_TY_Compare(val1, val2) > 0) return 1; + return -1; } else if (f & TB_COLUMN_SIGNED) { if (val1 > val2) return 1; return -1; diff --git a/retrospective/6L30/I6T/Tests.i6t b/retrospective/6M62/Internal/I6T/Tests.i6t similarity index 100% rename from retrospective/6L30/I6T/Tests.i6t rename to retrospective/6M62/Internal/I6T/Tests.i6t diff --git a/retrospective/6L30/I6T/Text.i6t b/retrospective/6M62/Internal/I6T/Text.i6t similarity index 100% rename from retrospective/6L30/I6T/Text.i6t rename to retrospective/6M62/Internal/I6T/Text.i6t diff --git a/retrospective/6L30/I6T/Time.i6t b/retrospective/6M62/Internal/I6T/Time.i6t similarity index 79% rename from retrospective/6L30/I6T/Time.i6t rename to retrospective/6M62/Internal/I6T/Time.i6t index 543e47701..948fb3356 100644 --- a/retrospective/6L30/I6T/Time.i6t +++ b/retrospective/6M62/Internal/I6T/Time.i6t @@ -25,17 +25,33 @@ anachronism, as it's used for all kinds of value. ]; @p Square Root. -This is an old algorithm for extracting binary square roots, taking 2 bits -at a time. We start out with |one| at the highest bit which isn't the sign -bit; that used to be worked out as |WORD_HIGHBIT/2|, but this caused unexpected -portability problems (exposing a minor bug in Inform and also glulxe) because -of differences in how C compilers handle signed division of constants in the -case where the dividend is $-2^{31}$, the unique number which cannot be negated -in 32-bit twos complement arithmetic. +Although this routine performs integer square root, it does so using Glulx's +floating-point operations if available (with code contributed by Andrew +Plotkin): this is fast and remains accurate up to about 16 million. + +The slower integer method is an old algorithm for extracting binary square +roots, taking 2 bits at a time. We start out with |one| at the highest bit +which isn't the sign bit; that used to be worked out as |WORD_HIGHBIT/2|, but +this caused unexpected portability problems (exposing a minor bug in Inform +and also glulxe) because of differences in how C compilers handle signed +division of constants in the case where the dividend is $-2^{31}$, the unique +number which cannot be negated in 32-bit twos complement arithmetic. @c [ SquareRoot num - op res one; + op res one n x; + if (num < 0) { RunTimeProblem(RTP_NEGATIVEROOT); return 1; } + + ! Use floating-point ops if available. + #ifdef TARGET_GLULX; + @gestalt 11 0 n; + if (n) { + @numtof num x; + @sqrt x x; + @ftonumz x num; + return num; + } + #endif; op = num; if (num < 0) { RunTimeProblem(RTP_NEGATIVEROOT); return 1; } ! "one" starts at the highest power of four <= the argument. @@ -56,13 +72,34 @@ in 32-bit twos complement arithmetic. ]; @p Cube Root. -The following is an iterative scheme for finding cube roots by +The following, again, uses floating-point arithmetic if it's available: +this is fast and gives good accuracy for smallish numbers, but limited +precision begins to tell at around 2000000. + +The alternative is an iterative scheme for finding cube roots by Newton-Raphson approximation, not a great method but which, on the narrow -ranges of integers we deal with, is good enough. The square root is used -only as a sighting shot. +ranges of integers we deal with, just about good enough. The square root is +used only as a sighting shot. @c -[ CubeRoot num x y n; +[ CubeRoot num neg x y n; + ! Use floating-point ops if available. + #ifdef TARGET_GLULX; + @gestalt 11 0 n; + if (n) { + if (num < 0) { + neg = true; + num = -num; + } + @numtof num x; + @pow x 1051372203 x; ! pow(x, 0.3333) + @ftonumz x num; + if (neg) + return -num; + else + return num; + } + #endif; if (num < 0) x = -SquareRoot(-num); else x = SquareRoot(num); for (n=0: (y ~= x) && (n++ < 100): y = x, x = (2*x + num/x/x)/3) ; return x; diff --git a/retrospective/6L30/I6T/UnicodeData.i6t b/retrospective/6M62/Internal/I6T/UnicodeData.i6t similarity index 100% rename from retrospective/6L30/I6T/UnicodeData.i6t rename to retrospective/6M62/Internal/I6T/UnicodeData.i6t diff --git a/retrospective/6L30/I6T/Utilities.i6t b/retrospective/6M62/Internal/I6T/Utilities.i6t similarity index 92% rename from retrospective/6L30/I6T/Utilities.i6t rename to retrospective/6M62/Internal/I6T/Utilities.i6t index 23860b447..4511865e0 100644 --- a/retrospective/6L30/I6T/Utilities.i6t +++ b/retrospective/6M62/Internal/I6T/Utilities.i6t @@ -61,19 +61,20 @@ Constant R_PrintTimeOfDay = GenerateRandomNumber; @p GroupChildren. The following runs through the child-objects of |par| in the I6 object tree, -and moves those having a given property value together, to become the eldest -children. It preserves the ordering in between those objects, and also in -between those not having that property value. The property is required to -be a common property. +and moves those having a given |list_property| property value together, to +become the eldest children. It preserves the ordering in between those +objects, and also in between those not having that property value. We do this by temporarily moving objects into and out of |in_obj| and |out_obj|, objects which in all other circumstances never have children in the tree. @c -[ GroupChildren par prop value; +[ GroupChildren par value; while (child(par) ~= 0) { - if (BlkValueCompare(child(par).prop, value) ~= 0) move child(par) to out_obj; - else move child(par) to in_obj; + if (LT_Compare(child(par).list_together, value) ~= 0) + move child(par) to out_obj; + else + move child(par) to in_obj; } while (child(in_obj) ~= 0) move child(in_obj) to par; while (child(out_obj) ~= 0) move child(out_obj) to par; @@ -218,8 +219,12 @@ This is equivalent to C's memcpy function, in good ways and bad. @c [ Memcpy to_addr from_addr size n; +#Ifdef TARGET_ZCODE; for (n = size/WORDSIZE: (n--) > 0: ) to_addr-->n = from_addr-->n; for (n = size: ((n--) % WORDSIZE ~= 0): ) to_addr->n = from_addr->n; +#Ifnot; ! TARGET_GLULX + @mcopy size from_addr to_addr; +#Endif; ! TARGET_ ]; @p Arrcpy. diff --git a/retrospective/6L30/I6T/WorldModel.i6t b/retrospective/6M62/Internal/I6T/WorldModel.i6t similarity index 99% rename from retrospective/6L30/I6T/WorldModel.i6t rename to retrospective/6M62/Internal/I6T/WorldModel.i6t index 75938ac2d..ea05676d0 100644 --- a/retrospective/6L30/I6T/WorldModel.i6t +++ b/retrospective/6M62/Internal/I6T/WorldModel.i6t @@ -654,6 +654,8 @@ doors. @c [ TestAdjacency R1 R2 i row; + if (R1 ofclass K9_region) RunTimeProblem(RTP_REGIONSNOTADJACENT, R1); + else if (R2 ofclass K9_region) RunTimeProblem(RTP_REGIONSNOTADJACENT, R2); row = (R1.IK1_Count)*No_Directions; for (i=0: i<No_Directions: i++, row++) if (Map_Storage-->row == R2) rtrue; diff --git a/retrospective/6L30/I6T/ZMachine.i6t b/retrospective/6M62/Internal/I6T/ZMachine.i6t similarity index 98% rename from retrospective/6L30/I6T/ZMachine.i6t rename to retrospective/6M62/Internal/I6T/ZMachine.i6t index 21b332bb8..88cae72d3 100644 --- a/retrospective/6L30/I6T/ZMachine.i6t +++ b/retrospective/6M62/Internal/I6T/ZMachine.i6t @@ -324,24 +324,24 @@ the ZSCII character set. @c [ VM_UpperToLowerCase c; switch (c) { - 'A' to 'Z': c = c + 32; - 202, 204, 212, 214, 221: c--; - 217, 218: c = c - 2; - 158 to 160, 167 to 169, 208 to 210: c = c - 3; - 186 to 190, 196 to 200: c = c - 5 ; - 175 to 180: c = c - 6; + 'A' to 'Z': c = c + 32; + 202, 204, 212, 214, 221: c--; + 217, 218: c = c - 2; + 158 to 160, 167 to 168, 208 to 210: c = c - 3; + 186 to 190, 196 to 200: c = c - 5 ; + 175 to 180: c = c - 6; } return c; ]; [ VM_LowerToUpperCase c; switch (c) { - 'a' to 'z': c = c - 32; - 201, 203, 211, 213, 220: c++; - 215, 216: c = c + 2; - 155 to 157, 164 to 166, 205 to 207: c = c + 3; - 181 to 185, 191 to 195: c = c + 5 ; - 169 to 174: c = c + 6; + 'a' to 'z': c = c - 32; + 201, 203, 211, 213, 220: c++; + 215, 216: c = c + 2; + 155 to 157, 164 to 165, 205 to 207: c = c + 3; + 181 to 185, 191 to 195: c = c + 5 ; + 169 to 174: c = c + 6; } return c; ]; diff --git a/retrospective/6M62/Syntax.preform b/retrospective/6M62/Internal/Languages/English/Syntax.preform similarity index 100% rename from retrospective/6M62/Syntax.preform rename to retrospective/6M62/Internal/Languages/English/Syntax.preform diff --git a/retrospective/6M62/Outcome Pages/failed.html b/retrospective/6M62/Outcome Pages/failed.html new file mode 100644 index 000000000..63d7c7383 --- /dev/null +++ b/retrospective/6M62/Outcome Pages/failed.html @@ -0,0 +1,8 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"></head> +<body><font *4 size=2><b>Translating the Source - *3</b> +<p> +*2 +<p> +<center><b>Sorry for the inconvenience.</b></center> +</html> diff --git a/retrospective/6M62/Outcome Pages/pl404.html b/retrospective/6M62/Outcome Pages/pl404.html new file mode 100644 index 000000000..d45ce5d5f --- /dev/null +++ b/retrospective/6M62/Outcome Pages/pl404.html @@ -0,0 +1,491 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Extensions + + + + + +
+
+
The Public Library: Disconnected
+
Extensions shared by Inform users at www.inform7.com
+
+ +
+ +

This tab normally holds a public library of extensions shared by Inform authors, but right now it's disconnected.

+

It's possible that the Inform website is down, and if so then our apologies: please try again later.

+

It's possible that your computer is not currently connected to the Internet, and if so, please try again when you're back online.

+

Though this is less likely, it's also possible that you're behind a firewall which is for some reason blocking the traffic. But since Inform is only making a regular Internet connection, not using an unusual port, it's more likely to be for one of the reasons above.

+
+
+ + diff --git a/retrospective/6M62/Outcome Pages/released.html b/retrospective/6M62/Outcome Pages/released.html new file mode 100644 index 000000000..71582c0e6 --- /dev/null +++ b/retrospective/6M62/Outcome Pages/released.html @@ -0,0 +1,7 @@ + + +Packaging up for Release - *3 +

+*2 +

+ diff --git a/retrospective/6M62/Outcome Pages/rtp.html b/retrospective/6M62/Outcome Pages/rtp.html new file mode 100644 index 000000000..604e8664d --- /dev/null +++ b/retrospective/6M62/Outcome Pages/rtp.html @@ -0,0 +1,54 @@ + + + +Run-time problem + + + +
+
+
Run-Time Problem
+
*3 (*1)
+
+ +
+ +     +

+

Most problems are detected when Inform translates the source text, but this is one of the exceptions, a "run-time problem" which emerges only during play.

+
+

*2

+
+ + diff --git a/retrospective/6M62/Outcome Pages/texts.txt b/retrospective/6M62/Outcome Pages/texts.txt new file mode 100644 index 000000000..482882f8d --- /dev/null +++ b/retrospective/6M62/Outcome Pages/texts.txt @@ -0,0 +1,340 @@ +# First, the run-time problem message pages. + +model = rtp.html + +--> P1 - Backdrop movements are limited +You tried to move a backdrop to a specific place or item. Backdrops can, in principle, begin play in any combination of the rooms, and most backdrops never move at all - they are like a fixed painted backcloth in a stage set. If they do move, the restriction is that they can only move to single regions, and that restriction seems to have been broken here. + +--> P2 - Doors cannot be moved in play +The ability to change map connections during play is quite constrained, and although the "change ... exit of ... to ..." phrase exists, it should only be used as a last resort. (Better to apply rules which cause the map not to be followed than to actually alter the map, is the idea.) In particular, doors must not be disturbed at all, and here you tried to change an exit which led through a door: this is not allowed. + +--> P3 - Unable to change map connection +The ability to change map connections during play is quite constrained, and although the "change ... exit of ... to ..." phrase exists, it should only be used as a last resort. (Better to apply rules which cause the map not to be followed than to actually alter the map, is the idea.) In principle any exit which does not lead to a door can be changed, but here there seems not to have been exit to change. + +--> P4 - Only people can play +Although Inform allows us to change the identity of the protagonist - the person through which the simulated world is seen and acted upon - only things of the kind "person" can be protagonists. Here, you seem to have tried to change the player to something which is not a "person". + +--> P5 - Relations cannot be used outside their defined roles +When a relation is defined, it has to say which objects are allowed to be related: for instance, "Propinquity relates various rooms to various rooms" indicates that both of the objects involved in the relation must be rooms. It would make no sense to declare that a container and a person now satisfy the relation, and the attempt would be rejected by a run-time problem like this one. +

+More is true: it is not even allowed to test the relation for objects which do not meet its qualifications. So if we define the adjective "homely" to refer to any room which satisfies the propinquity relation with a special room called "Home Base", say, then we are allowed to "say the list of homely rooms" but not to "say the list of homely things". + +--> P6 - Too many procedural rules +When a procedural rule changes the behaviour of the standing rulebooks, the story file has to make a note of the change. If enough rules act at once, it runs out of space in which to keep these notes: that seems to have happened here. The situation is simply too complicated. + +--> P7 - Too many rulebooks +There is no limit to the number of rulebooks which can exist in a given work, and there are typically several hundred. However, only 20 can be active at any given moment. +

+Rulebooks typically pile up when the rules governing one action call for another action to take place first, since action-processing is the most intensive use for rulebooks. If the limit is hit, this is usually a symptom of a circularity mistake - where an action is directly or indirectly duplicating itself. For instance, "Before going north, try going north." has this effect. + +--> P8 - Too many timed events at once +Timed events can be set off with phrases such as "Krakatoa explodes at 11:12 PM". Each such decision requires the story file to make a note of what will be required, and eventually the space for these notes runs out. The limit is set so that twice as many appointments can be pending at once as there are events, so if all else fails, you can make more space by creating more events. + +--> P9 - Non-existent property +This run-time problem is not often seen, and is probably a symptom of something more peculiar having happened - if there have been earlier run-time problems in the same run, fix those first. +

+You appear to have tried to read or write a property. Properties are identified internally by a code number, but the code number you tried to use is one that does not seem to exist. + +--> P10 - Non-existent property +Not everything has every property. For instance, a "room" cannot have the property "carrying capacity": it would not mean anything. Generally speaking, the properties available to something are specified by its kind. If we say that "A room has a number called maximum population." then the property "maximum population" is available to any room. This applies to either/or properties as well: you might say that a room is not "transparent", but Inform takes the firm line that we cannot even ask, because it is meaningless for a room to be either "transparent" or "opaque". +

+So, anyway, here it seems that you have tried to access a property for something not allowed to have it. + +--> P11 - Never-set property +It sometimes happens that - although something could in principle have a given property - in fact it doesn't. That makes it impossible to use. +

+For instance, although every "thing" is allowed to have a "description" property, it will only be given one if the source text says so explicitly. That makes writing "the description of the noun" (say) a little chancy, because it assumes the noun will be a thing which has a description - which might not always be true. If you would like to make sure everything does have a description property, you can always write a sentence like "The description of a thing is usually 'Dull.'." + +--> P12 - Too many activities at once +There is no limit to the number of activities in a work - in most works there are around two dozen built-in activities and perhaps one or two others - but only 25 can be simultaneously going on. In practice this is a generous limit and the most likely cause of breaking it is circularity mistake - where an activity is directly or indirectly duplicating itself. + +--> P13 - Can't abandon activity +Activities normally start, work through their business and end automatically, and for those activities this problem should never be seen. But it is possible to control their mechanism manually, so to speak, with phrases like "begin the analysing activity with the pitchblende" and "end the analysing activity with the pitchblende". A further mechanism exists to abandon an activity partway. That seems to have been tried on an activity which was not, in fact, going on - a rare problem, but which probably arises because of a mistake in running an activity manually. + +--> P14 - Can't end activity +Activities normally start, work through their business and end automatically, and for those activities this problem should never be seen. But it is possible to control their mechanism manually, so to speak, with phrases like "begin the analysing activity with the pitchblende" and "end the analysing activity with the pitchblende". +

+Here an "end" seems to have been forced on an activity which was not, in fact, going on - this probably arises because of a mistake in running an activity manually. + +--> P15 - Can't move nothing +This problem occurs if a phrase tries to move something which does not exist. +

+The most likely way for this to occur is if a plausible name has been given to what is, most of the time, indeed a genuine thing - but not always. For instance, if we say "let the heroine be the tallest woman in the Amphitheatre", supposing that we have defined "tall" and made such a place, then we might expect that "move the heroine to the Arena" would always work. In fact it would fail if there were no women in the Amphitheatre at the time we tried to set "heroine", and this is the problem message which would appear. + +--> P16 - Can't remove nothing +This problem occurs if a phrase tries to remove something from play which does not exist. +

+The most likely way for this to occur is if a plausible name has been given to what is, most of the time, indeed a genuine thing - but not always. For instance, if we say "let the heroine be the tallest woman in the Amphitheatre", supposing that we have defined "tall" and made such a place, then we might expect that "remove the heroine from play" would always work. In fact it would fail if there were no women in the Amphitheatre at the time we tried to set "heroine", and this is the problem message which would appear. + +--> P17 - Can't divide by zero +A number cannot be divided by 0: similarly, we cannot take the remainder after dividing something by 0. + +--> P18 - Tried to access property for bad value +When values are defined using a table, the columns of that table become properties. For instance, if the table defines colours and there is a column called "wavelength", it then becomes legal to talk about "the wavelength of blue" (supposing that "blue" is one of colours defined). +

+Here, an attempt has been made to read or write such a property for something which cannot possibly be a qualifying value - for instance, "the wavelength of -21" would be such a case, though many such mistakes are rejected at translation time rather than now. + +--> P19 - Only backdrops can be moved to regions +Regions combine a number of rooms under a single name. That means that to be moved to a region would mean being inside all of those rooms simultaneously, and only objects of the kind "backdrop" are allowed to be multiply-present like this. (If you already knew this, then the problem is probably that you forgot to make it a backdrop.) + +--> P20 - Attempt to look up a non-existent column in the table +Suppose there are two tables, the "Table of Fruits" and the "Table of Fowls", and suppose that the former has a column called "seeds". Inform will (mostly) translate a request to talk about the "seeds entry" in a row of the "Table of Fowls", but such a request can't make sense: the other table has the "seeds" column but this one doesn't. This problem will be detected at run-time, and this is the message which then appears. + +--> P21 - Attempt to look up a non-existent correspondence in table +This problem is probably the one most often seen when dealing with tables, and is usually a symptom that one has forgotten to worry about an unlikely case. It happens when, for instance, we look up "the fruit corresponding to a seed count of 10 in the Table of Fruits" but the value 10 never occurs in any row of that table, so that there is no such fruit. If we don't know for certain that this won't happen, we can always check by testing "if there is a fruit corresponding to a seed count of 10 in the Table of Fruits". + +--> P22 - Attempt to look up a non-existent row in table +This is a straightforward problem: you tried to look up a row which didn't exist. For instance, if there are three rows, then an attempt to look up an entry on row 4 will produce this problem. (What may be a little less straightforward is that the problem doesn't show itself when you choose a row, only when you make use of it.) + +--> P23 - Attempt to look up a non-existent entry in table +Inform allows us to create tables with blank entries, having no value at all: sometimes these are written "--", but sometimes they are literally left blank in the original source text. We are not allowed to read such an entry, and this is the problem which turns up if we do. (Whereas we are allowed to write to it, making it no longer blank if we do.) + +--> P24 - Attempt to blank out a row from a non-existent table +This is one of the most difficult run-time problems to achieve, so perhaps congratulations are in order. I think you must have set up some sort of indirect code to operate on arbitrary tables, then got that wrong so that it tried to act on an illegal value for the identity of the table (the value is printed in numerical form in the message opposite), then tried to blank out one of its rows. + +--> P25 - Attempt to choose a blank row in a table with none left +Inform allows us to create tables with one or more blank rows to be filled in during the course of play. In any given table the number of blank rows can go down (if we write to an entry on a blank row, it is no longer blank) or up (if we blank out an existing non-blank row), but it will certainly be limited. So if we go on trying to choose blank rows and filling them in, we will eventually run out. This is the run-time problem which announces that. +

+In particular, of course, you would see this message if you tried to choose a blank row in a table which never had any blank rows to start with. + +--> P26 - Attempt to choose a random row in an entirely blank table +Inform allows us to create tables with one or more blank rows to be filled in during the course of play. Blank rows effectively don't exist when it comes to reading information, so the choice of a random row always excludes them. As a result it will fail if every row in the table is blank, and that is what has happened here. +

+Typically this happens if you have, say, a table containing details of some randomised events which can happen in the course of play: when you want one to happen, you choose a random row and act on what's in it; to make sure the same event will never happen again, you blank that row out. If you have 10 different events, but call upon this process 11 times, then on the 11th time the table will be entirely blank and this problem will turn up. You can guard against this with a test such as "if the number of filled rows in the Table of Incidents is not 0, ..." + +--> P27 - Attempt to sort a table whose ordering must remain fixed +Most tables can be sorted freely, but those which are used to define a kind of value cannot. This is because they are used internally to store the properties belonging to those values, and in such a way that if the rows were rearranged, the properties would also be rearranged - and chaos would ensue. So, such tables are protected from sorting by this run-time problem message. + +--> P28 - Attempt to test "in ..." for a non-room or region +The special condition "in R" can only be used if R is a room or a region, and it tests whether the current location of play is that room (or in that region). So it makes no sense for R to be some other kind of thing. This mistake tends to occur because the author assumes that something else is implicitly meant rather than the current location - for instance, one might write "if in player, ..." thinking that this meant some item currently under discussion: in which case the current run-time problem will occur with "yourself" as the thing which isn't a rule or region. + +--> P29 - Attempt to match against a non-topic +The tests 'matches' and 'does not match' can only be used when a snippet is compared with a topic. Topics look like text, being written in double-quotes, but in fact Inform stores them completely differently, and it's important not to mix them up. For instance, if double-quoted text appears in a table column called 'topic', then it'll be a topic: otherwise it will just be plain text. + +--> P30 - Attempt to find routes through an implicit relation +Finding the best route through a relation, or counting the number of steps from one thing to another in the sense of a given relation, is not allowed for relations which are hard-wired into the spatial structure used by Inform (things such as containment or support), or for relations defined explicitly by conditions. It's only allowed for relations created in your own source text and which you can set and unset at will. + +--> P31 - Attempt to use a property of nothing +The special value "nothing" is used to mean no object at all, and sometimes appears where an object might be expected if it was impossible to find a genuine object, or no genuine object was specified. +

+"Nothing" is not an object in its own right, and so it makes no sense to look at its properties. + +--> P32 - Wrong kind of thing in decide on +When we write a phrase 'To decide which K is ...', where K is a kind such as "door" or "room", say, any use of 'decide on X' inside the definition of that phrase must result in X being the appropriate kind of thing. Here, X turned out to be an object, but an object of the wrong kind. + +--> P33 - Can't decide on nothing +When we write a phrase 'To decide which K is ...', where K is a kind such as "door" or "room", say, any use of 'decide on X' inside the definition of that phrase must result in X being the appropriate kind of thing. Here, X turned out to be "nothing", which is not an object at all. While this can be used for something of kind "object", it otherwise can't be used. + +--> P34 - Attempt to save a table to a file whose data is unstable +Some of what is stored in tables is solid information whose meaning never changes: the number 342, for instance, means the same to everyone. Unfortunately, other information is stored in a way which depends entirely on the current location of certain structures in memory: for instance, a rule is internally referred to by its memory location. This location changes every time the game is translated, and so it is not possible to pass it from one copy to another, or from one project to another. The only tables which Inform allows us to save into files are those only containing safe data: numbers, units, times of day and kinds of value with named alternatives. Text, in particular, is not allowed, and nor are scenes, rules or rulebooks. + +--> P35 - File being read has too many rows or columns to fit into table +The contents of tables can be saved into disc files and subsequently loaded in again, perhaps on a different run, or even into the same table but in a different project. Here, I tried to load in such a file, but it contained more rows or columns than the total number available in the table which was supposed to hold it. + +--> P36 - File being read is not a previously saved table +The contents of tables can be saved into disc files and subsequently loaded in again, perhaps on a different run, or even into the same table but in a different project. Here, I tried to load in such a file, but it turned out not to be that sort of file at all - it had not previously been saved from a table. + +--> P37 - Low level error +This indicates that some low-level error has occurred in the template layer, a body of Inform 6 code used to provide run-time support for Inform 7 story files. Errors like this really shouldn't happen, but might occur if you are hacking with the template layer, or if there is a bug in Inform. If you don't seem to be doing anything you shouldn't, please report this to the authors of Inform as a possible bug. + +--> P38 - Attempt to ignore the turn sequence rules +Using a procedural rule to ignore the turn sequence rulebook would cause the story file to hang, that is, to remain indefinitely in an unresponsive state. (This wasn't always true: until February 2008, the turn sequence rules did not include command parsing and action generation, so that a form of play could continue even without the turn sequence rulebook. Now, however, more delicate control is needed to achieve such effects: usually putting new rules into the turn sequence rulebook at strategic points to end it early.) + +--> P39 - Attempt to say a snippet value which is currently invalid +A snippet is a fragment of the player's current command, but it does not record the actual text: instead, it notes only the word numbers. (Thus in TAKE ME TO THE RIVER, a snippet would be words 2 to 4 rather than the text "ME TO THE".) Snippets go out of date as soon as a new command has come along, so shouldn't be kept in longer-term storage. At any rate, the one you've just tried to say goes outside the range of the current command, so it can't be right. + +--> P40 - Attempt to splice a snippet value which is currently invalid +A snippet is a fragment of the player's current command, but it does not record the actual text: instead, it notes only the word numbers. (Thus in TAKE ME TO THE RIVER, a snippet would be words 2 to 4 rather than the text "ME TO THE".) Snippets go out of date as soon as a new command has come along, so shouldn't be kept in longer-term storage. At any rate, the one you've just tried to splice with fresh text goes outside the range of the current command, so it can't be right. + +--> P41 - Attempt to match a snippet value which is currently invalid +A snippet is a fragment of the player's current command, but it does not record the actual text: instead, it notes only the word numbers. (Thus in TAKE ME TO THE RIVER, a snippet would be words 2 to 4 rather than the text "ME TO THE".) Snippets go out of date as soon as a new command has come along, so shouldn't be kept in longer-term storage. At any rate, the one you've just tried to match against goes outside the range of the current command, so it can't be right. + +--> P42 - The list-writer has run out of memory +The list-writer is the mechanism which prints lists of objects, for instance from the text substitution "[list of open doors]" or as part of a room description. It has enough memory to cope with lists holding every object there is, plus a little more besides, but if you try to print a list where every term for some reason lists substantial further lists as part of its own text, it's possible to overwhelm the list-writer. That seems to have happened here: sorry. + +--> P43 - Attempt to remove the player from play +The player must always be at least indirectly in one of the rooms, so cannot be removed from play and into limbo. + +--> P44 - Attempt to remove a door from play +Doors are part of the fixed geography of the model world, and are tied in to the map, so it is illegal to remove them from play. (Of course rules can be used to simulate the absence of a door, or to change its behaviour almost completely.) + +--> P45 - Attempt to change the player to a person off-stage +The player must always be on-stage, more or less by definition, so cannot be changed to someone who is currently off-stage. + +--> P46 - The memory stack is exhausted +The memory stack is used to store action, activity and rulebook variables, and now it has been exhausted. This must be because too complicated a combination of rulebooks (and actions) are all active at once: the story file is simply trying to do too much. + +--> P47 - Phrase applied to an incompatible kind of value +When Inform is given one or more definitions for a phrase, and it is not clear in advance that these definitions apply to a particular situation, it has to check this during play. If it turns out that none of the available definitions can apply, this run-time problem is generated. +

+For instance, suppose the source defines: "To greet (M - a man): ..." and also "To greet (W - a woman): ...", and also says: "Before kissing someone (called the partner), greet the partner." And suppose the player then does something which the author didn't expect, by typing KISS FELIX, where Felix is a cat (an object of kind "person", but neither a "man" nor a "woman"). Inform is then unable to apply "greet" correctly because neither definition can be applied to Felix's kind. + +--> P48 - Error handling external file +Interactive fiction is generally handled by a virtual machine, a special computer provided in software which operates in its own closed little world. The Z-machine family of virtual machines does not provide access to external files at all; the Glulx VM does, but of course many things can go wrong. Perhaps a given file cannot be found, or perhaps the VM attempts to write to a file held open by another application, or perhaps the host computer runs out of disc space. + +--> P49 - Memory allocation proved impossible +Memory is constantly being allocated and deallocated, as needed, to store indexed text, lists and other values which can stretch to contain large amounts of data. If you see this problem, then the story file has needed more memory at once than was available.

For projects running the Z-machine, there is only a predetermined amount of memory that can be used; you can raise this with the "Use dynamic memory allocation of at least N" option, but only until there's no more space in the Z-machine, which doesn't take long. On Glulx the situation is better: if a version of Glulx from around 2007 or later is used, then memory can be dynamically grown during play - this happens automatically - and even if not, the "dynamic memory allocation" setting can be made very large indeed if needed. + +--> P50 - Attempt to use list item which does not exist +This is fairly self-explanatory. The problem might occur if we tried to insert something after item 10 in a list which only contains six items, for instance, or to remove the value 230 from a list of numbers which does not contain 230 anywhere. + +--> P51 - Syntax error in regular expression +Regular expressions are concise, usually finely-honed texts which use a special notation to specify what to search for when looking through other text. The notation is quite a difficult one to learn, and it's very easy even for experts to make mistakes by writing something which does not make sense - that is, to write a regular expression which is meaningless, and so can't be searched for. That's what seems to have happened here. + +--> P52 - This interpreter does not support Unicode +You probably won't see this text, because the Inform user interfaces contain copies of the glulxe, the Glulx interpreter, which do indeed support Unicode. Anyway, the story file wants to use Unicode characters or manipulate indexed text, but can't because Unicode isn't available on what must be an out of date copy of the glulxe/glk interpreter. + +--> P53 - Only backdrops can be moved to multiple places +Most objects can only be in one room at a time. The only exceptions are two-sided doors (which are never allowed to move), and backdrops. A backdrop can be moved to occupy all rooms matching a given description, but nothing else can. + +--> P54 - Only things can be moved +Most everyday items in an Inform work are "things" - which includes people, containers, vehicles and so on. Those can all move around, at least in theory. The other kinds of object - such as "room", "region" and "direction" - do not represent portable items, and so can't be moved. An attempt to move them with a line like "now the Mirror Room is in Versailles" will cause this problem message. + +--> P55 - The scene hasn't started, so you can't ask when it did +Suppose there is a scene called "Second Stage". Asking for "the time when Second Stage began" or "the time since Second Stage began" only makes sense if Second Stage has happened (or is happening now). This problem turns up if you ask such questions about a scene which hasn't happened. It's easy to test for this: for instance, "if Second Stage has happened and the time since Second Stage began is more than five minutes..." + +--> P56 - The scene hasn't ended, so you can't ask when it did +Suppose there is a scene called "Second Stage". Asking for "the time when Second Stage ended" or "the time since Second Stage ended" only makes sense if Second Stage has taken place. It's easy to test for this: for instance, "if Second Stage has ended and the time since Second Stage ended is more than five minutes..." + +--> P57 - You can't take the square root of a negative number +Inform's "square root of..." phrase can only take the square root of 0 or a positive number. Although mathematicians are able to invent imaginary numbers, making sense out of square roots of negative numbers, Inform doesn't do this. There just isn't an Inform "number" which squares to give -1, so it cannot possibly produce a result of "the square root of -1". + +--> P58 - Attempt to repeat through a table in a tricky column order +It's very convenient to use 'repeat through T in C order', where C is a column in the table T, but this isn't very efficient - it runs quite slowly, in fact, especially if the table has many rows. The problem isn't usually too bad, if the data stored in the column is simple (numbers, for instance), but it becomes chronic if there are indexed texts, lists or other exotica there. +

+The secret is to sort the table first, which is much more efficient, and then repeat through it. For example, instead of "repeat through the Table of Responses in customised quip order", first "sort the Table of Responses in customised quip order" and then just "repeat through the Table of Responses". + +--> P59 - You can't implicitly repeat through the values of this kind +With some kinds of value, like scenes, you can easily repeat through all possibilities at run-time: there are only a small number of them, and their values are easy to work out and put into a sensible order. With others, either there are too many (this is why repeating through numbers or texts can't be done) or they have no sensible order (this is why repeating through rules can't be done). You can see which kinds can be repeated through on the Kinds index page. +

+Inform tries to catch this mistake when translating the source text if possible, but sometimes it isn't possible, and this problem message is the result. + +--> P60 - Attempt to set a variable to the wrong kind of object +Suppose we write "The favourite place is a room that varies.", and then during play "now the favourite place is X", where X is some value. If Inform can tell in advance that X can't be a room, it will produce a Problem message and refuse to translate the source. But sometimes it can't tell in advance, because Inform only knows that X will be an object - which might or might not be a room. When that happens, it has to check at run-time (now!) to make sure. That's the check which has just failed for a variable of yours. + +--> P61 - Attempt to move the player off-stage +The player always has to be inside some room, though sometimes indirectly so - for example, it's okay for the player to be on a table inside a room, or in a box on that table. But it's not okay (for example) to write "now the player is on the oak table" and then "now the oak table is nowhere". + +--> P62 - Tried to change a relation for objects with the wrong kinds +For example, if you defined "Application relates various devices to one thing. The verb to be applied to implies the application relation.", and then wrote "now Peter is applied to the spoon", you might see this problem because Peter is a man and not a device. If you wrote "now the sonic screwdriver is applied to the Dalek Base", you might see this because the Dalek Base is a room and not a thing. + +--> P63 - Tried to make the player part of something +The player is not allowed to be joined to other physical objects by being "part of" them, so it's not legal to try something like "now the player is part of the Oak Tree" or "now the player is the branch" (if the branch is indeed a person which is part of the Oak Tree). + +--> P64 - This use of '[text]' is too complicated +The '[text]' token in Inform's grammar for 'Understand' has limitations. It has to be followed by a fixed wording, or be at the end of the line, in order to match. If you're seeing this as a run-time problem, you've probably done something cunningly indirect, but you've run into the problem all the same. + +--> P65 - Attempt to access an entry from a non-existent table +At present, no table row is selected, so it makes no sense to talk about any of its entries. + +--> P66 - This change of the relation's nature is impossible in play +When a relation is created during play, it is usually created with a specific nature - for example, 'let R be a one-to-one relation of vehicles'. If none is given, it will be 'various-to-various'. This can't usually be changed once set, so this problem probably means you've tried to set the nature of the same relation more than once. + +--> P67 - This operation can't be done with the relation +Some of the built-in relations are so general in their scope that it's not practical to use techniques like searching through possible relationships, or changing relationships, with them. This is one such relation. + +--> P68 - Attempt to resize list to negative size +A list can only have 0 or more items, so writing something like 'change L to have -2 entries' doesn't make any sense. + +--> P69 - You can't test whether something is adjacent to a region +The adjacency relation can only be tested for rooms, not whole regions at a time. + +# And now the pages which the application shows in response to various +# contingencies. + +--> Error0 - Failed +The application ran your source text through the Inform 7 compiler, as usual, but the compiler unexpectedly failed. This should not happen even if your source text is gibberish, so you may have uncovered a bug in the program. +

+This seems to be an unusual case, because the failure code is not one which has ever been observed in Inform's testing process, so it is difficult to give advice. Still, further details may be visible on the console output in the Console tab. +

+The best option now is probably to reword whatever was last changed and to try again. Subsequent attempts will not be affected by the failure of this one, so there is nothing to be gained by restarting the application or the computer. A failed run should never damage the source text, so your work cannot be lost. +

+If you think it likely that the Inform 7 compiler is at fault, please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). If you think the fault may be due to a problem in an extension you're using, then please contact the extension's author directly. + +model = failed.html + +--> Error2 - Failed +The application ran your source text through the Inform 7 compiler, as usual, but the compiler unexpectedly failed. This should not happen even if your source text is gibberish, so you may have uncovered a bug in the program. +

+When a program like the I7 compiler fails, it typically returns an error number: this time, the number was 2, so I7 probably stopped because of a fatal file-system error. +

+It is very unlikely that your computer is at fault. More likely causes are: +

+

  • disc space running out on the volume holding the project;
  • +
  • trying to run a project from a read-only volume, such as a burned CD or DVD;
  • +
  • trying to run a project which belongs to another user, whose files you have no permission to alter.
+ +

+However, if you think it more likely that the Inform 7 compiler is at fault, please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). + +--> Error10 - Failed +The application ran your source text through the Inform 7 compiler, as usual, but the compiler unexpectedly failed. This should not happen even if your source text is gibberish, so you may have uncovered a bug in the program. +

+When a program like the I7 compiler fails, it typically returns an error number: this time, the number was 10, and that probably indicates that the compiler failed to manage its data structures properly. Perhaps you created a complicated situation on which it has not been fully tested. +

+The best option now is probably to reword whatever was last changed and to try again. Subsequent attempts will not be affected by the failure of this one, so there is nothing to be gained by restarting the application or the computer. A failed run should never damage the source text, so your work cannot be lost. +

+If you think it likely that the Inform 7 compiler is at fault, please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). If you think the fault may be due to a problem in an extension you're using, then please contact the extension's author directly. + +--> Error11 - Failed +The application ran your source text through the Inform 7 compiler, as usual, but the compiler unexpectedly failed. This should not happen even if your source text is gibberish, so you may have uncovered a bug in the program. +

+When a program like the I7 compiler fails, it typically returns an error number: this time, the number was 11, and that probably indicates that the compiler failed to manage its data structures properly. Perhaps you created a complicated situation on which it has not been fully tested. +

+The best option now is probably to reword whatever was last changed and to try again. Subsequent attempts will not be affected by the failure of this one, so there is nothing to be gained by restarting the application or the computer. A failed run should never damage the source text, so your work cannot be lost. +

+If you think it likely that the Inform 7 compiler is at fault, please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). If you think the fault may be due to a problem in an extension you're using, then please contact the extension's author directly. + +--> ErrorI6 - Failed +The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source. Something must have gone wrong all the same, because the second stage of the process - using the Inform 6 compiler to turn this translated source into a viable story file - turned up errors. This should not happen. The errors are written out on the Console tab, but will only make sense to experienced Inform 6 users (if even to them). +

+The best option now is probably to reword whatever was last changed and to try again. Subsequent attempts will not be affected by the failure of this one, so there is nothing to be gained by restarting the application or the computer. A failed run should never damage the source text, so your work cannot be lost. +

+If you are using Inform 6 inclusions, these are the most likely culprits. You might be using these without realising it if you are including an extension which contains Inform 6 inclusions in order to work its magic: so if the problem only seems to occur when a particular extension is in use, then that is probably what is at fault, and you should contact the extension's author directly. +

+If not, then most likely the Inform 7 compiler is at fault. Please check that you have the currently distributed build of the system: if you have, please consider taking the time to fill out a bug report at the Inform bug tracker (www.inform7.com/bugs). + +--> ErrorI6MemorySetting - Inform 6 ran out of memory +The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source as far as a sort of intermediate-level code - a program for Inform 6, which would ordinarily then be used to make the final working IF. +

+Unfortunately, the program must have been too demanding for Inform 6 to handle, because it reported that one of its memory settings had been broken. These are upper limits, usually on the number of things of a particular sort which can be created, or on the amount of memory available for a given purpose. +

+To get around this, look at the actual output produced by Inform 6 to see which memory setting was broken. For instance, suppose it said: +

+

The memory setting MAX_PROP_TABLE_SIZE (which is 30000 at present) has been exceeded.
+

+You then need to amend your Inform 7 source text to take account of this, by adding a sentence like the following: +

+

Use MAX_PROP_TABLE_SIZE of 50000.
+

+With sentences like this, you can make Inform 6 raise its limits until there's no longer any problem: see Chapter 2 of the documentation. + +--> ErrorI6Readable - Out of Readable Memory +The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source. This process results in what's called a "story file", which is a program for a small virtual computer. Unfortunately, the story file for this source text broke a fundamental limit in this virtual computer: the maximum space available for "readable memory", which really means the space available in which to store tables, rulebooks, things, rooms and dictionary words. +

+Inform can produce story files for several different virtual computers, and the one used by the current project can be selected using the Settings panel. If you are currently using the "Z-machine" format, try switching the project to "Glulx" format (you can make this change at the Settings panel), and limits like this will probably not bother you again. Although Z-machine story files used to be much more widely playable than Glulx ones, these days Glulx interpreters are widely available, so it's probably not worth making big sacrifices to stay within the Z-machine memory size. + +--> ErrorI6TooBig - Ran Out of Space +The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source. This process results in what's called a "story file", which is a program for a small virtual computer. Unfortunately, the story file for this source text was too big for that virtual machine: there's just too much of it. +

+Inform can produce story files for several different virtual computers, and the one used by the current project can be selected using the Settings panel. If you are currently using the "Z-machine" format, try switching the project to "Glulx" format (you can make this change at the Settings panel), and limits like this will probably not bother you again. Although Z-machine story files used to be much more widely playable than Glulx ones, these days Glulx interpreters are widely available, so it's probably not worth making big sacrifices to stay within the Z-machine memory size. + +# And finally the pages showing the result of cblorb, on a Release run. + +model = released.html + +--> ErrorCblorb - Failed +The application ran your source text through the Inform 7 compiler, as usual, and then manufactured the final story file using Inform 6: all of this worked fine. However, the "cblorb" packaging tool then failed to make the actual release of the data out of your project. Its errors are written out on the Console tab. +

+

+

+This almost never happens in normal usage, and is almost certainly the result of a "Release along with..." sentence in the source having asked to do something impossible. For instance, an attempt to release along with cover art will fail if there's no cover art provided, or it has the wrong filename or is in the wrong place. So the best thing to do is probably to look carefully at any Release instructions in the source, and check them against the documentation. + +--> GoodCblorb - Succeeded +The source text was successfully translated to produce the story file, and the "cblorb" packaging tool was then used to wrap it up into a Blorb archive, the standard run-time format produced by Inform. +

+

+

+In the same way that books in many different languages nevertheless have the same kind of binding, the Blorb wrapper can contain story files of several different story file formats (for instance, versions of Glulx or the Z-machine): see Chapter 2 of the Inform documentation. +

+Many modern interpreters can play Blorbed story files, but a few older ones cannot; besides, you might need a raw story file for use on a small portable device with very little memory. If you do need to avoid Blorbing, go to the Settings panel for the project and untick the "Create a Blorb archive for release" box, then release again. The result will be just a bare story file, and none of the advanced release options (solutions, website, cover art, etc.) will be possible. The bibliographic data will also be lost. diff --git a/retrospective/makefile b/retrospective/makefile index c547c0748..e799d6a4d 100644 --- a/retrospective/makefile +++ b/retrospective/makefile @@ -24,15 +24,15 @@ GLULXEOS = OS_UNIX .PHONY: all -all: retrospective/6L02/cBlorb retrospective/6L02/ni retrospective/6L30/cBlorb retrospective/6L30/ni retrospective/6M62/cBlorb retrospective/6M62/ni +all: retrospective/6L02/cBlorb retrospective/6L02/ni retrospective/6L38/cBlorb retrospective/6L38/ni retrospective/6M62/cBlorb retrospective/6M62/ni retrospective/6L02/cBlorb: $(INDULGENTCC) -o retrospective/6L02/cBlorb.o retrospective/6L02/cBlorb.c $(LINK) -o retrospective/6L02/cBlorb retrospective/6L02/cBlorb.o $(LINKEROPTS) -retrospective/6L30/cBlorb: - $(INDULGENTCC) -o retrospective/6L30/cBlorb.o retrospective/6L30/cBlorb.c - $(LINK) -o retrospective/6L30/cBlorb retrospective/6L30/cBlorb.o $(LINKEROPTS) +retrospective/6L38/cBlorb: + $(INDULGENTCC) -o retrospective/6L38/cBlorb.o retrospective/6L38/cBlorb.c + $(LINK) -o retrospective/6L38/cBlorb retrospective/6L38/cBlorb.o $(LINKEROPTS) retrospective/6M62/cBlorb: $(INDULGENTCC) -o retrospective/6M62/cBlorb.o retrospective/6M62/cBlorb.c @@ -42,9 +42,9 @@ retrospective/6L02/ni: $(INDULGENTCC) -o retrospective/6L02/ni.o retrospective/6L02/ni.c $(LINK) -o retrospective/6L02/ni retrospective/6L02/ni.o $(LINKEROPTS) -retrospective/6L30/ni: - $(INDULGENTCC) -o retrospective/6L30/ni.o retrospective/6L30/ni.c - $(LINK) -o retrospective/6L30/ni retrospective/6L30/ni.o $(LINKEROPTS) +retrospective/6L38/ni: + $(INDULGENTCC) -o retrospective/6L38/ni.o retrospective/6L38/ni.c + $(LINK) -o retrospective/6L38/ni retrospective/6L38/ni.o $(LINKEROPTS) retrospective/6M62/ni: $(INDULGENTCC) -o retrospective/6M62/ni.o retrospective/6M62/ni.c diff --git a/retrospective/makescript.txt b/retrospective/makescript.txt index 9c014ff8b..e3f4c8169 100644 --- a/retrospective/makescript.txt +++ b/retrospective/makescript.txt @@ -2,15 +2,15 @@ .PHONY: all -all: retrospective/6L02/cBlorb retrospective/6L02/ni retrospective/6L30/cBlorb retrospective/6L30/ni retrospective/6M62/cBlorb retrospective/6M62/ni +all: retrospective/6L02/cBlorb retrospective/6L02/ni retrospective/6L38/cBlorb retrospective/6L38/ni retrospective/6M62/cBlorb retrospective/6M62/ni retrospective/6L02/cBlorb: $(INDULGENTCC) -o retrospective/6L02/cBlorb.o retrospective/6L02/cBlorb.c $(LINK) -o retrospective/6L02/cBlorb retrospective/6L02/cBlorb.o $(LINKEROPTS) -retrospective/6L30/cBlorb: - $(INDULGENTCC) -o retrospective/6L30/cBlorb.o retrospective/6L30/cBlorb.c - $(LINK) -o retrospective/6L30/cBlorb retrospective/6L30/cBlorb.o $(LINKEROPTS) +retrospective/6L38/cBlorb: + $(INDULGENTCC) -o retrospective/6L38/cBlorb.o retrospective/6L38/cBlorb.c + $(LINK) -o retrospective/6L38/cBlorb retrospective/6L38/cBlorb.o $(LINKEROPTS) retrospective/6M62/cBlorb: $(INDULGENTCC) -o retrospective/6M62/cBlorb.o retrospective/6M62/cBlorb.c @@ -20,9 +20,9 @@ retrospective/6L02/ni: $(INDULGENTCC) -o retrospective/6L02/ni.o retrospective/6L02/ni.c $(LINK) -o retrospective/6L02/ni retrospective/6L02/ni.o $(LINKEROPTS) -retrospective/6L30/ni: - $(INDULGENTCC) -o retrospective/6L30/ni.o retrospective/6L30/ni.c - $(LINK) -o retrospective/6L30/ni retrospective/6L30/ni.o $(LINKEROPTS) +retrospective/6L38/ni: + $(INDULGENTCC) -o retrospective/6L38/ni.o retrospective/6L38/ni.c + $(LINK) -o retrospective/6L38/ni retrospective/6L38/ni.o $(LINKEROPTS) retrospective/6M62/ni: $(INDULGENTCC) -o retrospective/6M62/ni.o retrospective/6M62/ni.c diff --git a/retrospective/retrospective.txt b/retrospective/retrospective.txt index bbcc738f9..aa0e19bde 100644 --- a/retrospective/retrospective.txt +++ b/retrospective/retrospective.txt @@ -1,4 +1,4 @@ '****','Current','With this option set, Inform always uses the latest version of the language to compile your project.' '6M62','Inform 7.9.3 (6M62), December 2015','With this option set, Inform always compiles your project using version 7.9.3. The second maintenance update to 7.9, it was most notable for many bug fixes.' -'6L30','Inform 7.9.2 (6L38), August 2014','With this option set, Inform always compiles your project using version 7.9.2. The first maintenance update to 7.9, it also made a few minor clarifications to the language.' +'6L38','Inform 7.9.2 (6L38), August 2014','With this option set, Inform always compiles your project using version 7.9.2. The first maintenance update to 7.9, it also made a few minor clarifications to the language.' '6L02','Inform 7.9.1 (6L02), May 2014','With this option set, Inform always compiles your project using version 7.9.1. That was a major new version of the Inform language, with improvements across the board. First public release in which indexed text and text were unified into a single kind.' diff --git a/scripts/makescript.txt b/scripts/makescript.txt index 4b3dedfe7..1c307cca0 100644 --- a/scripts/makescript.txt +++ b/scripts/makescript.txt @@ -17,6 +17,7 @@ {platform-settings} INTEST = ../intest/Tangled/intest +INTESTX = ../intest/Tangled/intest INTESTWEB = ../intest INWEB = ../inweb/Tangled/inweb INWEBX = ../inweb/Tangled/inweb @@ -278,7 +279,6 @@ forcetools: ifdef BENEVOLENTOVERLORD $(MAKE) -f $(INPOLICYMAKER) endif - $(MAKE) -f $(INWEBMAKER) initial {repeatblock} ifdef BENEVOLENTOVERLORD $(INPOLICYX) -advance-build $(*WEB)