diff --git a/README.md b/README.md index e489d8614..835fea747 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -[Version](notes/versioning.md): 10.2.0-beta+6W31 'Krypton' (18 April 2023) +[Version](notes/versioning.md): 10.2.0-beta+6W32 'Krypton' (19 April 2023) ## About Inform diff --git a/build.txt b/build.txt index 20c502388..5d42409a5 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: beta -Build Date: 18 April 2023 -Build Number: 6W31 +Build Date: 19 April 2023 +Build Number: 6W32 diff --git a/docs/supervisor-module/1-ic.html b/docs/supervisor-module/1-ic.html index bf20a0298..b3a6f3c00 100644 --- a/docs/supervisor-module/1-ic.html +++ b/docs/supervisor-module/1-ic.html @@ -560,7 +560,7 @@ nests, respectively.
-linked_list *Supervisor::shared_nest_list(void) { +linked_list *Supervisor::shared_nest_list(void) { RUN_ONLY_FROM_PHASE(NESTED_INBUILD_PHASE) if (shared_nest_list == NULL) internal_error("nest list never sorted"); return shared_nest_list; diff --git a/docs/supervisor-module/2-edt.html b/docs/supervisor-module/2-edt.html index f3bf7ad02..ca521ec5c 100644 --- a/docs/supervisor-module/2-edt.html +++ b/docs/supervisor-module/2-edt.html @@ -95,7 +95,7 @@ might work with all VMs, while version 8 required a 32-bit architecture. } }-
§2. When a copy is to be duplicated into a nest N, we need to work out where
to put it. For example, version 2.1 of the extension Marbles by Steve Hogarth
would go into N/Extensions/Steve Hogarth/Marbles-v2_1.i7x. The following
@@ -109,7 +109,7 @@ contributes only the un-filename-extended leafname canonical_leaves_have_versions = which;
}
-void Editions::write_canonical_leaf(OUTPUT_STREAM, inbuild_edition *E) {
+void Editions::write_canonical_leaf(OUTPUT_STREAM, inbuild_edition *E) {
WRITE("%S", E->work->title);
if ((canonical_leaves_have_versions) &&
(VersionNumbers::is_null(E->version) == FALSE)) {
diff --git a/docs/supervisor-module/2-nst.html b/docs/supervisor-module/2-nst.html
index 60738b238..2d099b595 100644
--- a/docs/supervisor-module/2-nst.html
+++ b/docs/supervisor-module/2-nst.html
@@ -98,7 +98,7 @@ see below for why. Lower-tag-numbered origins are better than later ones.
enum EXTENSION_NEST_TAG
-int Nests::get_tag(inbuild_nest *N) {
+int Nests::get_tag(inbuild_nest *N) {
if (N == NULL) return -1;
return N->tag_value;
}
diff --git a/docs/supervisor-module/2-rqr.html b/docs/supervisor-module/2-rqr.html
index d49bc3edd..eb2ef771b 100644
--- a/docs/supervisor-module/2-rqr.html
+++ b/docs/supervisor-module/2-rqr.html
@@ -74,7 +74,7 @@ we can give a semantic version number range:
CLASS_DEFINITION
} inbuild_requirement;
-
+
diff --git a/docs/supervisor-module/2-wrk.html b/docs/supervisor-module/2-wrk.html
index 15739a605..8010f8c99 100644
--- a/docs/supervisor-module/2-wrk.html
+++ b/docs/supervisor-module/2-wrk.html
@@ -335,7 +335,7 @@ each extension's page is generated from its HTML_CLOSE("a");
}
-
+
diff --git a/docs/supervisor-module/5-es.html b/docs/supervisor-module/5-es.html
index 95251b2b7..05904bf59 100644
--- a/docs/supervisor-module/5-es.html
+++ b/docs/supervisor-module/5-es.html
@@ -690,7 +690,7 @@ in a minimal sort of way, with just an
-inform_extension *Extensions::from_copy(inbuild_copy *C) {
+inform_extension *Extensions::from_copy(inbuild_copy *C) {
inform_extension *ext = ExtensionBundleManager::from_copy(C);
if (ext == NULL) ext = ExtensionManager::from_copy(C);
return ext;
diff --git a/docs/supervisor-module/5-ps2.html b/docs/supervisor-module/5-ps2.html
index 194ef3327..b9246dcf4 100644
--- a/docs/supervisor-module/5-ps2.html
+++ b/docs/supervisor-module/5-ps2.html
@@ -294,7 +294,7 @@ is small, but one likes to minimise the effect of the CWD.)
return proj->materials_nest;
}
-pathname *Projects::materials_path(inform_project *proj) {
+pathname *Projects::materials_path(inform_project *proj) {
if (proj == NULL) return NULL;
return proj->materials_nest->location;
}
diff --git a/docs/supervisor-module/7-cns.html b/docs/supervisor-module/7-cns.html
index d5d7e4e2e..2377a448a 100644
--- a/docs/supervisor-module/7-cns.html
+++ b/docs/supervisor-module/7-cns.html
@@ -81,7 +81,18 @@ compiled in case (b).
extension_census *ExtensionCensus::new(inform_project *proj) {
extension_census *C = CREATE(extension_census);
- C->search_list = Projects::nest_list(proj);
+
+ if (proj == NULL) {
+ C->search_list = Projects::nest_list(proj);
+ } else {
+ C->search_list = NEW_LINKED_LIST(inbuild_nest);
+ ADD_TO_LINKED_LIST(C->search_list, inbuild_nest, proj->search_list);
+ inbuild_nest *N;
+ linked_list *L = Supervisor::shared_nest_list();
+ LOOP_OVER_LINKED_LIST(N, inbuild_nest, L)
+ if (Nests::get_tag(N) == INTERNAL_NEST_TAG)
+ ADD_TO_LINKED_LIST(N, inbuild_nest, C->search_list);
+ }
C->census_data = NEW_LINKED_LIST(extension_census_datum);
C->raw_data = NEW_LINKED_LIST(inbuild_search_result);
C->no_census_errors = 0;
diff --git a/docs/supervisor-module/7-ip2.html b/docs/supervisor-module/7-ip2.html
index c6dbf1deb..63e8eda3a 100644
--- a/docs/supervisor-module/7-ip2.html
+++ b/docs/supervisor-module/7-ip2.html
@@ -71,7 +71,7 @@ associated files for each example.w
-void ExtensionPages::write_page(extension_census_datum *ecd, +void ExtensionPages::write_page(extension_census_datum *ecd, inform_extension *E, int force_update, inform_project *proj) { if ((E) && (E->as_copy) && (LinkedLists::len(E->as_copy->errors_reading_source_text) > 0)) { @@ -102,12 +102,13 @@ is any, as well as the correct identifying headings and requirements.int ExtensionPages::write_page_inner(extension_census_datum *ecd, inform_extension *E, int eg_number, int force_update, inform_project *proj) { - inbuild_work *work = NULL; - if (ecd) work = ecd->found_as->copy->edition->work; - else if (E) work = E->as_copy->edition->work; + inbuild_edition *edition = NULL; + if (ecd) edition = ecd->found_as->copy->edition; + else if (E) edition = E->as_copy->edition; else internal_error("write_page incorrectly called"); + inbuild_work *work = edition->work; - filename *F = ExtensionWebsite::page_URL(work, eg_number); + filename *F = ExtensionWebsite::page_URL(proj, edition, eg_number); if (F == NULL) return 0; int page_exists_already = TextFiles::exists(F); LOGIF(EXTENSIONS_CENSUS, "Write %s (%X)/%d %s: %f\n", @@ -181,7 +182,7 @@ our E, and return 0 in response to the ECD call to prevent further ECD calls. HTML::end_span(OUT); HTML_CLOSE("p"); if (E) { - filename *B = ExtensionWebsite::page_URL(work, -1); + filename *B = ExtensionWebsite::page_URL(proj, edition, -1); TEMPORARY_TEXT(leaf) Filenames::write_unextended_leafname(leaf, B); Write up the rubric, if any2.2.1.4; diff --git a/docs/supervisor-module/7-tm.html b/docs/supervisor-module/7-tm.html index 7ce33df86..64ea965e2 100644 --- a/docs/supervisor-module/7-tm.html +++ b/docs/supervisor-module/7-tm.html @@ -102,7 +102,7 @@ same either way. Here are the functions for (a) and (b) respectively: ExtensionWebsite::go(NULL, TRUE); } -void ExtensionWebsite::index_after_compilation(inform_project *proj) { +void ExtensionWebsite::index_after_compilation(inform_project *proj) { HTML::set_link_abbreviation_path(Projects::path(proj)); ExtensionWebsite::go(proj, FALSE); } @@ -140,8 +140,9 @@ documentation as used today until the next run, for obscure timing reasons.- ExtensionIndex::write(ExtensionWebsite::index_URL(I"Extensions.html"), HOME_EXTPAGE, C); - ExtensionIndex::write(ExtensionWebsite::index_URL(I"ExtIndex.html"), INDEX_EXTPAGE, C); + ExtensionIndex::write(ExtensionWebsite::index_URL(proj, I"Extensions.html"), HOME_EXTPAGE, C); + if (proj == NULL) + ExtensionIndex::write(ExtensionWebsite::index_URL(proj, I"ExtIndex.html"), INDEX_EXTPAGE, C);
§2.3. Each extension gets its own page in the external documentation area, but @@ -194,21 +195,33 @@ in the same area but not as part of the site.
-pathname *ExtensionWebsite::home_URL(void) { - pathname *P = Supervisor::transient(); - if (P == NULL) return NULL; - if (Pathnames::create_in_file_system(P) == 0) return NULL; - P = Pathnames::down(P, I"Documentation"); - if (Pathnames::create_in_file_system(P) == 0) return NULL; - return P; +pathname *ExtensionWebsite::home_URL(inform_project *proj) { + if (proj == NULL) { + pathname *P = Supervisor::transient(); + if (P == NULL) return NULL; + if (Pathnames::create_in_file_system(P) == 0) return NULL; + P = Pathnames::down(P, I"Documentation"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + return P; + } else { + pathname *P = Projects::materials_path(proj); + if (P == NULL) return NULL; + P = Pathnames::down(P, I"Extensions"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + P = Pathnames::down(P, I"Reserved"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + P = Pathnames::down(P, I"Documentation"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + return P; + } }
§4. The top-level files Extensions.html and ExtIndex.html go here:
-filename *ExtensionWebsite::index_URL(text_stream *leaf) { - pathname *P = ExtensionWebsite::home_URL(); +filename *ExtensionWebsite::index_URL(inform_project *proj, text_stream *leaf) { + pathname *P = ExtensionWebsite::home_URL(proj); if (P == NULL) return NULL; return Filenames::in(P, leaf); } @@ -229,16 +242,40 @@ documentation: so for instance we might actually see —-filename *ExtensionWebsite::page_URL(inbuild_work *work, int eg_number) { +filename *ExtensionWebsite::page_URL(inform_project *proj, inbuild_edition *edition, int eg_number) { TEMPORARY_TEXT(leaf) - Str::copy(leaf, work->title); - if (eg_number > 0) WRITE_TO(leaf, "-eg%d", eg_number); - WRITE_TO(leaf, ".html"); - pathname *P = ExtensionWebsite::home_URL(); - if (P == NULL) return NULL; - P = Pathnames::down(P, I"Extensions"); + Editions::write_canonical_leaf(leaf, edition); + + pathname *P; + if (proj) { + P = Projects::materials_path(proj); + if (P == NULL) return NULL; + P = Pathnames::down(P, I"Extensions"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + P = Pathnames::down(P, I"Reserved"); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + P = Pathnames::down(P, I"Documentation"); + } else { + P = ExtensionWebsite::home_URL(NULL); + if (P == NULL) return NULL; + P = Pathnames::down(P, I"Extensions"); + } if (Pathnames::create_in_file_system(P) == 0) return NULL; - filename *F = Filenames::in(Pathnames::down(P, work->author_name), leaf); + P = Pathnames::down(P, edition->work->author_name); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + + if (proj) { + P = Pathnames::down(P, leaf); + if (Pathnames::create_in_file_system(P) == 0) return NULL; + Str::clear(leaf); + if (eg_number > 0) WRITE_TO(leaf, "eg%d.html", eg_number); + else WRITE_TO(leaf, "index.html"); + } else { + if (eg_number > 0) WRITE_TO(leaf, "-eg%d", eg_number); + WRITE_TO(leaf, ".html"); + } + + filename *F = Filenames::in(P, leaf); DISCARD_TEXT(leaf) return F; } diff --git a/docs/supervisor-module/7-tr.html b/docs/supervisor-module/7-tr.html index 8e9ab5a16..266c47e5e 100644 --- a/docs/supervisor-module/7-tr.html +++ b/docs/supervisor-module/7-tr.html @@ -183,6 +183,7 @@ produces a second report.if (N > 0) Report on damage to extension2.4.1 else Report that extension seems valid2.4.2; + HTML_TAG("hr"); Explain what installation and Inclusion mean2.4.3; List the extensions currently Included by the project2.4.4; @@ -232,6 +233,7 @@ produces a second report. WRITE(", but does not say what it is for."); HTML_CLOSE("p"); } + Make documentation2.4.2.1;
§2.4.3. Explain what installation and Inclusion mean2.4.3 = @@ -350,6 +352,26 @@ produces a second report. }
§2.4.2.1. Make documentation2.4.2.1 = +
+ ++ ExtensionPages::write_page(NULL, Extensions::from_copy(C), FALSE, project); + HTML_OPEN("p"); + WRITE("Documentation about %S ", C->edition->work->title); + TEMPORARY_TEXT(link) + TEMPORARY_TEXT(URL) + WRITE_TO(URL, "%f", ExtensionWebsite::page_URL(project, C->edition, 0)); + WRITE_TO(link, "href='"); + Works::escape_apostrophes(link, URL); + WRITE_TO(link, "' style=\"text-decoration: none\""); + HTML_OPEN_WITH("a", "%S", link); + DISCARD_TEXT(link) + WRITE("can be read here."); + HTML_CLOSE("a"); + HTML_CLOSE("p"); ++
§2.4.7. Come to the point2.4.7 =
@@ -445,6 +467,9 @@ produces a second report. WRITE("(Well, actually, nothing was done, but you can see the commands which would have been issued on stdout)\n"); HTML_CLOSE("p"); HTML_TAG("hr"); + + ExtensionWebsite::index_after_compilation(project); + linked_list *L = NEW_LINKED_LIST(inbuild_search_result); List the extensions currently Included by the project2.4.4; List the extensions currently installed in the project2.4.5; diff --git a/inbuild/supervisor-module/Chapter 7/Census.w b/inbuild/supervisor-module/Chapter 7/Census.w index 7d7696856..88f407653 100644 --- a/inbuild/supervisor-module/Chapter 7/Census.w +++ b/inbuild/supervisor-module/Chapter 7/Census.w @@ -20,7 +20,18 @@ compiled in case (b). = extension_census *ExtensionCensus::new(inform_project *proj) { extension_census *C = CREATE(extension_census); - C->search_list = Projects::nest_list(proj); + + if (proj == NULL) { + C->search_list = Projects::nest_list(proj); + } else { + C->search_list = NEW_LINKED_LIST(inbuild_nest); + ADD_TO_LINKED_LIST(C->search_list, inbuild_nest, proj->search_list); + inbuild_nest *N; + linked_list *L = Supervisor::shared_nest_list(); + LOOP_OVER_LINKED_LIST(N, inbuild_nest, L) + if (Nests::get_tag(N) == INTERNAL_NEST_TAG) + ADD_TO_LINKED_LIST(N, inbuild_nest, C->search_list); + } C->census_data = NEW_LINKED_LIST(extension_census_datum); C->raw_data = NEW_LINKED_LIST(inbuild_search_result); C->no_census_errors = 0; diff --git a/inbuild/supervisor-module/Chapter 7/Individual Pages.w b/inbuild/supervisor-module/Chapter 7/Individual Pages.w index 34e74afff..bcf10d8ea 100644 --- a/inbuild/supervisor-module/Chapter 7/Individual Pages.w +++ b/inbuild/supervisor-module/Chapter 7/Individual Pages.w @@ -42,12 +42,13 @@ is any, as well as the correct identifying headings and requirements. = int ExtensionPages::write_page_inner(extension_census_datum *ecd, inform_extension *E, int eg_number, int force_update, inform_project *proj) { - inbuild_work *work = NULL; - if (ecd) work = ecd->found_as->copy->edition->work; - else if (E) work = E->as_copy->edition->work; + inbuild_edition *edition = NULL; + if (ecd) edition = ecd->found_as->copy->edition; + else if (E) edition = E->as_copy->edition; else internal_error("write_page incorrectly called"); + inbuild_work *work = edition->work; - filename *F = ExtensionWebsite::page_URL(work, eg_number); + filename *F = ExtensionWebsite::page_URL(proj, edition, eg_number); if (F == NULL) return 0; int page_exists_already = TextFiles::exists(F); LOGIF(EXTENSIONS_CENSUS, "Write %s (%X)/%d %s: %f\n", @@ -109,7 +110,7 @@ our E, and return 0 in response to the ECD call to prevent further ECD calls. HTML::end_span(OUT); HTML_CLOSE("p"); if (E) { - filename *B = ExtensionWebsite::page_URL(work, -1); + filename *B = ExtensionWebsite::page_URL(proj, edition, -1); TEMPORARY_TEXT(leaf) Filenames::write_unextended_leafname(leaf, B); @