Refreshed docs
This commit is contained in:
parent
d5a514812d
commit
06d455de43
65 changed files with 252 additions and 189 deletions
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/fnd' generated by inweb 6P91-->
|
||||
<!--Weave of '1/fnd' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#1">Chapter 1: Setting Up</a></li><li><b>Foundation</b></li></ul><p class="purpose">Starting up and shutting down.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Introduction</a></li><li><a href="#SP2">§2. Basic definitions</a></li><li><a href="#SP8">§8. The beginning and the end</a></li></ul><hr class="tocbar">
|
||||
|
@ -272,7 +272,7 @@ safety problems.
|
|||
|
||||
<p class="endnote">The function Foundation::end appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 171 lines from a web of 9228-->
|
||||
<!--End of weave: 171 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/pp' generated by inweb 6P91-->
|
||||
<!--Weave of '1/pp' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#1">Chapter 1: Setting Up</a></li><li><b>POSIX Platforms</b></li></ul><p class="purpose">A version of our operating system interface suitable for POSIX-compliant operating systems.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP3">§3. Mac OS X</a></li><li><a href="#SP4">§4. Generic Unix</a></li><li><a href="#SP5">§5. Linux</a></li><li><a href="#SP6">§6. Android</a></li><li><a href="#SP7">§7. Locale</a></li><li><a href="#SP8">§8. Environment variables</a></li><li><a href="#SP9">§9. Executable location</a></li><li><a href="#SP10">§10. Executable location</a></li><li><a href="#SP11">§11. Shell commands</a></li><li><a href="#SP12">§12. Directory handling</a></li><li><a href="#SP13">§13. Sleep</a></li><li><a href="#SP14">§14. Notifications</a></li><li><a href="#SP16">§16. Concurrency</a></li><li><a href="#SP18">§18. Mutexes</a></li></ul><hr class="tocbar">
|
||||
<ul class="toc"><li><a href="#SP3">§3. Mac OS X</a></li><li><a href="#SP4">§4. Generic Unix</a></li><li><a href="#SP5">§5. Linux</a></li><li><a href="#SP6">§6. Android</a></li><li><a href="#SP7">§7. Locale</a></li><li><a href="#SP8">§8. Environment variables</a></li><li><a href="#SP9">§9. Executable location</a></li><li><a href="#SP10">§10. Shell commands</a></li><li><a href="#SP11">§11. Directory handling</a></li><li><a href="#SP12">§12. Sleep</a></li><li><a href="#SP13">§13. Notifications</a></li><li><a href="#SP15">§15. Concurrency</a></li><li><a href="#SP17">§17. Mutexes</a></li></ul><hr class="tocbar">
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>The C standard library leaves many questions unanswered about how to deal
|
||||
with the host operating system: for example, it knows very little about
|
||||
|
@ -61,7 +61,7 @@ operating system, and the other one on Windows.
|
|||
<span class="definitionkeyword">define</span> <span class="constant">SHELL_QUOTE_CHARACTER</span><span class="plain"> </span><span class="character">'\</span><span class="plain">'</span><span class="character">'</span>
|
||||
<span class="definitionkeyword">define</span> <span class="constant">INFORM_FOLDER_RELATIVE_TO_HOME</span><span class="plain"> </span><span class="string">"Library"</span>
|
||||
</pre>
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_MACOSX and PLATFORM_POSIX are defined.</p>
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_MACOS and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP4"></a><b>§4. Generic Unix. </b>These settings are used both for the Linux versions (both command-line, by
|
||||
Adam Thornton, and for Ubuntu, Fedora, Debian and so forth, by Philip
|
||||
|
@ -177,7 +177,7 @@ just that installation and use of Foundation-built tools is less convenient.)
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_LINUX and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP10">§10</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP9_1_1">§9.1.1</a>, <a href="#SP9_1_2">§9.1.2</a>, <a href="#SP9_1_3">§9.1.3</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9_1"></a><b>§9.1. </b>On Linux, <code class="display"><span class="extract">/proc/self/exe</span></code> is a symlink to the current process's executable.
|
||||
Follow that link to find the path. Normally when reading a symlink, one uses
|
||||
|
@ -193,7 +193,7 @@ symlinks in <code class="display"><span class="extract">/proc</span></code> are
|
|||
|
||||
<pre class="displaydefn">
|
||||
<span class="character">ssize_t link_len = readlink("/proc/self/exe", buffer, PATH_MAX);</span>
|
||||
<span class="character">if (link_len < 0) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.1</span>><span class="character">; </span> <span class="comment">unable to find</span>
|
||||
<span class="character">if (link_len < 0) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="character">; </span> <span class="comment">unable to find</span>
|
||||
<span class="character">buffer[link_len] = '</span><span class="plain">\0</span><span class="character">';</span>
|
||||
</pre>
|
||||
|
||||
|
@ -216,7 +216,7 @@ string.
|
|||
|
||||
<pre class="displaydefn">
|
||||
<span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">convert_len</span><span class="plain"> = </span><span class="identifier">mbstowcs</span><span class="plain">(</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">buffer</span><span class="plain">, </span><span class="identifier">length</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">convert_len</span><span class="plain"> == (</span><span class="identifier">size_t</span><span class="plain">)-1) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.1</span>><span class="plain">; </span> <span class="comment">wouldn't fit</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">convert_len</span><span class="plain"> == (</span><span class="identifier">size_t</span><span class="plain">)-1) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">; </span> <span class="comment">wouldn't fit</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
@ -225,8 +225,79 @@ string.
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP9">§9</a>.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9_1_1"></a><b>§9.1.1. </b><code class="display">
|
||||
<<span class="cwebmacrodefn">Fail</span> <span class="cwebmacronumber">9.1.1</span>> =
|
||||
<p class="inwebparagraph"><a id="SP9_1_1"></a><b>§9.1.1. </b>And now the Mac version:
|
||||
</p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">int</span><span class="plain"> </span><span class="functiontext">_NSGetExecutablePath</span><span class="plain">(</span><span class="reserved">char</span><span class="plain">* </span><span class="identifier">buf</span><span class="plain">, </span><span class="identifier">uint32_t</span><span class="plain">* </span><span class="identifier">bufsize</span><span class="plain">);</span>
|
||||
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Platform::where_am_i</span><span class="plain">(</span><span class="identifier">wchar_t</span><span class="plain"> *</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">length</span><span class="plain">) {</span>
|
||||
<span class="reserved">char</span><span class="plain"> </span><span class="identifier">relative_path</span><span class="plain">[4 * </span><span class="identifier">PATH_MAX</span><span class="plain"> + 1];</span>
|
||||
<span class="reserved">char</span><span class="plain"> </span><span class="identifier">absolute_path</span><span class="plain">[</span><span class="identifier">PATH_MAX</span><span class="plain"> + 1];</span>
|
||||
<span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">convert_len</span><span class="plain">;</span>
|
||||
<span class="identifier">uint32_t</span><span class="plain"> </span><span class="identifier">pathsize</span><span class="plain"> = </span><span class="reserved">sizeof</span><span class="plain">(</span><span class="identifier">relative_path</span><span class="plain">);</span>
|
||||
<span class="identifier">uint32_t</span><span class="plain"> </span><span class="identifier">tempsize</span><span class="plain"> = </span><span class="identifier">pathsize</span><span class="plain">;</span>
|
||||
|
||||
<span class="comment">Get "a path" to the executable</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="functiontext">_NSGetExecutablePath</span><span class="plain">(</span><span class="identifier">relative_path</span><span class="plain">, &</span><span class="identifier">tempsize</span><span class="plain">) != 0) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">;</span>
|
||||
|
||||
<span class="comment">Convert to canonical absolute path</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">realpath</span><span class="plain">(</span><span class="identifier">relative_path</span><span class="plain">, </span><span class="identifier">absolute_path</span><span class="plain">) == </span><span class="identifier">NULL</span><span class="plain">) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">;</span>
|
||||
|
||||
|
||||
<span class="plain">* </span><span class="reserved">filename</span><span class="plain"> </span><span class="identifier">encoding</span><span class="plain">, </span><span class="identifier">possibly</span><span class="plain"> </span><span class="identifier">multibyte</span><span class="plain">) </span><span class="identifier">to</span><span class="plain"> </span><span class="identifier">a</span><span class="plain"> </span><span class="identifier">wide</span><span class="plain">-</span><span class="reserved">char</span><span class="plain"> </span><span class="identifier">string</span><span class="plain">. */</span>
|
||||
<span class="identifier">convert_len</span><span class="plain"> = </span><span class="identifier">mbstowcs</span><span class="plain">(</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">absolute_path</span><span class="plain">, </span><span class="identifier">length</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">convert_len</span><span class="plain"> == (</span><span class="identifier">size_t</span><span class="plain">)-1) </span><<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_MACOS and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="endnote">The function _NSGetExecutablePath appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP9">§9</a>, <a href="#SP9_1_2">§9.1.2</a>, <a href="#SP9_1_3">§9.1.3</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9_1_2"></a><b>§9.1.2. </b>For Unix, there's nothing we can generically do.
|
||||
</p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Platform::where_am_i</span><span class="plain">(</span><span class="identifier">wchar_t</span><span class="plain"> *</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">length</span><span class="plain">) {</span>
|
||||
<<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_UNIX and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP9">§9</a>, <a href="#SP9_1_1">§9.1.1</a>, <a href="#SP9_1_3">§9.1.3</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9_1_3"></a><b>§9.1.3. </b>On Android, there's no real need for this.
|
||||
</p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Platform::where_am_i</span><span class="plain">(</span><span class="identifier">wchar_t</span><span class="plain"> *</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">length</span><span class="plain">) {</span>
|
||||
<<span class="cwebmacro">Fail</span> <span class="cwebmacronumber">9.1.4</span>><span class="plain">;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_ANDROID and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP9">§9</a>, <a href="#SP9_1_1">§9.1.1</a>, <a href="#SP9_1_2">§9.1.2</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9_1_4"></a><b>§9.1.4. </b>All of the above make use of:
|
||||
</p>
|
||||
|
||||
|
||||
<p class="macrodefinition"><code class="display">
|
||||
<<span class="cwebmacrodefn">Fail</span> <span class="cwebmacronumber">9.1.4</span>> =
|
||||
</code></p>
|
||||
|
||||
|
||||
|
@ -239,24 +310,9 @@ string.
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined.</p>
|
||||
|
||||
<p class="endnote">This code is used in <a href="#SP9_1">§9.1</a>, <a href="#SP9_2">§9.2</a>.</p>
|
||||
<p class="endnote">This code is used in <a href="#SP9_1">§9.1</a>, <a href="#SP9_2">§9.2</a>, <a href="#SP9_1_1">§9.1.1</a> (three times), <a href="#SP9_1_2">§9.1.2</a>, <a href="#SP9_1_3">§9.1.3</a>.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP10"></a><b>§10. Executable location. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Platform::where_am_i</span><span class="plain">(</span><span class="identifier">wchar_t</span><span class="plain"> *</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">length</span><span class="plain">) {</span>
|
||||
<span class="identifier">p</span><span class="plain">[0] = 0;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined and if PLATFORM_LINUX is undefined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in <a href="#SP9">§9</a>, 1/wp (<a href="1-wp.html#SP5">§5</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP11"></a><b>§11. Shell commands. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP10"></a><b>§10. Shell commands. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -271,7 +327,7 @@ string.
|
|||
|
||||
<p class="endnote">The function Platform::system is used in 1/wp (<a href="1-wp.html#SP6">§6</a>), 3/shl (<a href="3-shl.html#SP5">§5</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP12"></a><b>§12. Directory handling. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP11"></a><b>§11. Directory handling. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -321,7 +377,7 @@ string.
|
|||
|
||||
<p class="endnote">The function Platform::closedir is used in 1/wp (<a href="1-wp.html#SP7">§7</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP13"></a><b>§13. Sleep. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP12"></a><b>§12. Sleep. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -336,7 +392,7 @@ string.
|
|||
|
||||
<p class="endnote">The function Platform::sleep is used in 1/wp (<a href="1-wp.html#SP8">§8</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP14"></a><b>§14. Notifications. </b>The "submarine" sound is a gloomy thunk; the "bell" is the three-tone rising
|
||||
<p class="inwebparagraph"><a id="SP13"></a><b>§13. Notifications. </b>The "submarine" sound is a gloomy thunk; the "bell" is the three-tone rising
|
||||
alert noise which iPhones make when they receive texts, but which hackers of a
|
||||
certain age will remember as the "I have ripped your music CD now" alert from
|
||||
SoundJam, the program which Apple bought and rebranded as iTunes. Apple now
|
||||
|
@ -363,11 +419,11 @@ actually running a one-line AppleScript here.
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_MACOSX and PLATFORM_POSIX are defined.</p>
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_MACOS and PLATFORM_POSIX are defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::notification is used in <a href="#SP15">§15</a>, 1/wp (<a href="1-wp.html#SP9">§9</a>).</p>
|
||||
<p class="endnote">The function Platform::notification is used in <a href="#SP14">§14</a>, 1/wp (<a href="1-wp.html#SP9">§9</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP15"></a><b>§15. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP14"></a><b>§14. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -377,11 +433,11 @@ actually running a one-line AppleScript here.
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined and if PLATFORM_MACOSX is undefined.</p>
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined and if PLATFORM_MACOS is undefined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::notification is used in <a href="#SP14">§14</a>, 1/wp (<a href="1-wp.html#SP9">§9</a>).</p>
|
||||
<p class="endnote">The function Platform::notification is used in <a href="#SP13">§13</a>, 1/wp (<a href="1-wp.html#SP9">§9</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP16"></a><b>§16. Concurrency. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP15"></a><b>§15. Concurrency. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -393,7 +449,7 @@ actually running a one-line AppleScript here.
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP17"></a><b>§17. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP16"></a><b>§16. </b></p>
|
||||
|
||||
|
||||
<pre class="display">
|
||||
|
@ -430,7 +486,7 @@ actually running a one-line AppleScript here.
|
|||
|
||||
<p class="endnote">The function Platform::get_thread_stack_size is used in 1/wp (<a href="1-wp.html#SP11">§11</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP18"></a><b>§18. Mutexes. </b></p>
|
||||
<p class="inwebparagraph"><a id="SP17"></a><b>§17. Mutexes. </b></p>
|
||||
|
||||
|
||||
<pre class="definitions">
|
||||
|
@ -441,7 +497,7 @@ actually running a one-line AppleScript here.
|
|||
</pre>
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_POSIX is defined.</p>
|
||||
|
||||
<!--End of weave: 252 lines from a web of 9228-->
|
||||
<!--End of weave: 284 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/wp' generated by inweb 6P91-->
|
||||
<!--Weave of '1/wp' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#1">Chapter 1: Setting Up</a></li><li><b>Windows Platform</b></li></ul><p class="purpose">A version of our operating system interface suitable for Microsoft Windows.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP2">§2. Microsoft Windows</a></li><li><a href="#SP4">§4. Environment variables</a></li><li><a href="#SP5">§5. Executable location</a></li><li><a href="#SP6">§6. Shell commands</a></li><li><a href="#SP7">§7. Directory handling</a></li><li><a href="#SP8">§8. Sleep</a></li><li><a href="#SP9">§9. Notifications</a></li><li><a href="#SP10">§10. Concurrency</a></li><li><a href="#SP12">§12. Mutexes</a></li></ul><hr class="tocbar">
|
||||
|
@ -38,7 +38,7 @@ on a POSIX operating system.
|
|||
<span class="plain">#</span><span class="identifier">include</span><span class="plain"> <</span><span class="identifier">dirent</span><span class="plain">.</span><span class="identifier">h</span><span class="plain">></span>
|
||||
<span class="plain">#</span><span class="identifier">include</span><span class="plain"> <</span><span class="identifier">errno</span><span class="plain">.</span><span class="identifier">h</span><span class="plain">></span>
|
||||
<span class="plain">#</span><span class="identifier">include</span><span class="plain"> <</span><span class="identifier">io</span><span class="plain">.</span><span class="identifier">h</span><span class="plain">></span>
|
||||
<span class="plain">#</span><span class="identifier">include</span><span class="plain"> </span><span class="string">"modules/foundation/Headers/win32.h"</span>
|
||||
<span class="plain">#</span><span class="identifier">include</span><span class="plain"> <</span><span class="identifier">windows</span><span class="plain">.</span><span class="identifier">h</span><span class="plain">></span>
|
||||
</pre>
|
||||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
@ -120,7 +120,8 @@ just that installation and use of Foundation-built tools is less convenient.)
|
|||
|
||||
<pre class="display">
|
||||
<span class="reserved">void</span><span class="plain"> </span><span class="functiontext">Platform::where_am_i</span><span class="plain">(</span><span class="identifier">wchar_t</span><span class="plain"> *</span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">size_t</span><span class="plain"> </span><span class="identifier">length</span><span class="plain">) {</span>
|
||||
<span class="identifier">p</span><span class="plain">[0] = 0;</span>
|
||||
<span class="identifier">DWORD</span><span class="plain"> </span><span class="identifier">result</span><span class="plain"> = </span><span class="identifier">GetModuleFileNameW</span><span class="plain">(</span><span class="identifier">NULL</span><span class="plain">, </span><span class="identifier">p</span><span class="plain">, </span><span class="identifier">length</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> ((</span><span class="identifier">result</span><span class="plain"> == 0) || (</span><span class="identifier">result</span><span class="plain"> == </span><span class="identifier">length</span><span class="plain">)) </span><span class="identifier">p</span><span class="plain">[0] = 0;</span>
|
||||
<span class="plain">}</span>
|
||||
</pre>
|
||||
|
||||
|
@ -128,7 +129,7 @@ just that installation and use of Foundation-built tools is less convenient.)
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_WINDOWS is defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::where_am_i is used in 1/pp (<a href="1-pp.html#SP9">§9</a>, <a href="1-pp.html#SP10">§10</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
<p class="endnote">The function Platform::where_am_i is used in 1/pp (<a href="1-pp.html#SP9">§9</a>, <a href="1-pp.html#SP9_1_1">§9.1.1</a>, <a href="1-pp.html#SP9_1_2">§9.1.2</a>, <a href="1-pp.html#SP9_1_3">§9.1.3</a>), 3/pth (<a href="3-pth.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP6"></a><b>§6. Shell commands. </b></p>
|
||||
|
||||
|
@ -188,7 +189,7 @@ just that installation and use of Foundation-built tools is less convenient.)
|
|||
|
||||
<p class="endnote">The function GetExitCodeProcess appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Platform::system is used in 1/pp (<a href="1-pp.html#SP11">§11</a>), 3/shl (<a href="3-shl.html#SP5">§5</a>).</p>
|
||||
<p class="endnote">The function Platform::system is used in 1/pp (<a href="1-pp.html#SP10">§10</a>), 3/shl (<a href="3-shl.html#SP5">§5</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP7"></a><b>§7. Directory handling. </b></p>
|
||||
|
||||
|
@ -234,13 +235,13 @@ just that installation and use of Foundation-built tools is less convenient.)
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_WINDOWS is defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::mkdir is used in 1/pp (<a href="1-pp.html#SP12">§12</a>), 3/pth (<a href="3-pth.html#SP8">§8</a>).</p>
|
||||
<p class="endnote">The function Platform::mkdir is used in 1/pp (<a href="1-pp.html#SP11">§11</a>), 3/pth (<a href="3-pth.html#SP8">§8</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::opendir is used in 1/pp (<a href="1-pp.html#SP12">§12</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
<p class="endnote">The function Platform::opendir is used in 1/pp (<a href="1-pp.html#SP11">§11</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::readdir is used in 1/pp (<a href="1-pp.html#SP12">§12</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
<p class="endnote">The function Platform::readdir is used in 1/pp (<a href="1-pp.html#SP11">§11</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::closedir is used in 1/pp (<a href="1-pp.html#SP12">§12</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
<p class="endnote">The function Platform::closedir is used in 1/pp (<a href="1-pp.html#SP11">§11</a>), 3/drc (<a href="3-drc.html#SP2">§2</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP8"></a><b>§8. Sleep. </b>The Windows <code class="display"><span class="extract">Sleep</span></code> call measures time in milliseconds, whereas
|
||||
POSIX <code class="display"><span class="extract">sleep</span></code> is for seconds.
|
||||
|
@ -258,7 +259,7 @@ POSIX <code class="display"><span class="extract">sleep</span></code> is for sec
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_WINDOWS is defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::sleep is used in 1/pp (<a href="1-pp.html#SP13">§13</a>).</p>
|
||||
<p class="endnote">The function Platform::sleep is used in 1/pp (<a href="1-pp.html#SP12">§12</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP9"></a><b>§9. Notifications. </b></p>
|
||||
|
||||
|
@ -272,7 +273,7 @@ POSIX <code class="display"><span class="extract">sleep</span></code> is for sec
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_WINDOWS is defined.</p>
|
||||
|
||||
<p class="endnote">The function Platform::notification is used in 1/pp (<a href="1-pp.html#SP14">§14</a>, <a href="1-pp.html#SP15">§15</a>).</p>
|
||||
<p class="endnote">The function Platform::notification is used in 1/pp (<a href="1-pp.html#SP13">§13</a>, <a href="1-pp.html#SP14">§14</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP10"></a><b>§10. Concurrency. </b>The following predeclarations come from the Windows SDK.
|
||||
</p>
|
||||
|
@ -339,13 +340,13 @@ POSIX <code class="display"><span class="extract">sleep</span></code> is for sec
|
|||
|
||||
<p class="endnote">The function Platform::Win32_Thread_Func appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Platform::create_thread is used in 1/pp (<a href="1-pp.html#SP17">§17</a>).</p>
|
||||
<p class="endnote">The function Platform::create_thread is used in 1/pp (<a href="1-pp.html#SP16">§16</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::join_thread is used in 1/pp (<a href="1-pp.html#SP17">§17</a>).</p>
|
||||
<p class="endnote">The function Platform::join_thread is used in 1/pp (<a href="1-pp.html#SP16">§16</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::init_thread is used in 1/pp (<a href="1-pp.html#SP17">§17</a>).</p>
|
||||
<p class="endnote">The function Platform::init_thread is used in 1/pp (<a href="1-pp.html#SP16">§16</a>).</p>
|
||||
|
||||
<p class="endnote">The function Platform::get_thread_stack_size is used in 1/pp (<a href="1-pp.html#SP17">§17</a>).</p>
|
||||
<p class="endnote">The function Platform::get_thread_stack_size is used in 1/pp (<a href="1-pp.html#SP16">§16</a>).</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP12"></a><b>§12. Mutexes. </b></p>
|
||||
|
||||
|
@ -368,7 +369,7 @@ POSIX <code class="display"><span class="extract">sleep</span></code> is for sec
|
|||
|
||||
<p class="endnote">This paragraph is used only if PLATFORM_WINDOWS is defined.</p>
|
||||
|
||||
<!--End of weave: 235 lines from a web of 9228-->
|
||||
<!--End of weave: 236 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/dct' generated by inweb 6P91-->
|
||||
<!--Weave of '2/dct' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Dictionaries</b></li></ul><p class="purpose">A simple implementation for a flexible-sized dictionary of key-value pairs.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Storage</a></li><li><a href="#SP2">§2. Creation</a></li><li><a href="#SP3">§3. Logging</a></li><li><a href="#SP4">§4. Hashing</a></li><li><a href="#SP5">§5. Create, find, destroy</a></li><li><a href="#SP8">§8. Accessing entries</a></li><li><a href="#SP11">§11. Disposal</a></li></ul><hr class="tocbar">
|
||||
|
@ -443,7 +443,7 @@ and free the memory when done:
|
|||
|
||||
<p class="endnote">The function Dictionaries::dispose_of appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 288 lines from a web of 9228-->
|
||||
<!--End of weave: 288 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/dl' generated by inweb 6P91-->
|
||||
<!--Weave of '2/dl' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Debugging Log</b></li></ul><p class="purpose">To write to the debugging log, a plain text file which traces what we're doing, in order to assist those lost souls debugging it.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. The DL stream</a></li><li><a href="#SP2">§2. Macros</a></li><li><a href="#SP3">§3. Debugging aspects</a></li><li><a href="#SP6">§6. Subheadings</a></li><li><a href="#SP7">§7. Aspects</a></li><li><a href="#SP10">§10. The starred trace</a></li><li><a href="#SP11">§11. Wrapping up</a></li></ul><hr class="tocbar">
|
||||
|
@ -399,7 +399,7 @@ but weren't.
|
|||
|
||||
<p class="endnote">The function Log::show_debugging_contents is used in <a href="#SP5">§5</a>.</p>
|
||||
|
||||
<!--End of weave: 284 lines from a web of 9228-->
|
||||
<!--End of weave: 284 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/llas' generated by inweb 6P91-->
|
||||
<!--Weave of '2/llas' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Linked Lists and Stacks</b></li></ul><p class="purpose">A simple implementation for single-linked lists of objects allocated by Foundation's memory manager, and for last-in-first-out stacks of same.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Implementation</a></li><li><a href="#SP6">§6. A function call API</a></li><li><a href="#SP7">§7. A macro-ized API</a></li><li><a href="#SP9">§9. LIFO stacks</a></li></ul><hr class="tocbar">
|
||||
|
@ -276,7 +276,7 @@ preprocessor:
|
|||
<span class="definitionkeyword">define</span> <span class="identifier">LOOP_DOWN_LIFO_STACK</span><span class="plain">(</span><span class="identifier">P</span><span class="plain">, </span><span class="identifier">T</span><span class="plain">, </span><span class="identifier">L</span><span class="plain">)</span>
|
||||
<span class="identifier">LOOP_OVER_LINKED_LIST</span><span class="plain">(</span><span class="identifier">P</span><span class="plain">, </span><span class="identifier">T</span><span class="plain">, </span><span class="identifier">L</span><span class="plain">)</span>
|
||||
</pre>
|
||||
<!--End of weave: 217 lines from a web of 9228-->
|
||||
<!--End of weave: 217 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/mmr' generated by inweb 6P91-->
|
||||
<!--Weave of '2/mmr' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Memory</b></li></ul><p class="purpose">To allocate memory suitable for the dynamic creation of objects of different sizes, placing some larger objects automatically into doubly linked lists and assigning each a unique allocation ID number.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Memory manager</a></li><li><a href="#SP6">§6. Architecture</a></li><li><a href="#SP7">§7. Level 1: memory blocks</a></li><li><a href="#SP13">§13. Level 2: memory frames and integrity checking</a></li><li><a href="#SP17">§17. Level 3: managing linked lists of allocated objects</a></li><li><a href="#SP19">§19. Allocator functions created by macros</a></li><li><a href="#SP21">§21. Expanding many macros</a></li><li><a href="#SP22">§22. Simple memory allocations</a></li><li><a href="#SP28">§28. Text storage</a></li><li><a href="#SP32">§32. Memory usage report</a></li><li><a href="#SP36">§36. Run-time pointer type checking</a></li></ul><hr class="tocbar">
|
||||
|
@ -1299,7 +1299,7 @@ allocated objects above; so that leaves only humble <code class="display"><span
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<!--End of weave: 926 lines from a web of 9228-->
|
||||
<!--End of weave: 926 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/mth' generated by inweb 6P91-->
|
||||
<!--Weave of '2/mth' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Methods</b></li></ul><p class="purpose">General support for something approximating method calls.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Method sets</a></li><li><a href="#SP4">§4. Declaring methods</a></li><li><a href="#SP6">§6. Adding methods</a></li><li><a href="#SP7">§7. Calling methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -209,7 +209,7 @@ to a structure which has <code class="display"><span class="extract">METHOD_CALL
|
|||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">M</span><span class="plain">-</span><span class="element">>method_id</span><span class="plain"> == </span><span class="identifier">id</span><span class="plain">)</span>
|
||||
<span class="plain">(*((</span><span class="identifier">id</span><span class="plain">##</span><span class="identifier">_type</span><span class="plain">) (</span><span class="identifier">M</span><span class="plain">-</span><span class="element">>method_function</span><span class="plain">)))(</span><span class="identifier">upon</span><span class="plain">);</span>
|
||||
</pre>
|
||||
<!--End of weave: 153 lines from a web of 9228-->
|
||||
<!--End of weave: 153 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/str' generated by inweb 6P91-->
|
||||
<!--Weave of '2/str' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Streams</b></li></ul><p class="purpose">Support for writing structured textual output, perhaps to the screen, to a file, or to a flexible-sized wide string.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. About streams</a></li><li><a href="#SP19">§19. Initialising the stream structure</a></li><li><a href="#SP21">§21. Logging</a></li><li><a href="#SP22">§22. Standard I/O wrappers</a></li><li><a href="#SP24">§24. Creating file streams</a></li><li><a href="#SP26">§26. Creating memory streams</a></li><li><a href="#SP28">§28. Converting from C strings</a></li><li><a href="#SP29">§29. Converting to C strings</a></li><li><a href="#SP32">§32. Locale versions</a></li><li><a href="#SP33">§33. Flush and close</a></li><li><a href="#SP35">§35. Writing</a></li><li><a href="#SP39">§39. Memory-stream-only functions</a></li><li><a href="#SP43">§43. Writer</a></li></ul><hr class="tocbar">
|
||||
|
@ -1304,7 +1304,7 @@ to open similar ones again).
|
|||
|
||||
<p class="endnote">The function Streams::writer is used in 1/fnd (<a href="1-fnd.html#SP8_1">§8.1</a>).</p>
|
||||
|
||||
<!--End of weave: 947 lines from a web of 9228-->
|
||||
<!--End of weave: 947 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/wal' generated by inweb 6P91-->
|
||||
<!--Weave of '2/wal' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#2">Chapter 2: Memory, Streams and Collections</a></li><li><b>Writers and Loggers</b></li></ul><p class="purpose">Formatted text output to streams.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Registration</a></li><li><a href="#SP6">§6. Writing</a></li></ul><hr class="tocbar">
|
||||
|
@ -354,7 +354,7 @@ file encodings, but expanding <code class="display"><span class="extract">%s</sp
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP6_1">§6.1</a>.</p>
|
||||
|
||||
<!--End of weave: 268 lines from a web of 9228-->
|
||||
<!--End of weave: 268 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/cf' generated by inweb 6P91-->
|
||||
<!--Weave of '3/cf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Case-Insensitive Filenames</b></li></ul><p class="purpose">On some of the Unix-derived file systems on which Inform runs, filenames are case-sensitive, so that FISH and fish might be different files. This makes extension files, installed by the user, prone to being missed. The code in this section provides a routine to carry out file opening as if filenames are case-insensitive, and is used only for extensions.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP3">§3. Use of POSIX</a></li><li><a href="#SP4">§4. The routine</a></li><li><a href="#SP4_1">§4.1. Looking for case-insensitive matches instead</a></li><li><a href="#SP4_3">§4.3. Allocation and deallocation</a></li><li><a href="#SP4_6">§4.6. Pathname hacking</a></li><li><a href="#SP5">§5. Counting matches</a></li><li><a href="#SP6">§6. Non-POSIX tail</a></li></ul><hr class="tocbar">
|
||||
|
@ -370,7 +370,7 @@ and in any case the code above contains much larger buffers than needed.)
|
|||
|
||||
<p class="endnote">The function CIFilingSystem::fopen is used in <a href="#SP4">§4</a>, 3/fln (<a href="3-fln.html#SP10">§10</a>).</p>
|
||||
|
||||
<!--End of weave: 237 lines from a web of 9228-->
|
||||
<!--End of weave: 237 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/cla' generated by inweb 6P91-->
|
||||
<!--Weave of '3/cla' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Command Line Arguments</b></li></ul><p class="purpose">To parse the command line arguments with which inweb was called, and to handle any errors it needs to issue.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Model</a></li><li><a href="#SP2">§2. Switches</a></li><li><a href="#SP6">§6. Reading the command line</a></li><li><a href="#SP9">§9. Help text</a></li></ul><hr class="tocbar">
|
||||
|
@ -456,7 +456,7 @@ name and purpose.
|
|||
|
||||
<p class="endnote">The function CommandLine::compare_names is used in <a href="#SP9">§9</a>.</p>
|
||||
|
||||
<!--End of weave: 333 lines from a web of 9228-->
|
||||
<!--End of weave: 333 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/drc' generated by inweb 6P91-->
|
||||
<!--Weave of '3/drc' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Directories</b></li></ul><p class="purpose">Scanning directories on the host filing system.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>All of this abstracts the code already found in the platform definitions.
|
||||
|
@ -70,7 +70,7 @@ transcoded the other way.
|
|||
|
||||
<p class="endnote">The function Directories::close appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 45 lines from a web of 9228-->
|
||||
<!--End of weave: 45 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/em' generated by inweb 6P91-->
|
||||
<!--Weave of '3/em' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Error Messages</b></li></ul><p class="purpose">A basic system for command-line tool error messages.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Errors handler</a></li><li><a href="#SP2">§2. Error messages</a></li><li><a href="#SP4">§4. Deliberately crashing</a></li><li><a href="#SP5">§5. Survivable errors</a></li></ul><hr class="tocbar">
|
||||
|
@ -257,7 +257,7 @@ specify this at three levels of abstraction:
|
|||
|
||||
<p class="endnote">The function Errors::with_text appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 178 lines from a web of 9228-->
|
||||
<!--End of weave: 178 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/fln' generated by inweb 6P91-->
|
||||
<!--Weave of '3/fln' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Filenames</b></li></ul><p class="purpose">Given the different environments in which we might be running, and the large range of files we may need from within a project folder, it's useful to have a section of code simply to deduce filenames.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Storage</a></li><li><a href="#SP2">§2. Creation</a></li><li><a href="#SP3">§3. Strings to filenames</a></li><li><a href="#SP4">§4. The writer</a></li><li><a href="#SP6">§6. Reading off the folder</a></li><li><a href="#SP7">§7. Reading off the leafname</a></li><li><a href="#SP8">§8. Filename extensions</a></li><li><a href="#SP9">§9. Guessing file formats</a></li><li><a href="#SP10">§10. Opening</a></li><li><a href="#SP11">§11. Comparing</a></li></ul><hr class="tocbar">
|
||||
|
@ -72,7 +72,12 @@ as Unicode code points, regardless of what text encoding the locale has.)
|
|||
<span class="identifier">i</span><span class="plain">++;</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">pathname</span><span class="plain"> *</span><span class="identifier">P</span><span class="plain"> = </span><span class="identifier">NULL</span><span class="plain">;</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">pos</span><span class="plain"> > 0) </span><span class="identifier">P</span><span class="plain"> = </span><span class="functiontext">Pathnames::primitive</span><span class="plain">(</span><span class="identifier">path</span><span class="plain">, 0, </span><span class="identifier">pos</span><span class="plain">, </span><span class="identifier">NULL</span><span class="plain">);</span>
|
||||
<span class="reserved">if</span><span class="plain"> (</span><span class="identifier">pos</span><span class="plain"> >= 0) {</span>
|
||||
<span class="identifier">TEMPORARY_TEXT</span><span class="plain">(</span><span class="identifier">PT</span><span class="plain">);</span>
|
||||
<span class="functiontext">Str::substr</span><span class="plain">(</span><span class="identifier">PT</span><span class="plain">, </span><span class="functiontext">Str::at</span><span class="plain">(</span><span class="identifier">path</span><span class="plain">, 0), </span><span class="functiontext">Str::at</span><span class="plain">(</span><span class="identifier">path</span><span class="plain">, </span><span class="identifier">pos</span><span class="plain">));</span>
|
||||
<span class="identifier">P</span><span class="plain"> = </span><span class="functiontext">Pathnames::from_text</span><span class="plain">(</span><span class="identifier">PT</span><span class="plain">);</span>
|
||||
<span class="identifier">DISCARD_TEXT</span><span class="plain">(</span><span class="identifier">PT</span><span class="plain">);</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="reserved">return</span><span class="plain"> </span><span class="functiontext">Filenames::primitive</span><span class="plain">(</span><span class="identifier">path</span><span class="plain">, </span><span class="identifier">pos</span><span class="plain">+1, </span><span class="functiontext">Str::len</span><span class="plain">(</span><span class="identifier">path</span><span class="plain">), </span><span class="identifier">P</span><span class="plain">);</span>
|
||||
<span class="plain">}</span>
|
||||
|
||||
|
@ -347,7 +352,7 @@ when printed out.
|
|||
|
||||
<p class="endnote">The function Filenames::eq appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 259 lines from a web of 9228-->
|
||||
<!--End of weave: 264 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/pth' generated by inweb 6P91-->
|
||||
<!--Weave of '3/pth' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Pathnames</b></li></ul><p class="purpose">To manage references to locations in the host computer's file system.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. About pathnames</a></li><li><a href="#SP2">§2. Home folder</a></li><li><a href="#SP3">§3. Installation folder</a></li><li><a href="#SP4">§4. Creation</a></li><li><a href="#SP5">§5. Text to pathnames</a></li><li><a href="#SP6">§6. Writer</a></li><li><a href="#SP7">§7. Relative pathnames</a></li><li><a href="#SP8">§8. Existence in the file system</a></li></ul><hr class="tocbar">
|
||||
|
@ -167,7 +167,7 @@ then going one level deeper, using the supplied name.
|
|||
|
||||
<p class="endnote">The function Pathnames::subfolder is used in 5/ee (<a href="5-ee.html#SP6">§6</a>, <a href="5-ee.html#SP6_2">§6.2</a>).</p>
|
||||
|
||||
<p class="endnote">The function Pathnames::primitive is used in <a href="#SP5">§5</a>, 3/fln (<a href="3-fln.html#SP3">§3</a>).</p>
|
||||
<p class="endnote">The function Pathnames::primitive is used in <a href="#SP5">§5</a>.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP5"></a><b>§5. Text to pathnames. </b>The following takes a text of a name and returns a pathname,
|
||||
possibly relative to the home folder. Empty folder names are ignored
|
||||
|
@ -198,7 +198,7 @@ except possibly for an initial slash, so for example <code class="display"><span
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function Pathnames::from_text is used in <a href="#SP2">§2</a>, <a href="#SP3">§3</a>, 3/cla (<a href="3-cla.html#SP8_1">§8.1</a>, <a href="3-cla.html#SP8_1_1">§8.1.1</a>), 5/ee (<a href="5-ee.html#SP7_4">§7.4</a>).</p>
|
||||
<p class="endnote">The function Pathnames::from_text is used in <a href="#SP2">§2</a>, <a href="#SP3">§3</a>, 3/cla (<a href="3-cla.html#SP8_1">§8.1</a>, <a href="3-cla.html#SP8_1_1">§8.1.1</a>), 3/fln (<a href="3-fln.html#SP3">§3</a>), 5/ee (<a href="5-ee.html#SP7_4">§7.4</a>).</p>
|
||||
|
||||
<p class="endnote">The function Pathnames::from_text_relative appears nowhere else.</p>
|
||||
|
||||
|
@ -323,7 +323,7 @@ on the file system with that path.
|
|||
|
||||
<p class="endnote">The function Pathnames::create_in_file_system is used in 5/ee (<a href="5-ee.html#SP6">§6</a>, <a href="5-ee.html#SP6_2">§6.2</a>).</p>
|
||||
|
||||
<!--End of weave: 215 lines from a web of 9228-->
|
||||
<!--End of weave: 215 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/shl' generated by inweb 6P91-->
|
||||
<!--Weave of '3/shl' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Shell</b></li></ul><p class="purpose">Sending commands to the shell, on Unix-like platforms, or simulating this on Windows.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Operating system interface</a></li><li><a href="#SP5">§5. Actual commands</a></li></ul><hr class="tocbar">
|
||||
|
@ -182,9 +182,9 @@ all transcoded to UTF-8 in the most unlucky way imaginable.
|
|||
|
||||
<p class="endnote">The function Shell::verbose appears nowhere else.</p>
|
||||
|
||||
<p class="endnote">The function Shell::run is used in <a href="#SP2">§2</a>, <a href="#SP3">§3</a>, 1/pp (<a href="1-pp.html#SP14">§14</a>), 5/ee (<a href="5-ee.html#SP7_4_1">§7.4.1</a>, <a href="5-ee.html#SP7_4_2">§7.4.2</a>).</p>
|
||||
<p class="endnote">The function Shell::run is used in <a href="#SP2">§2</a>, <a href="#SP3">§3</a>, 1/pp (<a href="1-pp.html#SP13">§13</a>), 5/ee (<a href="5-ee.html#SP7_4_1">§7.4.1</a>, <a href="5-ee.html#SP7_4_2">§7.4.2</a>).</p>
|
||||
|
||||
<!--End of weave: 126 lines from a web of 9228-->
|
||||
<!--End of weave: 126 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/tm' generated by inweb 6P91-->
|
||||
<!--Weave of '3/tm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#3">Chapter 3: The Operating System</a></li><li><b>Time</b></li></ul><p class="purpose">Managing how we record and use the current time and date.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Clock</a></li><li><a href="#SP3">§3. Calendrical</a></li></ul><hr class="tocbar">
|
||||
|
@ -147,7 +147,7 @@ fairly low numbers, and this we now do.
|
|||
|
||||
<p class="endnote">The function Time::feast appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 112 lines from a web of 9228-->
|
||||
<!--End of weave: 112 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/chr' generated by inweb 6P91-->
|
||||
<!--Weave of '4/chr' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>Characters</b></li></ul><p class="purpose">Individual characters.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Character classes</a></li><li><a href="#SP4">§4. Unicode composition</a></li><li><a href="#SP5">§5. Accent stripping</a></li></ul><hr class="tocbar">
|
||||
|
@ -215,7 +215,7 @@ the more obvious accents from it.
|
|||
|
||||
<p class="endnote">The function Characters::remove_accent is used in <a href="#SP5">§5</a>.</p>
|
||||
|
||||
<!--End of weave: 152 lines from a web of 9228-->
|
||||
<!--End of weave: 152 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/cst' generated by inweb 6P91-->
|
||||
<!--Weave of '4/cst' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>C Strings</b></li></ul><p class="purpose">A minimal library for handling C-style strings.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>Programs using Foundation store text in <code class="display"><span class="extract">text_stream</span></code> structures almost all
|
||||
|
@ -183,7 +183,7 @@ hand. This I think makes for opaque code. So:
|
|||
|
||||
<p class="endnote">The function CStrings::truncated_strcpy is used in 2/dl (<a href="2-dl.html#SP6">§6</a>).</p>
|
||||
|
||||
<!--End of weave: 111 lines from a web of 9228-->
|
||||
<!--End of weave: 111 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/pm' generated by inweb 6P91-->
|
||||
<!--Weave of '4/pm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>Pattern Matching</b></li></ul><p class="purpose">To provide a limited regular-expression parser.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Character types</a></li><li><a href="#SP3">§3. Simple parsing</a></li><li><a href="#SP6">§6. A Worse PCRE</a></li><li><a href="#SP14">§14. Replacement</a></li></ul><hr class="tocbar">
|
||||
|
@ -632,7 +632,7 @@ For example,
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP14">§14</a> (twice).</p>
|
||||
|
||||
<!--End of weave: 437 lines from a web of 9228-->
|
||||
<!--End of weave: 437 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/sm' generated by inweb 6P91-->
|
||||
<!--Weave of '4/sm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>String Manipulation</b></li></ul><p class="purpose">Convenient routines for manipulating strings of text.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Strings are streams</a></li><li><a href="#SP2">§2. New strings</a></li><li><a href="#SP4">§4. Converting from C strings</a></li><li><a href="#SP6">§6. Converting to C strings</a></li><li><a href="#SP7">§7. Converting to integers</a></li><li><a href="#SP8">§8. Length</a></li><li><a href="#SP9">§9. Position markers</a></li><li><a href="#SP13">§13. Character operations</a></li><li><a href="#SP15">§15. Truncation</a></li><li><a href="#SP16">§16. Copying</a></li><li><a href="#SP18">§18. Comparisons</a></li><li><a href="#SP22">§22. White space</a></li><li><a href="#SP24">§24. Deleting characters</a></li><li><a href="#SP25">§25. Substrings</a></li><li><a href="#SP26">§26. Shim for literal storage</a></li></ul><hr class="tocbar">
|
||||
|
@ -267,7 +267,7 @@ at those positions may well not be, of course.)
|
|||
|
||||
<p class="endnote">The function Str::start is used in <a href="#SP12">§12</a>, <a href="#SP19">§19</a>, <a href="#SP23">§23</a>, 3/pth (<a href="3-pth.html#SP5">§5</a>).</p>
|
||||
|
||||
<p class="endnote">The function Str::at is used in <a href="#SP7">§7</a>, <a href="#SP13">§13</a>, <a href="#SP14">§14</a>, <a href="#SP15">§15</a>, <a href="#SP16">§16</a>, <a href="#SP24">§24</a>, 3/pth (<a href="3-pth.html#SP4">§4</a>, <a href="3-pth.html#SP5">§5</a>), 3/fln (<a href="3-fln.html#SP2">§2</a>, <a href="3-fln.html#SP9">§9</a>).</p>
|
||||
<p class="endnote">The function Str::at is used in <a href="#SP7">§7</a>, <a href="#SP13">§13</a>, <a href="#SP14">§14</a>, <a href="#SP15">§15</a>, <a href="#SP16">§16</a>, <a href="#SP24">§24</a>, 3/pth (<a href="3-pth.html#SP4">§4</a>, <a href="3-pth.html#SP5">§5</a>), 3/fln (<a href="3-fln.html#SP2">§2</a>, <a href="3-fln.html#SP3">§3</a>, <a href="3-fln.html#SP9">§9</a>).</p>
|
||||
|
||||
<p class="endnote">The function Str::end is used in <a href="#SP12">§12</a>, 3/fln (<a href="3-fln.html#SP9">§9</a>).</p>
|
||||
|
||||
|
@ -816,7 +816,7 @@ for the staff of a publishing house.)
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<p class="endnote">The function Str::substr appears nowhere else.</p>
|
||||
<p class="endnote">The function Str::substr is used in 3/fln (<a href="3-fln.html#SP3">§3</a>).</p>
|
||||
|
||||
<p class="endnote">The function Str::includes_character appears nowhere else.</p>
|
||||
|
||||
|
@ -876,7 +876,7 @@ is run just once per I-literal in the source code, when the program starts up.
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP26">§26</a>.</p>
|
||||
|
||||
<!--End of weave: 605 lines from a web of 9228-->
|
||||
<!--End of weave: 605 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/taa' generated by inweb 6P91-->
|
||||
<!--Weave of '4/taa' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>Tries and Avinues</b></li></ul><p class="purpose">To examine heads and tails of text, to see how it may inflect.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Tries</a></li><li><a href="#SP5">§5. Avinues</a></li><li><a href="#SP9">§9. Logging</a></li></ul><hr class="tocbar">
|
||||
|
@ -521,7 +521,7 @@ trie in turn until one matches (if it does).
|
|||
|
||||
<p class="endnote">The function Tries::log appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 375 lines from a web of 9228-->
|
||||
<!--End of weave: 375 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/tf' generated by inweb 6P91-->
|
||||
<!--Weave of '4/tf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>Text Files</b></li></ul><p class="purpose">To read text files of whatever flavour, one line at a time.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Text files</a></li><li><a href="#SP2">§2. Text file positions</a></li><li><a href="#SP5">§5. Text file scanner</a></li><li><a href="#SP8">§8. Reading UTF-8 files</a></li></ul><hr class="tocbar">
|
||||
|
@ -468,7 +468,7 @@ hyphens into em-rules when they are flanked by spaces, and so on.
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP8">§8</a>.</p>
|
||||
|
||||
<!--End of weave: 305 lines from a web of 9228-->
|
||||
<!--End of weave: 305 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/ws' generated by inweb 6P91-->
|
||||
<!--Weave of '4/ws' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#4">Chapter 4: Text Handling</a></li><li><b>Wide Strings.w</b></li></ul><p class="purpose">A minimal library for handling wide C strings.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>By "wide string", we mean an array of <code class="display"><span class="extract">wchar_t</span></code>. A pointer to this type
|
||||
|
@ -59,7 +59,7 @@ wrappers simply abstract the standard C library's handling.
|
|||
|
||||
<p class="endnote">The function Wide::atoi appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 30 lines from a web of 9228-->
|
||||
<!--End of weave: 30 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/ee' generated by inweb 6P91-->
|
||||
<!--Weave of '5/ee' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#5">Chapter 5: Generating Websites</a></li><li><b>Epub Ebooks</b></li></ul><p class="purpose">To provide for wrapping up sets of HTML files into ePub ebooks.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Ebooks</a></li><li><a href="#SP5">§5. Creation</a></li><li><a href="#SP6">§6. Construction</a></li></ul><hr class="tocbar">
|
||||
|
@ -906,7 +906,7 @@ impaired people.
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP7_4">§7.4</a>.</p>
|
||||
|
||||
<!--End of weave: 598 lines from a web of 9228-->
|
||||
<!--End of weave: 598 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/htm' generated by inweb 6P91-->
|
||||
<!--Weave of '5/htm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#5">Chapter 5: Generating Websites</a></li><li><b>HTML</b></li></ul><p class="purpose">Utility functions for writing HTML.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Abstraction</a></li><li><a href="#SP8">§8. Head</a></li><li><a href="#SP10">§10. Scripts and styles</a></li><li><a href="#SP12">§12. Body</a></li><li><a href="#SP13">§13. Divisions</a></li><li><a href="#SP14">§14. Images</a></li><li><a href="#SP15">§15. Links</a></li><li><a href="#SP16">§16. Tables</a></li><li><a href="#SP18">§18. Round-rects</a></li><li><a href="#SP19">§19. Miscellaneous</a></li><li><a href="#SP20">§20. HTML colours</a></li></ul><hr class="tocbar">
|
||||
|
@ -1002,7 +1002,7 @@ need to run quickly.
|
|||
|
||||
<p class="endnote">The function HTML::end_colour appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 757 lines from a web of 9228-->
|
||||
<!--End of weave: 757 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '6/bf' generated by inweb 6P91-->
|
||||
<!--Weave of '6/bf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#6">Chapter 6: Media</a></li><li><b>Binary Files</b></li></ul><p class="purpose">Routines for reading raw data from binary files.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Reading binary data</a></li><li><a href="#SP7">§7. Size</a></li><li><a href="#SP8">§8. Opening</a></li><li><a href="#SP9">§9. Copying</a></li></ul><hr class="tocbar">
|
||||
|
@ -324,7 +324,7 @@ or to system APIs.
|
|||
|
||||
<p class="endnote">The function BinaryFiles::copy appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 241 lines from a web of 9228-->
|
||||
<!--End of weave: 241 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '6/id' generated by inweb 6P91-->
|
||||
<!--Weave of '6/id' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#6">Chapter 6: Media</a></li><li><b>Image Dimensions</b></li></ul><p class="purpose">These utility routines look at the headers of JPEG and PNG files to find the pixel dimensions of any images supplied by the user for cover art and figures.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. JPEG files</a></li><li><a href="#SP2">§2. PNG files</a></li></ul><hr class="tocbar">
|
||||
|
@ -119,7 +119,7 @@ first two words (section 11.2.2).
|
|||
|
||||
<p class="endnote">The function ImageFiles::get_PNG_dimensions appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 97 lines from a web of 9228-->
|
||||
<!--End of weave: 97 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '6/sd' generated by inweb 6P91-->
|
||||
<!--Weave of '6/sd' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">foundation</a></li><li><a href="index.html#6">Chapter 6: Media</a></li><li><b>Sound Durations</b></li></ul><p class="purpose">These utility routines look at the headers of AIFF, OGG Vorbis or MIDI files to find the durations, and verify that they are what they purport to be.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. AIFF files</a></li><li><a href="#SP2">§2. OGG Vorbis files</a></li><li><a href="#SP3">§3. MIDI files</a></li></ul><hr class="tocbar">
|
||||
|
@ -364,7 +364,7 @@ officially support MIDI, which makes the question moot.
|
|||
|
||||
<p class="endnote">The function SoundFiles::get_MIDI_information appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 337 lines from a web of 9228-->
|
||||
<!--End of weave: 337 lines from a web of 9267-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/bsc' generated by inweb 6P91-->
|
||||
<!--Weave of '1/bsc' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#1">Chapter 1: Top Level</a></li><li><b>Basics</b></li></ul><p class="purpose">Some fundamental definitions, mostly setting up for the Foundation module to manage memory for us.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Build identity</a></li><li><a href="#SP2">§2. Setting up the memory manager</a></li></ul><hr class="tocbar">
|
||||
|
@ -20,7 +20,7 @@ build number as specified in the contents section of this web.
|
|||
|
||||
<pre class="definitions">
|
||||
<span class="definitionkeyword">define</span> <span class="constant">INTOOL_NAME</span><span class="plain"> </span><span class="string">"inweb"</span>
|
||||
<span class="definitionkeyword">define</span> <span class="constant">INWEB_BUILD</span><span class="plain"> </span><span class="string">"inweb [[Build Number]]"</span>
|
||||
<span class="definitionkeyword">define</span> <span class="constant">INWEB_BUILD</span><span class="plain"> </span><span class="string">"[[Version Number]]"</span>
|
||||
</pre>
|
||||
<p class="inwebparagraph"><a id="SP2"></a><b>§2. Setting up the memory manager. </b>We need to itemise the structures we'll want to allocate. To explicate this
|
||||
see Foundation, but these are all struct names with either <code class="display"><span class="extract">_MT</span></code> or, in one
|
||||
|
@ -95,7 +95,7 @@ types.
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<!--End of weave: 79 lines from a web of 20802-->
|
||||
<!--End of weave: 79 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/cnf' generated by inweb 6P91-->
|
||||
<!--Weave of '1/cnf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#1">Chapter 1: Top Level</a></li><li><b>Configuration</b></li></ul><p class="purpose">To parse the command line arguments with which inweb was called, and to handle any errors it needs to issue.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Instructions</a></li><li><a href="#SP2">§2. Reading the command line</a></li></ul><hr class="tocbar">
|
||||
|
@ -362,7 +362,7 @@ Otherwise, a range is a chapter number/letter, or a section range.
|
|||
|
||||
<p class="endnote">The function Configuration::set_fundamental_mode is used in <a href="#SP3">§3</a>.</p>
|
||||
|
||||
<!--End of weave: 295 lines from a web of 20802-->
|
||||
<!--End of weave: 295 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/pc' generated by inweb 6P91-->
|
||||
<!--Weave of '1/pc' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#1">Chapter 1: Top Level</a></li><li><b>Program Control</b></li></ul><p class="purpose">The top level, which decides what is to be done and then carries this plan out.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP6">§6. Main routine</a></li><li><a href="#SP7">§7. Following instructions</a></li><li><a href="#SP8">§8. Error messages</a></li></ul><hr class="tocbar">
|
||||
|
@ -482,7 +482,7 @@ source:
|
|||
|
||||
<p class="endnote">The function Main::error_in_web is used in 1/cnf (<a href="1-cnf.html#SP5">§5</a>), 2/tp (<a href="2-tp.html#SP1_1_6_3">§1.1.6.3</a>, <a href="2-tp.html#SP1_1_6_4">§1.1.6.4</a>, <a href="2-tp.html#SP1_1_6_6">§1.1.6.6</a>, <a href="2-tp.html#SP1_1_6_5_1">§1.1.6.5.1</a>, <a href="2-tp.html#SP1_1_6_5_1_1">§1.1.6.5.1.1</a>, <a href="2-tp.html#SP1_1_6_5_1_2">§1.1.6.5.1.2</a>, <a href="2-tp.html#SP1_1_6_5_1_3">§1.1.6.5.1.3</a>, <a href="2-tp.html#SP1_1_6_5_1_4">§1.1.6.5.1.4</a>, <a href="2-tp.html#SP1_1_6_5_1_7">§1.1.6.5.1.7</a>, <a href="2-tp.html#SP3">§3</a>), 2/ec (<a href="2-ec.html#SP3_1">§3.1</a>, <a href="2-ec.html#SP3_2">§3.2</a>, <a href="2-ec.html#SP3_3">§3.3</a>), 3/ta (<a href="3-ta.html#SP4_1">§4.1</a>), 3/tt (<a href="3-tt.html#SP3_1">§3.1</a>), 4/pl (<a href="4-pl.html#SP10">§10</a>), 4/cl (<a href="4-cl.html#SP3">§3</a>, <a href="4-cl.html#SP3_1">§3.1</a>, <a href="4-cl.html#SP3_4_2_1">§3.4.2.1</a>, <a href="4-cl.html#SP3_4_2_5">§3.4.2.5</a>, <a href="4-cl.html#SP22">§22</a>).</p>
|
||||
|
||||
<!--End of weave: 292 lines from a web of 20802-->
|
||||
<!--End of weave: 292 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '1/ptt' generated by inweb 6P91-->
|
||||
<!--Weave of '1/ptt' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#1">Chapter 1: Top Level</a></li><li><b>Patterns</b></li></ul><p class="purpose">Managing weave patterns, which are bundled configuration settings for weaving.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Reading in</a></li><li><a href="#SP5">§5. Obtaining files</a></li></ul><hr class="tocbar">
|
||||
|
@ -319,7 +319,7 @@ for payloads to be copied into weave, we make good use of the above:
|
|||
|
||||
<p class="endnote">The function Patterns::copy_file_into_weave is used in <a href="#SP6">§6</a>, 5/hf (<a href="5-hf.html#SP6">§6</a>, <a href="5-hf.html#SP9">§9</a>, <a href="5-hf.html#SP15">§15</a>).</p>
|
||||
|
||||
<!--End of weave: 196 lines from a web of 20802-->
|
||||
<!--End of weave: 196 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/bd' generated by inweb 6P91-->
|
||||
<!--Weave of '2/bd' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Bibliographic Data</b></li></ul><p class="purpose">To manage key-value pairs of bibliographic data, metadata if you like, associated with a given web.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Storing data</a></li><li><a href="#SP4">§4. Initialising a web</a></li><li><a href="#SP6">§6. Reading bibliographic data</a></li><li><a href="#SP7">§7. Writing bibliographic data</a></li></ul><hr class="tocbar">
|
||||
|
@ -75,7 +75,7 @@ convenient to store them directly here than to use a dictionary.
|
|||
<span class="reserved">bibliographic_datum</span><span class="plain"> *</span><span class="identifier">bd</span><span class="plain">;</span>
|
||||
<span class="identifier">TEMPORARY_TEXT</span><span class="plain">(</span><span class="identifier">IB</span><span class="plain">);</span>
|
||||
<span class="identifier">WRITE_TO</span><span class="plain">(</span><span class="identifier">IB</span><span class="plain">, </span><span class="string">"%s"</span><span class="plain">, </span><span class="constant">INWEB_BUILD</span><span class="plain">);</span>
|
||||
<span class="identifier">bd</span><span class="plain"> = </span><span class="functiontext">Bibliographic::set_datum</span><span class="plain">(</span><span class="identifier">W</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"Inweb Build"</span><span class="plain">, </span><span class="identifier">IB</span><span class="plain">); </span><span class="identifier">bd</span><span class="plain">-</span><span class="element">>declaration_permitted</span><span class="plain"> = </span><span class="constant">FALSE</span><span class="plain">;</span>
|
||||
<span class="identifier">bd</span><span class="plain"> = </span><span class="functiontext">Bibliographic::set_datum</span><span class="plain">(</span><span class="identifier">W</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"Inweb Version"</span><span class="plain">, </span><span class="identifier">IB</span><span class="plain">); </span><span class="identifier">bd</span><span class="plain">-</span><span class="element">>declaration_permitted</span><span class="plain"> = </span><span class="constant">FALSE</span><span class="plain">;</span>
|
||||
<span class="identifier">DISCARD_TEXT</span><span class="plain">(</span><span class="identifier">IB</span><span class="plain">);</span>
|
||||
|
||||
<span class="identifier">bd</span><span class="plain"> = </span><span class="functiontext">Bibliographic::set_datum</span><span class="plain">(</span><span class="identifier">W</span><span class="plain">, </span><span class="identifier">I</span><span class="string">"Author"</span><span class="plain">, </span><span class="identifier">NULL</span><span class="plain">); </span><span class="identifier">bd</span><span class="plain">-</span><span class="element">>declaration_mandatory</span><span class="plain"> = </span><span class="constant">TRUE</span><span class="plain">;</span>
|
||||
|
@ -226,7 +226,7 @@ want to typeset the title in full caps to do so.)
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP7">§7</a>.</p>
|
||||
|
||||
<!--End of weave: 151 lines from a web of 20802-->
|
||||
<!--End of weave: 151 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/ec' generated by inweb 6P91-->
|
||||
<!--Weave of '2/ec' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Enumerated Constants</b></li></ul><p class="purpose">To define sequentially numbered values for families of constants.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>The idea here is that each enumeration set is a sequence of named constants
|
||||
|
@ -180,7 +180,7 @@ the code at the last line on which an <code class="display"><span class="extract
|
|||
|
||||
<p class="endnote">The function Enumerations::define_extents is used in 3/tt (<a href="3-tt.html#SP1_1_1">§1.1.1</a>).</p>
|
||||
|
||||
<!--End of weave: 114 lines from a web of 20802-->
|
||||
<!--End of weave: 114 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/lc' generated by inweb 6P91-->
|
||||
<!--Weave of '2/lc' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Line Categories</b></li></ul><p class="purpose">To store individual lines from webs, and to categorise them according to their meaning.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Line storage</a></li><li><a href="#SP3">§3. Categories</a></li><li><a href="#SP5">§5. Command codes</a></li></ul><hr class="tocbar">
|
||||
|
@ -173,7 +173,7 @@ some of these fell into disuse in version 2 syntax.
|
|||
<span class="definitionkeyword">enum</span> <span class="constant">FIGURE_CMD</span>
|
||||
<span class="definitionkeyword">enum</span> <span class="constant">TAG_CMD</span>
|
||||
</pre>
|
||||
<!--End of weave: 141 lines from a web of 20802-->
|
||||
<!--End of weave: 141 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/mdl' generated by inweb 6P91-->
|
||||
<!--Weave of '2/mdl' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Modules</b></li></ul><p class="purpose">To search for included modules, and track dependencies between them.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP4">§4. Dependencies</a></li><li><a href="#SP5">§5. Searching</a></li></ul><hr class="tocbar">
|
||||
|
@ -215,7 +215,7 @@ module by name.
|
|||
|
||||
<p class="endnote">The function Modules::find_loaded_by_name is used in 6/mkf (<a href="6-mkf.html#SP2_9">§2.9</a>, <a href="6-mkf.html#SP2_11">§2.11</a>).</p>
|
||||
|
||||
<!--End of weave: 131 lines from a web of 20802-->
|
||||
<!--End of weave: 131 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/pm' generated by inweb 6P91-->
|
||||
<!--Weave of '2/pm' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Paragraph Macros</b></li></ul><p class="purpose">To manage the set of named paragraph macros in a section.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP3">§3. Paragraph macro search</a></li></ul><hr class="tocbar">
|
||||
|
@ -74,7 +74,7 @@ much faster.
|
|||
|
||||
<p class="endnote">The function Macros::find_by_name is used in 2/pn (<a href="2-pn.html#SP1_1">§1.1</a>), 3/tw (<a href="3-tw.html#SP1_3_3_1_9_6">§1.3.3.1.9.6</a>), 3/tt (<a href="3-tt.html#SP3_1">§3.1</a>).</p>
|
||||
|
||||
<!--End of weave: 45 lines from a web of 20802-->
|
||||
<!--End of weave: 45 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/pn' generated by inweb 6P91-->
|
||||
<!--Weave of '2/pn' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Paragraph Numbering</b></li></ul><p class="purpose">To work out paragraph numbers within each section.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>Traditional LP tools have numbered paragraphs in the obvious way, starting
|
||||
|
@ -270,7 +270,7 @@ chosen by the author, so 2 it is.
|
|||
|
||||
<p class="endnote">The function Numbering::settle_paragraph_number is used in <a href="#SP1_2_5">§1.2.5</a>.</p>
|
||||
|
||||
<!--End of weave: 161 lines from a web of 20802-->
|
||||
<!--End of weave: 161 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/tgs' generated by inweb 6P91-->
|
||||
<!--Weave of '2/tgs' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>Tags</b></li></ul><p class="purpose">Thematic tags can be attached to certain paragraphs, some automatically by Inweb, others manually by the author.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>A tag really is just a textual name. Each differently-named tag leads
|
||||
|
@ -241,7 +241,7 @@ doesn't specify a tag.)
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP7">§7</a> (twice).</p>
|
||||
|
||||
<!--End of weave: 171 lines from a web of 20802-->
|
||||
<!--End of weave: 171 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/tp' generated by inweb 6P91-->
|
||||
<!--Weave of '2/tp' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>The Parser</b></li></ul><p class="purpose">To work through the program read in, assigning each line its category, and noting down other useful information as we go.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Sequence of parsing</a></li><li><a href="#SP1_1_6">§1.1.6. Categorisatiom</a></li><li><a href="#SP3">§3. Version errors</a></li></ul><hr class="tocbar">
|
||||
|
@ -1087,7 +1087,7 @@ when it comes to Inweb's exit code, so they will halt a make.
|
|||
|
||||
<p class="endnote">The function Parser::wrong_version is used in <a href="#SP1_1_1">§1.1.1</a>, <a href="#SP1_1_5">§1.1.5</a>, <a href="#SP1_1_6">§1.1.6</a>, <a href="#SP1_1_6_3">§1.1.6.3</a>, <a href="#SP1_1_6_5_1">§1.1.6.5.1</a>, <a href="#SP1_1_6_5_1_1">§1.1.6.5.1.1</a>, <a href="#SP1_1_6_5_1_2">§1.1.6.5.1.2</a>, <a href="#SP1_1_6_5_1_3">§1.1.6.5.1.3</a>, <a href="#SP1_1_6_5_1_4">§1.1.6.5.1.4</a>, <a href="#SP1_1_6_5_1_5">§1.1.6.5.1.5</a>, 3/tw (<a href="3-tw.html#SP1_3_3_1_2_1">§1.3.3.1.2.1</a>).</p>
|
||||
|
||||
<!--End of weave: 702 lines from a web of 20802-->
|
||||
<!--End of weave: 702 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '2/tr' generated by inweb 6P91-->
|
||||
<!--Weave of '2/tr' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#2">Chapter 2: Parsing a Web</a></li><li><b>The Reader</b></li></ul><p class="purpose">To read the Contents section of the web, and through that each of the other sections in turn, and to collate all of this material.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Web storage</a></li><li><a href="#SP5">§5. Chapters and sections</a></li><li><a href="#SP7">§7. Reading the contents page</a></li><li><a href="#SP10">§10. Reading source files</a></li><li><a href="#SP11">§11. Looking up chapters and sections</a></li><li><a href="#SP13">§13. Ranges and containment</a></li><li><a href="#SP14">§14. Tangle targets</a></li><li><a href="#SP17">§17. Additional header files</a></li></ul><hr class="tocbar">
|
||||
|
@ -1171,7 +1171,7 @@ get around the lack of some POSIX facilities on Windows.)
|
|||
|
||||
<p class="endnote">The function Reader::add_imported_header is used in <a href="#SP9_3_3_2">§9.3.3.2</a>.</p>
|
||||
|
||||
<!--End of weave: 807 lines from a web of 20802-->
|
||||
<!--End of weave: 807 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/ta' generated by inweb 6P91-->
|
||||
<!--Weave of '3/ta' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#3">Chapter 3: Outputs</a></li><li><b>The Analyser</b></li></ul><p class="purpose">Here we analyse the code in the web, enabling us to see how functions and data structures are used within the program.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Scanning webs</a></li><li><a href="#SP2">§2. The section catalogue</a></li><li><a href="#SP3">§3. Analysing code</a></li><li><a href="#SP5">§5. Identifier searching</a></li><li><a href="#SP6">§6. The identifier hash table</a></li><li><a href="#SP13">§13. Open-source project support</a></li></ul><hr class="tocbar">
|
||||
|
@ -513,7 +513,7 @@ folder: failing that, we fall back on a default script belonging to Inweb.
|
|||
|
||||
<p class="endnote">The function Analyser::write_gitignore is used in 1/pc (<a href="1-pc.html#SP7_2_1">§7.2.1</a>).</p>
|
||||
|
||||
<!--End of weave: 363 lines from a web of 20802-->
|
||||
<!--End of weave: 363 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/ti' generated by inweb 6P91-->
|
||||
<!--Weave of '3/ti' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#3">Chapter 3: Outputs</a></li><li><b>The Indexer</b></li></ul><p class="purpose">To construct indexes of the material woven, following a template.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Cover sheets</a></li><li><a href="#SP3">§3. Full index pages</a></li><li><a href="#SP4">§4. Running the interpreter</a></li><li><a href="#SP4_2">§4.2. File handling</a></li><li><a href="#SP4_1_1">§4.1.1. The repeat stack and loops</a></li><li><a href="#SP4_1_8">§4.1.8. Variable substitutions</a></li><li><a href="#SP5">§5. Transcribing CSS</a></li></ul><hr class="tocbar">
|
||||
|
@ -797,7 +797,7 @@ its square-bracketed parts.
|
|||
|
||||
<p class="endnote">The function Indexer::copy_CSS appears nowhere else.</p>
|
||||
|
||||
<!--End of weave: 522 lines from a web of 20802-->
|
||||
<!--End of weave: 522 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/ts' generated by inweb 6P91-->
|
||||
<!--Weave of '3/ts' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#3">Chapter 3: Outputs</a></li><li><b>The Swarm</b></li></ul><p class="purpose">To feed multiple output requests to the weaver, and to present weaver results, and update indexes or contents pages.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Swarming</a></li></ul><hr class="tocbar">
|
||||
|
@ -255,7 +255,7 @@ generic <code class="display"><span class="extract">index.html</span></code> if
|
|||
|
||||
<p class="endnote">The function Swarm::weave_index_templates is used in <a href="#SP1">§1</a>.</p>
|
||||
|
||||
<!--End of weave: 177 lines from a web of 20802-->
|
||||
<!--End of weave: 177 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/tt' generated by inweb 6P91-->
|
||||
<!--Weave of '3/tt' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#3">Chapter 3: Outputs</a></li><li><b>The Tangler</b></li></ul><p class="purpose">To transcribe a version of the text in the web into a form which can be compiled as a program.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. The Master Tangler</a></li><li><a href="#SP3">§3. The Code Tangler</a></li><li><a href="#SP4">§4. Prinary target</a></li></ul><hr class="tocbar">
|
||||
|
@ -359,7 +359,7 @@ passes straight through. So <code class="display"><span class="extract">[[water]
|
|||
|
||||
<p class="endnote">The function Tangler::primary_target is used in 1/pc (<a href="1-pc.html#SP7_2_2">§7.2.2</a>), 2/tr (<a href="2-tr.html#SP9_2">§9.2</a>, <a href="2-tr.html#SP9_3_1">§9.3.1</a>, <a href="2-tr.html#SP9_3_3_2">§9.3.3.2</a>), 3/ta (<a href="3-ta.html#SP4">§4</a>, <a href="3-ta.html#SP4_1">§4.1</a>), 4/cl (<a href="4-cl.html#SP3">§3</a>, <a href="4-cl.html#SP3_2">§3.2</a>, <a href="4-cl.html#SP9_1">§9.1</a>, <a href="4-cl.html#SP9_4">§9.4</a>), 4/is (<a href="4-is.html#SP3">§3</a>, <a href="4-is.html#SP6">§6</a>, <a href="4-is.html#SP7">§7</a>).</p>
|
||||
|
||||
<!--End of weave: 235 lines from a web of 20802-->
|
||||
<!--End of weave: 235 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '3/tw' generated by inweb 6P91-->
|
||||
<!--Weave of '3/tw' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#3">Chapter 3: Outputs</a></li><li><b>The Weaver</b></li></ul><p class="purpose">To weave a portion of the code into instructions for TeX.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. The Master Weaver</a></li><li><a href="#SP1_3_1">§1.3.1. The state</a></li><li><a href="#SP1_3_3">§1.3.3. Weaving a section</a></li><li><a href="#SP1_3_3_1_1">§1.3.3.1.1. Reasons to skip things</a></li><li><a href="#SP1_3_3_1_3">§1.3.3.1.3. Headings</a></li><li><a href="#SP1_3_3_1_8">§1.3.3.1.8. Commentary matter</a></li><li><a href="#SP1_3_3_1_9">§1.3.3.1.9. Code-like matter</a></li><li><a href="#SP1_3_3_1_10">§1.3.3.1.10. How paragraphs begin</a></li><li><a href="#SP1_3_3_2">§1.3.3.2. How paragraphs end</a></li><li><a href="#SP2">§2. Endnotes</a></li><li><a href="#SP3">§3. Section tables of contents</a></li></ul><hr class="tocbar">
|
||||
|
@ -1291,7 +1291,7 @@ marked as <code class="display"><span class="extract">@h</span></code> headings.
|
|||
|
||||
<p class="endnote">The function Weaver::weave_table_of_contents is used in <a href="#SP1_3_3_1_3">§1.3.3.1.3</a>, <a href="#SP1_3_3_1_4">§1.3.3.1.4</a>.</p>
|
||||
|
||||
<!--End of weave: 821 lines from a web of 20802-->
|
||||
<!--End of weave: 821 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/cl' generated by inweb 6P91-->
|
||||
<!--Weave of '4/cl' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#4">Chapter 4: Languages</a></li><li><b>C-Like Languages</b></li></ul><p class="purpose">To provide special features for the whole C family of languages.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP2">§2. </a></li><li><a href="#SP3">§3. Parsing</a></li><li><a href="#SP3_2">§3.2. Structures</a></li><li><a href="#SP3_3">§3.3. Structure dependency</a></li><li><a href="#SP3_4">§3.4. Functions</a></li><li><a href="#SP5">§5. Subcategorisation</a></li><li><a href="#SP6">§6. Tangling extras</a></li><li><a href="#SP9">§9. Tangling predeclarations</a></li><li><a href="#SP10">§10. Line markers</a></li><li><a href="#SP11">§11. Comments</a></li><li><a href="#SP13">§13. Ifdefs</a></li><li><a href="#SP14">§14. Before and after expansion</a></li><li><a href="#SP15">§15. Begin weave</a></li><li><a href="#SP16">§16. Syntax colouring</a></li><li><a href="#SP19">§19. Overriding regular code weaving</a></li><li><a href="#SP20">§20. Analysis</a></li></ul><hr class="tocbar">
|
||||
|
@ -1522,7 +1522,7 @@ bibliographic variable, but don't do that.
|
|||
|
||||
<p class="endnote">The function CLike::post_analysis is used in <a href="#SP2">§2</a>.</p>
|
||||
|
||||
<!--End of weave: 1014 lines from a web of 20802-->
|
||||
<!--End of weave: 1014 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/is' generated by inweb 6P91-->
|
||||
<!--Weave of '4/is' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#4">Chapter 4: Languages</a></li><li><b>InC Support</b></li></ul><p class="purpose">To support a modest extension of C called InC.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP3">§3. Parsing methods</a></li><li><a href="#SP3_1">§3.1. Parsing Preform grammar</a></li><li><a href="#SP3_1_1_1">§3.1.1.1. Parsing the body of Preform grammar</a></li><li><a href="#SP3_2">§3.2. Parsing I-literals</a></li><li><a href="#SP4">§4. Tangling methods</a></li><li><a href="#SP14">§14. Weaving</a></li><li><a href="#SP15">§15. Weaving methods</a></li><li><a href="#SP18">§18. Analysis methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -1534,7 +1534,7 @@ exists. We watch for it here:
|
|||
|
||||
<p class="endnote">The function InCSupport::share_element is used in <a href="#SP1">§1</a>.</p>
|
||||
|
||||
<!--End of weave: 993 lines from a web of 20802-->
|
||||
<!--End of weave: 993 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/is2' generated by inweb 6P91-->
|
||||
<!--Weave of '4/is2' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#4">Chapter 4: Languages</a></li><li><b>Inform Support</b></li></ul><p class="purpose">To support webs written in Inform 6 or 7.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Inform 6</a></li><li><a href="#SP2">§2. Inform 7</a></li></ul><hr class="tocbar">
|
||||
|
@ -87,7 +87,7 @@ a spurious comment betraying Inweb's involvement in the process.
|
|||
|
||||
<p class="endnote">The function InformSupport::suppress_disclaimer is used in <a href="#SP2">§2</a>.</p>
|
||||
|
||||
<!--End of weave: 51 lines from a web of 20802-->
|
||||
<!--End of weave: 51 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/pl' generated by inweb 6P91-->
|
||||
<!--Weave of '4/pl' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#4">Chapter 4: Languages</a></li><li><b>Programming Languages</b></li></ul><p class="purpose">To characterise the relevant differences in behaviour between the various programming languages supported.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Languages</a></li><li><a href="#SP3">§3. Creation</a></li><li><a href="#SP4">§4. Parsing methods</a></li><li><a href="#SP7">§7. Tangling methods</a></li><li><a href="#SP22">§22. Weaving methods</a></li><li><a href="#SP28">§28. Analysis methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -803,7 +803,7 @@ special treatment, and this method decides which.
|
|||
|
||||
<p class="endnote">The function Languages::share_element is used in 4/cl (<a href="4-cl.html#SP3_2_3_6">§3.2.3.6</a>).</p>
|
||||
|
||||
<!--End of weave: 510 lines from a web of 20802-->
|
||||
<!--End of weave: 510 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '4/ps' generated by inweb 6P91-->
|
||||
<!--Weave of '4/ps' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#4">Chapter 4: Languages</a></li><li><b>Perl Support</b></li></ul><p class="purpose">To support webs written in Perl.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP2">§2. Tangling methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -144,7 +144,7 @@ principle overloading its comment notation <code class="display"><span class="ex
|
|||
|
||||
<p class="endnote">The function PerlSupport::parse_comment is used in <a href="#SP1">§1</a>.</p>
|
||||
|
||||
<!--End of weave: 94 lines from a web of 20802-->
|
||||
<!--End of weave: 94 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/hf' generated by inweb 6P91-->
|
||||
<!--Weave of '5/hf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#5">Chapter 5: Formats</a></li><li><b>HTML Formats</b></li></ul><p class="purpose">To provide for weaving into HTML and into EPUB books.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP2">§2. Current state</a></li><li><a href="#SP6">§6. Methods</a></li><li><a href="#SP26">§26. EPUB-only methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -851,7 +851,7 @@ the page, and this drops one.
|
|||
|
||||
<p class="endnote">The function HTMLFormat::end_weaving_EPUB is used in <a href="#SP1_2">§1.2</a>.</p>
|
||||
|
||||
<!--End of weave: 615 lines from a web of 20802-->
|
||||
<!--End of weave: 615 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/ptf' generated by inweb 6P91-->
|
||||
<!--Weave of '5/ptf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#5">Chapter 5: Formats</a></li><li><b>Plain Text Format</b></li></ul><p class="purpose">To provide for weaving in plain text format, which is not very interesting, but ought to be available.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP2">§2. Methods</a></li></ul><hr class="tocbar">
|
||||
|
@ -283,7 +283,7 @@
|
|||
|
||||
<p class="endnote">The function PlainText::tail is used in <a href="#SP1">§1</a>.</p>
|
||||
|
||||
<!--End of weave: 165 lines from a web of 20802-->
|
||||
<!--End of weave: 165 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/rtt' generated by inweb 6P91-->
|
||||
<!--Weave of '5/rtt' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#5">Chapter 5: Formats</a></li><li><b>Running Through TeX</b></li></ul><p class="purpose">To post-process a weave by running it through TeX, or one of its variant typesetting programs.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Running TeX</a></li><li><a href="#SP4">§4. Reporting</a></li></ul><hr class="tocbar">
|
||||
|
@ -275,7 +275,7 @@ for the user to find out what those errors were.
|
|||
|
||||
<p class="endnote">The function RunningTeX::substitute_post_processing_data is used in 5/tf (<a href="5-tf.html#SP27">§27</a>).</p>
|
||||
|
||||
<!--End of weave: 178 lines from a web of 20802-->
|
||||
<!--End of weave: 178 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/tf' generated by inweb 6P91-->
|
||||
<!--Weave of '5/tf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#5">Chapter 5: Formats</a></li><li><b>TeX Format</b></li></ul><p class="purpose">To provide for weaving in the standard maths and science typesetting software, TeX.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Creation</a></li><li><a href="#SP2">§2. Methods</a></li><li><a href="#SP25">§25. Post-processing</a></li><li><a href="#SP28">§28. Removing math mode</a></li></ul><hr class="tocbar">
|
||||
|
@ -881,7 +881,7 @@ To do this, the weaver calls the following.
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP28">§28</a>.</p>
|
||||
|
||||
<!--End of weave: 577 lines from a web of 20802-->
|
||||
<!--End of weave: 577 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '5/wf' generated by inweb 6P91-->
|
||||
<!--Weave of '5/wf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#5">Chapter 5: Formats</a></li><li><b>Weave Formats</b></li></ul><p class="purpose">To characterise the different weaving output formats (text, typeset, web and so on).</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Formats</a></li><li><a href="#SP3">§3. Creation</a></li><li><a href="#SP4">§4. Methods</a></li><li><a href="#SP28">§28. Post-processing</a></li></ul><hr class="tocbar">
|
||||
|
@ -837,7 +837,7 @@ text like <code class="display"><span class="extract">[[PDF Size]]</span></code>
|
|||
|
||||
<p class="endnote">The function Formats::substitute_post_processing_data is used in 3/ti (<a href="3-ti.html#SP4_1_8_2">§4.1.8.2</a>, <a href="3-ti.html#SP4_1_8_3">§4.1.8.3</a>, <a href="3-ti.html#SP4_1_8_4">§4.1.8.4</a>).</p>
|
||||
|
||||
<!--End of weave: 540 lines from a web of 20802-->
|
||||
<!--End of weave: 540 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '6/gs' generated by inweb 6P91-->
|
||||
<!--Weave of '6/gs' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#6">Chapter 6: Extras</a></li><li><b>Git Support</b></li></ul><p class="purpose">Constructing a suitable gitignore file for a simple inweb project.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>This section offers just one function, which constructs a <code class="display"><span class="extract">.gitignore</span></code>
|
||||
|
@ -103,7 +103,7 @@ file by following a "prototype".
|
|||
|
||||
<p class="endnote">This code is used in <a href="#SP2">§2</a>.</p>
|
||||
|
||||
<!--End of weave: 62 lines from a web of 20802-->
|
||||
<!--End of weave: 62 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of '6/mkf' generated by inweb 6P91-->
|
||||
<!--Weave of '6/mkf' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#6">Chapter 6: Extras</a></li><li><b>Makefiles</b></li></ul><p class="purpose">Constructing a suitable makefile for a simple inweb project.</p>
|
||||
|
||||
<p class="inwebparagraph"><a id="SP1"></a><b>§1. </b>This section offers just one function, which constructs a makefile by
|
||||
|
@ -298,7 +298,7 @@ following a "prototype".
|
|||
<span class="identifier">MW</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">, </span><span class="identifier">MW</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">, </span><span class="identifier">MW</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">);</span>
|
||||
<span class="reserved">module</span><span class="plain"> *</span><span class="identifier">X</span><span class="plain">;</span>
|
||||
<span class="identifier">LOOP_OVER_LINKED_LIST</span><span class="plain">(</span><span class="identifier">X</span><span class="plain">, </span><span class="reserved">module</span><span class="plain">, </span><span class="identifier">MW</span><span class="plain">-</span><span class="element">>dependencies</span><span class="plain">) {</span>
|
||||
<span class="identifier">WRITE</span><span class="plain">(</span><span class="string">" $(%SWEB)/Contents.w $(%SWEB)/Chapter*/*.w $(%SWEB)/Sections/*.w"</span><span class="plain">,</span>
|
||||
<span class="identifier">WRITE</span><span class="plain">(</span><span class="string">" $(%SWEB)/Contents.w $(%SWEB)/Chapter*/*.w"</span><span class="plain">,</span>
|
||||
<span class="identifier">X</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">, </span><span class="identifier">X</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">, </span><span class="identifier">X</span><span class="plain">-</span><span class="element">>module_name</span><span class="plain">);</span>
|
||||
<span class="plain">}</span>
|
||||
<span class="identifier">WRITE</span><span class="plain">(</span><span class="string">"\</span><span class="plain">n</span><span class="string">"</span><span class="plain">);</span>
|
||||
|
@ -372,7 +372,7 @@ following a "prototype".
|
|||
|
||||
<p class="endnote">The function Makefiles::repeat is used in <a href="#SP2_3">§2.3</a>, <a href="#SP2_4">§2.4</a>.</p>
|
||||
|
||||
<!--End of weave: 235 lines from a web of 20802-->
|
||||
<!--End of weave: 235 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of 'P/awwp' generated by inweb 6P91-->
|
||||
<!--Weave of 'P/awwp' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Advanced Weaving with Patterns</b></li></ul><p class="purpose">Customise the booklets woven from a web.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Weave patterns</a></li><li><a href="#SP4">§4. Cover sheets</a></li><li><a href="#SP5">§5. Indexing</a></li></ul><hr class="tocbar">
|
||||
|
@ -311,7 +311,7 @@ a repetition, but happens just once, for the named chapter or section.
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<!--End of weave: 198 lines from a web of 20802-->
|
||||
<!--End of weave: 198 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of 'P/htwaw' generated by inweb 6P91-->
|
||||
<!--Weave of 'P/htwaw' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>How to Write a Web</b></li></ul><p class="purpose">How to mark up code for literate programming.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. The title of a section</a></li><li><a href="#SP2">§2. Paragraphing</a></li><li><a href="#SP6">§6. Conditional compilation</a></li><li><a href="#SP7">§7. Commentary</a></li></ul><hr class="tocbar">
|
||||
|
@ -503,7 +503,7 @@ be rendered in HTML as <code class="display"><span class="extract">x <= y</sp
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<!--End of weave: 312 lines from a web of 20802-->
|
||||
<!--End of weave: 312 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of 'P/iti' generated by inweb 6P91-->
|
||||
<!--Weave of 'P/iti' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Introduction to Inweb</b></li></ul><p class="purpose">What Inweb is, and why it is not CWEB.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. Introduction</a></li><li><a href="#SP2">§2. Installation</a></li><li><a href="#SP4">§4. Historical note</a></li></ul><hr class="tocbar">
|
||||
|
@ -134,7 +134,8 @@ decides by the following set of rules:
|
|||
<ul class="items"><li>(a) If the user, at the command line, specified <code class="display"><span class="extract">-at P</span></code>, for some path
|
||||
<code class="display"><span class="extract">P</span></code>, then we use that.
|
||||
</li><li>(b) Otherwise, if the host operating system can indeed tell us where the
|
||||
executable is, we use that. This is currently implemented only on Linux.
|
||||
executable is, we use that. This is currently implemented only on MacOS,
|
||||
Windows and Linux.
|
||||
</li><li>(c) Otherwise, if the environment variable <code class="display"><span class="extract">$INWEB_PATH</span></code> exists and is
|
||||
non-empty, we use that.
|
||||
</li><li>(d) And if all else fails, we assume that the location is <code class="display"><span class="extract">inweb</span></code>, with
|
||||
|
@ -237,7 +238,7 @@ with this breakpoint". We do not recommend this.
|
|||
<ul class="items"><li>(d) Inweb can be used with much larger programs divided into sections
|
||||
and, if desired, chapters.
|
||||
</li></ul>
|
||||
<!--End of weave: 182 lines from a web of 20802-->
|
||||
<!--End of weave: 183 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of 'P/tid' generated by inweb 6P91-->
|
||||
<!--Weave of 'P/tid' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>The InC Dialect</b></li></ul><p class="purpose">A modest extension of C used by the Inform project.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. The InC language</a></li></ul><hr class="tocbar">
|
||||
|
@ -120,7 +120,7 @@ notation means, but for example:
|
|||
|
||||
<p class="inwebparagraph"></p>
|
||||
|
||||
<!--End of weave: 70 lines from a web of 20802-->
|
||||
<!--End of weave: 70 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!--Weave of 'P/wtaw' generated by inweb 6P91-->
|
||||
<!--Weave of 'P/wtaw' generated by 7-->
|
||||
<ul class="crumbs"><li><a href="../webs.html">★</a></li><li><a href="index.html">inweb 7</a></li><li><a href="index.html#P">Preliminaries</a></li><li><b>Webs, Tangling and Weaving</b></li></ul><p class="purpose">How to use Inweb to weave or tangle a web already written.</p>
|
||||
|
||||
<ul class="toc"><li><a href="#SP1">§1. All-in-one webs</a></li><li><a href="#SP4">§4. Multi-section webs</a></li><li><a href="#SP7">§7. Tangling</a></li><li><a href="#SP10">§10. Weaving</a></li><li><a href="#SP13">§13. Weave tags</a></li><li><a href="#SP14">§14. Modules</a></li><li><a href="#SP17">§17. The section catalogue</a></li><li><a href="#SP18">§18. Makefile</a></li><li><a href="#SP19">§19. Gitignore</a></li><li><a href="#SP20">§20. GitHub Pages support</a></li></ul><hr class="tocbar">
|
||||
|
@ -859,7 +859,7 @@ expect that to be able to link to a <code class="display"><span class="extract">
|
|||
above them.
|
||||
</p>
|
||||
|
||||
<!--End of weave: 554 lines from a web of 20802-->
|
||||
<!--End of weave: 554 lines from a web of 20842-->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Reference in a new issue