diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 14:25:59 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 14:25:59 +0000 |
| commit | ff121fcbb461a4d8f768e87128facf32e6272889 (patch) | |
| tree | 12cccac70566d4159c9edeb5270889c6958e9c29 | |
| parent | 2fc1af63b20ab67683b74e6bb8f2a3edf5ef2a3d (diff) | |
Group language manuals into function and keyword directories
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
| -rw-r--r-- | AGENTS/ARCH.md | 13 | ||||
| -rw-r--r-- | cmake/Manual.cmake | 2 | ||||
| -rw-r--r-- | cmake/Release.cmake | 19 | ||||
| -rw-r--r-- | doc/build.md | 6 | ||||
| -rw-r--r-- | doc/install.md | 7 | ||||
| -rw-r--r-- | doc/language/cpsc-language-overview.7.md | 66 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-asc.7.md (renamed from doc/language/cpsc-function-asc.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-chr.7.md (renamed from doc/language/cpsc-function-chr.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-eof.7.md (renamed from doc/language/cpsc-function-eof.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-is_num.7.md (renamed from doc/language/cpsc-function-is_num.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-lcase.7.md (renamed from doc/language/cpsc-function-lcase.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-left.7.md (renamed from doc/language/cpsc-function-left.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-length.7.md (renamed from doc/language/cpsc-function-length.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-mid.7.md (renamed from doc/language/cpsc-function-mid.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-num_to_str.7.md (renamed from doc/language/cpsc-function-num_to_str.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-right.7.md (renamed from doc/language/cpsc-function-right.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-str_to_num.7.md (renamed from doc/language/cpsc-function-str_to_num.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/function/cpsc-function-ucase.7.md (renamed from doc/language/cpsc-function-ucase.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-and.7.md (renamed from doc/language/cpsc-keyword-and.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-call.7.md (renamed from doc/language/cpsc-keyword-call.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-class.7.md (renamed from doc/language/cpsc-keyword-class.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-closefile.7.md (renamed from doc/language/cpsc-keyword-closefile.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-declare.7.md (renamed from doc/language/cpsc-keyword-declare.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-div.7.md (renamed from doc/language/cpsc-keyword-div.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-for.7.md (renamed from doc/language/cpsc-keyword-for.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-function.7.md (renamed from doc/language/cpsc-keyword-function.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-if.7.md (renamed from doc/language/cpsc-keyword-if.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-input.7.md (renamed from doc/language/cpsc-keyword-input.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-mod.7.md (renamed from doc/language/cpsc-keyword-mod.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-not.7.md (renamed from doc/language/cpsc-keyword-not.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-openfile.7.md (renamed from doc/language/cpsc-keyword-openfile.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-or.7.md (renamed from doc/language/cpsc-keyword-or.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-output.7.md (renamed from doc/language/cpsc-keyword-output.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-procedure.7.md (renamed from doc/language/cpsc-keyword-procedure.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-readfile.7.md (renamed from doc/language/cpsc-keyword-readfile.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-repeat.7.md (renamed from doc/language/cpsc-keyword-repeat.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-type.7.md (renamed from doc/language/cpsc-keyword-type.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-while.7.md (renamed from doc/language/cpsc-keyword-while.7.md) | 2 | ||||
| -rw-r--r-- | doc/language/keyword/cpsc-keyword-writefile.7.md (renamed from doc/language/cpsc-keyword-writefile.7.md) | 2 | ||||
| -rw-r--r-- | install.ps1 | 28 | ||||
| -rwxr-xr-x | install.sh | 7 |
41 files changed, 120 insertions, 94 deletions
diff --git a/AGENTS/ARCH.md b/AGENTS/ARCH.md index e551c8f..cb2e6a3 100644 --- a/AGENTS/ARCH.md +++ b/AGENTS/ARCH.md @@ -117,7 +117,7 @@ timestamp (`yyyy-mm-dd-hh-mm-ss`) followed by its short ID. Git is only required for packaging; recipients can install the extracted archive using just the script. The Windows `install.ps1` installs `cpsc.exe`, `doc/cpsc.html` and -`doc/language/*.html` for the current user under `%LOCALAPPDATA%\Programs\cpsc` (or `-Prefix`). It appends that directory +`doc/language/**/*.html` for the current user under `%LOCALAPPDATA%\Programs\cpsc` (or `-Prefix`). It appends that directory to the user PATH without copying the combined process PATH, and creates a per-user Start Menu help shortcut. `-SourceDir` selects the artifact directory; `DESTDIR` staging is unsupported on Windows. The script is compatible with @@ -125,8 +125,8 @@ Windows PowerShell 5.1; its Windows actions have only been reviewed statically. The `doc` target uses CMake's `WIN32` target-platform detection: Windows generates standalone HTML with inline styles at `build/doc/cpsc.html`; other platforms generate `build/doc/cpsc.1`. The section 1 source is `doc/cpsc.1.md`; section 7 sources are -`doc/language/cpsc-*.7.md`. `doc` builds every page, preserving the language -subdirectory, as `.7` on Unix or `.html` on Windows. Sources are discovered with +`doc/language/**/*.7.md`. `doc` builds every page, preserving the language +category subdirectories, as `.7` on Unix or `.html` on Windows. Sources are discovered with CONFIGURE_DEPENDS; per-page commands regenerate only changed pages. `cmake/ManualLinks.lua` renders cross-references as man names or local HTML links. Windows `mingw32-make -C build install` builds the HTML manual and invokes @@ -135,7 +135,7 @@ Windows `mingw32-make -C build install` builds the HTML manual and invokes directory above; explicit prefixes are preserved. Unix still invokes `install.sh`. The release target explicitly passes the configured Windows flag to `cmake/Release.cmake`, since a standalone CMake script otherwise describes the -host platform. Windows packages `cpsc.exe`, `doc/cpsc.html`, `doc/language/*.html`, `install.ps1` and +host platform. Windows packages `cpsc.exe`, `doc/cpsc.html`, `doc/language/**/*.html`, `install.ps1` and `LICENSE` as `build/cpsc-VERSION-Windows-ARCH.zip` using CMake's default Deflate compression. Unix retains `.tar.xz`, the POSIX installer and the man pages. Linux smoke tests can configure an isolated build with `-DWIN32=TRUE` to exercise @@ -183,8 +183,9 @@ they are pure data with virtual destructors only — no codegen/visitor methods. ## Language manuals `doc/cpsc.1.md` documents the command-line interface. Short language manuals live -in `doc/language/` as `cpsc-keyword-NAME.7.md`, `cpsc-function-NAME.7.md`, and -`cpsc-language-overview.7.md`; filenames are lowercase and preserve underscores. +in `doc/language/keyword/` as `cpsc-keyword-NAME.7.md` and +`doc/language/function/` as `cpsc-function-NAME.7.md`; the overview remains +`doc/language/cpsc-language-overview.7.md`. Filenames are lowercase and preserve underscores. Document auxiliary/closing keywords with the main construct, not in separate pages. Keep examples small and describe actual compiler support, noting relevant differences from the 2026 Cambridge guide in `reference/`. All project text is diff --git a/cmake/Manual.cmake b/cmake/Manual.cmake index 689c91e..17a8e77 100644 --- a/cmake/Manual.cmake +++ b/cmake/Manual.cmake @@ -6,7 +6,7 @@ endif() configure_file("${CMAKE_CURRENT_LIST_DIR}/GenerateManual.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/GenerateManual.cmake" @ONLY) -file(GLOB cpsc_language_sources CONFIGURE_DEPENDS +file(GLOB_RECURSE cpsc_language_sources CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc/language/cpsc-*.7.md") set(cpsc_manual_sources "${CMAKE_CURRENT_SOURCE_DIR}/doc/cpsc.1.md" ${cpsc_language_sources}) diff --git a/cmake/Release.cmake b/cmake/Release.cmake index 59a1d79..66c2e2b 100644 --- a/cmake/Release.cmake +++ b/cmake/Release.cmake @@ -21,7 +21,7 @@ if(CPSC_WINDOWS) set(cpsc_binary_name cpsc.exe) set(cpsc_installer install.ps1) set(cpsc_manual cpsc.html) - set(cpsc_language_pattern "${CPSC_BINARY_DIR}/doc/language/cpsc-*.html") + set(cpsc_language_extension html) set(cpsc_tar_flags cf) set(cpsc_archive_format zip) else() @@ -29,7 +29,7 @@ else() set(cpsc_binary_name cpsc) set(cpsc_installer install.sh) set(cpsc_manual cpsc.1) - set(cpsc_language_pattern "${CPSC_BINARY_DIR}/doc/language/cpsc-*.7") + set(cpsc_language_extension 7) set(cpsc_tar_flags cJf) set(cpsc_archive_format gnutar) endif() @@ -40,11 +40,18 @@ configure_file("${CPSC_EXECUTABLE}" "${cpsc_package_dir}/${cpsc_binary_name}" CO file(COPY "${CPSC_SOURCE_DIR}/${cpsc_installer}" "${CPSC_SOURCE_DIR}/LICENSE" DESTINATION "${cpsc_package_dir}") file(COPY "${CPSC_BINARY_DIR}/doc/${cpsc_manual}" DESTINATION "${cpsc_package_dir}/doc") -file(GLOB cpsc_language_manuals "${cpsc_language_pattern}") -if(NOT cpsc_language_manuals) - message(FATAL_ERROR "Language manuals are missing; build the doc target first") +# Package the current source set, preserving categories and ignoring stale outputs. +file(GLOB_RECURSE cpsc_language_sources "${CPSC_SOURCE_DIR}/doc/language/cpsc-*.7.md") +if(NOT cpsc_language_sources) + message(FATAL_ERROR "Language manual sources are missing") endif() -file(COPY ${cpsc_language_manuals} DESTINATION "${cpsc_package_dir}/doc/language") +foreach(source IN LISTS cpsc_language_sources) + file(RELATIVE_PATH relative "${CPSC_SOURCE_DIR}/doc/language" "${source}") + string(REGEX REPLACE "\\.7\\.md$" ".${cpsc_language_extension}" relative "${relative}") + get_filename_component(directory "${relative}" DIRECTORY) + file(COPY "${CPSC_BINARY_DIR}/doc/language/${relative}" + DESTINATION "${cpsc_package_dir}/doc/language/${directory}") +endforeach() execute_process( COMMAND "${CMAKE_COMMAND}" -E tar "${cpsc_tar_flags}" "${cpsc_archive}" "--format=${cpsc_archive_format}" "${cpsc_package_name}" diff --git a/doc/build.md b/doc/build.md index ee335fd..4942859 100644 --- a/doc/build.md +++ b/doc/build.md @@ -225,13 +225,13 @@ cmake --build build --target doc ``` CMake selects local Pandoc first, sets its local runtime/data paths as needed, -and falls back to Pandoc in the system PATH. The outputs are `build/doc/cpsc.1` and `build/doc/language/*.7` on Unix, -or `build/doc/cpsc.html` and `build/doc/language/*.html` on Windows. Each page +and falls back to Pandoc in the system PATH. The outputs are `build/doc/cpsc.1` and `build/doc/language/**/*.7` on Unix, +or `build/doc/cpsc.html` and `build/doc/language/**/*.html` on Windows. Each page is regenerated when its source, rendering configuration or downloaded packages change. New language pages are discovered automatically during the build. On Unix, open the command manual with `man ./build/doc/cpsc.1`, or a syntax -page with `man ./build/doc/language/cpsc-keyword-if.7`. On Windows, open the standalone, +page with `man ./build/doc/language/keyword/cpsc-keyword-if.7`. On Windows, open the standalone, offline HTML from PowerShell: ```powershell diff --git a/doc/install.md b/doc/install.md index 9fe660a..d91b059 100644 --- a/doc/install.md +++ b/doc/install.md @@ -78,7 +78,7 @@ make -C build release The output is `build/cpsc-VERSION-SYSTEM-ARCH.tar.xz`. `VERSION` uses HEAD's commit time in UTC followed by its short ID: `yyyy-mm-dd-hh-mm-ss-commit`. The version is read each time packaging runs. The package uses the current build's -execution mode and contains `cpsc`, `doc/cpsc.1`, `doc/language/*.7`, `install.sh` and `LICENSE`. +execution mode and contains `cpsc`, `doc/cpsc.1`, `doc/language/**/*.7`, `install.sh` and `LICENSE`. Packaging builds the compiler and manual automatically; it requires Git and Pandoc. Use `EMBEDDED` when recipients should not need LLVM or `lli` at run time. @@ -106,7 +106,7 @@ prefix is preserved. To change it, run You can also call `install.ps1` directly. It installs for the current user without administrator rights. Its source directory must contain `cpsc.exe`, -`doc/cpsc.html` and `doc/language/*.html`: +`doc/cpsc.html` and `doc/language/**/*.html`: ```powershell powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -SourceDir .\build @@ -114,6 +114,7 @@ powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -SourceDir The default destination is `%LOCALAPPDATA%\Programs\cpsc`: `cpsc.exe` goes in that directory, the command manual goes in `doc`, and syntax manuals go in +`doc/language/function` and `doc/language/keyword`; the overview stays in `doc/language`. The command manual links to the language overview and its pages. The installer adds the directory to the user PATH and creates Start Menu > cpsc > cpsc Help, which opens the manual in the default browser. Open a new terminal afterward; @@ -134,7 +135,7 @@ cmake --build build --target release This is equivalent to `mingw32-make -C build release`. Windows produces `build/cpsc-VERSION-Windows-ARCH.zip`, using the same UTC commit version as Unix and retaining the configured execution mode. The ZIP contains `cpsc.exe`, -`doc/cpsc.html`, `doc/language/*.html`, `install.ps1` and `LICENSE` under one top-level directory. +`doc/cpsc.html`, `doc/language/**/*.html`, `install.ps1` and `LICENSE` under one top-level directory. It uses CMake's default Deflate compression and needs no additional compression tool; packaging requires Git and Pandoc, just as on Unix. diff --git a/doc/language/cpsc-language-overview.7.md b/doc/language/cpsc-language-overview.7.md index 8adf362..7005fa0 100644 --- a/doc/language/cpsc-language-overview.7.md +++ b/doc/language/cpsc-language-overview.7.md @@ -29,27 +29,27 @@ TYPE for records/enumerations/pointers, and CLASS for public/private fields. # KEYWORDS -- [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md): declare variables and arrays. -- [cpsc-keyword-input(7)](cpsc-keyword-input.7.md): read a value from standard input. -- [cpsc-keyword-output(7)](cpsc-keyword-output.7.md): print values to standard output. -- [cpsc-keyword-if(7)](cpsc-keyword-if.7.md): choose between branches. -- [cpsc-keyword-while(7)](cpsc-keyword-while.7.md): repeat while a condition is true. -- [cpsc-keyword-repeat(7)](cpsc-keyword-repeat.7.md): repeat until a condition is true. -- [cpsc-keyword-for(7)](cpsc-keyword-for.7.md): iterate over an integer range. -- [cpsc-keyword-function(7)](cpsc-keyword-function.7.md): define a function that returns a value. -- [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md): define a procedure and parameter modes. -- [cpsc-keyword-call(7)](cpsc-keyword-call.7.md): invoke a procedure. -- [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md): open a text file. -- [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md): read a line from a text file. -- [cpsc-keyword-writefile(7)](cpsc-keyword-writefile.7.md): write a line to a text file. -- [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md): close a text file. -- [cpsc-keyword-type(7)](cpsc-keyword-type.7.md): define enumerations, pointers, and records. -- [cpsc-keyword-class(7)](cpsc-keyword-class.7.md): define a class with public and private fields. -- [cpsc-keyword-and(7)](cpsc-keyword-and.7.md): combine conditions with logical AND. -- [cpsc-keyword-or(7)](cpsc-keyword-or.7.md): combine conditions with logical OR. -- [cpsc-keyword-not(7)](cpsc-keyword-not.7.md): negate a condition. -- [cpsc-keyword-div(7)](cpsc-keyword-div.7.md): perform integer division. -- [cpsc-keyword-mod(7)](cpsc-keyword-mod.7.md): find the integer division remainder. +- [cpsc-keyword-declare(7)](keyword/cpsc-keyword-declare.7.md): declare variables and arrays. +- [cpsc-keyword-input(7)](keyword/cpsc-keyword-input.7.md): read a value from standard input. +- [cpsc-keyword-output(7)](keyword/cpsc-keyword-output.7.md): print values to standard output. +- [cpsc-keyword-if(7)](keyword/cpsc-keyword-if.7.md): choose between branches. +- [cpsc-keyword-while(7)](keyword/cpsc-keyword-while.7.md): repeat while a condition is true. +- [cpsc-keyword-repeat(7)](keyword/cpsc-keyword-repeat.7.md): repeat until a condition is true. +- [cpsc-keyword-for(7)](keyword/cpsc-keyword-for.7.md): iterate over an integer range. +- [cpsc-keyword-function(7)](keyword/cpsc-keyword-function.7.md): define a function that returns a value. +- [cpsc-keyword-procedure(7)](keyword/cpsc-keyword-procedure.7.md): define a procedure and parameter modes. +- [cpsc-keyword-call(7)](keyword/cpsc-keyword-call.7.md): invoke a procedure. +- [cpsc-keyword-openfile(7)](keyword/cpsc-keyword-openfile.7.md): open a text file. +- [cpsc-keyword-readfile(7)](keyword/cpsc-keyword-readfile.7.md): read a line from a text file. +- [cpsc-keyword-writefile(7)](keyword/cpsc-keyword-writefile.7.md): write a line to a text file. +- [cpsc-keyword-closefile(7)](keyword/cpsc-keyword-closefile.7.md): close a text file. +- [cpsc-keyword-type(7)](keyword/cpsc-keyword-type.7.md): define enumerations, pointers, and records. +- [cpsc-keyword-class(7)](keyword/cpsc-keyword-class.7.md): define a class with public and private fields. +- [cpsc-keyword-and(7)](keyword/cpsc-keyword-and.7.md): combine conditions with logical AND. +- [cpsc-keyword-or(7)](keyword/cpsc-keyword-or.7.md): combine conditions with logical OR. +- [cpsc-keyword-not(7)](keyword/cpsc-keyword-not.7.md): negate a condition. +- [cpsc-keyword-div(7)](keyword/cpsc-keyword-div.7.md): perform integer division. +- [cpsc-keyword-mod(7)](keyword/cpsc-keyword-mod.7.md): find the integer division remainder. Closing and auxiliary keywords are documented with their main constructs: THEN/ELSE/ENDIF with IF; DO/ENDWHILE with WHILE; UNTIL with REPEAT; @@ -61,18 +61,18 @@ TRUE/FALSE are BOOLEAN literals. # BUILT-IN FUNCTIONS -- [cpsc-function-length(7)](cpsc-function-length.7.md): find a string's length. -- [cpsc-function-mid(7)](cpsc-function-mid.7.md): extract part of a string. -- [cpsc-function-left(7)](cpsc-function-left.7.md): extract the beginning of a string. -- [cpsc-function-right(7)](cpsc-function-right.7.md): extract the end of a string. -- [cpsc-function-lcase(7)](cpsc-function-lcase.7.md): convert text to lower case. -- [cpsc-function-ucase(7)](cpsc-function-ucase.7.md): convert text to upper case. -- [cpsc-function-asc(7)](cpsc-function-asc.7.md): find a character's byte code. -- [cpsc-function-chr(7)](cpsc-function-chr.7.md): convert a byte code to text. -- [cpsc-function-is_num(7)](cpsc-function-is_num.7.md): test whether text represents a number. -- [cpsc-function-num_to_str(7)](cpsc-function-num_to_str.7.md): convert a number to text. -- [cpsc-function-str_to_num(7)](cpsc-function-str_to_num.7.md): convert text to a real number. -- [cpsc-function-eof(7)](cpsc-function-eof.7.md): test for the end of a text file. +- [cpsc-function-length(7)](function/cpsc-function-length.7.md): find a string's length. +- [cpsc-function-mid(7)](function/cpsc-function-mid.7.md): extract part of a string. +- [cpsc-function-left(7)](function/cpsc-function-left.7.md): extract the beginning of a string. +- [cpsc-function-right(7)](function/cpsc-function-right.7.md): extract the end of a string. +- [cpsc-function-lcase(7)](function/cpsc-function-lcase.7.md): convert text to lower case. +- [cpsc-function-ucase(7)](function/cpsc-function-ucase.7.md): convert text to upper case. +- [cpsc-function-asc(7)](function/cpsc-function-asc.7.md): find a character's byte code. +- [cpsc-function-chr(7)](function/cpsc-function-chr.7.md): convert a byte code to text. +- [cpsc-function-is_num(7)](function/cpsc-function-is_num.7.md): test whether text represents a number. +- [cpsc-function-num_to_str(7)](function/cpsc-function-num_to_str.7.md): convert a number to text. +- [cpsc-function-str_to_num(7)](function/cpsc-function-str_to_num.7.md): convert text to a real number. +- [cpsc-function-eof(7)](function/cpsc-function-eof.7.md): test for the end of a text file. # UNSUPPORTED FEATURES diff --git a/doc/language/cpsc-function-asc.7.md b/doc/language/function/cpsc-function-asc.7.md index 0600599..72403a7 100644 --- a/doc/language/cpsc-function-asc.7.md +++ b/doc/language/function/cpsc-function-asc.7.md @@ -24,5 +24,5 @@ OUTPUT ASC('A') # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-chr(7)](cpsc-function-chr.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-chr(7)](cpsc-function-chr.7.md). diff --git a/doc/language/cpsc-function-chr.7.md b/doc/language/function/cpsc-function-chr.7.md index 5062468..59b3121 100644 --- a/doc/language/cpsc-function-chr.7.md +++ b/doc/language/function/cpsc-function-chr.7.md @@ -24,5 +24,5 @@ OUTPUT CHR(65) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-asc(7)](cpsc-function-asc.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-asc(7)](cpsc-function-asc.7.md). diff --git a/doc/language/cpsc-function-eof.7.md b/doc/language/function/cpsc-function-eof.7.md index 721e667..3ab2d31 100644 --- a/doc/language/cpsc-function-eof.7.md +++ b/doc/language/function/cpsc-function-eof.7.md @@ -30,5 +30,5 @@ CLOSEFILE "notes.txt" # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](../keyword/cpsc-keyword-openfile.7.md), [cpsc-keyword-readfile(7)](../keyword/cpsc-keyword-readfile.7.md), [cpsc-keyword-closefile(7)](../keyword/cpsc-keyword-closefile.7.md). diff --git a/doc/language/cpsc-function-is_num.7.md b/doc/language/function/cpsc-function-is_num.7.md index de37b71..a85acfe 100644 --- a/doc/language/cpsc-function-is_num.7.md +++ b/doc/language/function/cpsc-function-is_num.7.md @@ -24,5 +24,5 @@ OUTPUT IS_NUM("12.5") # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-str_to_num(7)](cpsc-function-str_to_num.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-str_to_num(7)](cpsc-function-str_to_num.7.md). diff --git a/doc/language/cpsc-function-lcase.7.md b/doc/language/function/cpsc-function-lcase.7.md index f6ca334..c8c7db9 100644 --- a/doc/language/cpsc-function-lcase.7.md +++ b/doc/language/function/cpsc-function-lcase.7.md @@ -24,5 +24,5 @@ OUTPUT LCASE("HELLO") # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-ucase(7)](cpsc-function-ucase.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-ucase(7)](cpsc-function-ucase.7.md). diff --git a/doc/language/cpsc-function-left.7.md b/doc/language/function/cpsc-function-left.7.md index b4542d6..38a703e 100644 --- a/doc/language/cpsc-function-left.7.md +++ b/doc/language/function/cpsc-function-left.7.md @@ -23,5 +23,5 @@ OUTPUT LEFT("Hello", 2) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md). diff --git a/doc/language/cpsc-function-length.7.md b/doc/language/function/cpsc-function-length.7.md index a7f6acf..9730798 100644 --- a/doc/language/cpsc-function-length.7.md +++ b/doc/language/function/cpsc-function-length.7.md @@ -23,5 +23,5 @@ OUTPUT LENGTH("Hello") # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md). diff --git a/doc/language/cpsc-function-mid.7.md b/doc/language/function/cpsc-function-mid.7.md index 3a6bc71..66f7294 100644 --- a/doc/language/cpsc-function-mid.7.md +++ b/doc/language/function/cpsc-function-mid.7.md @@ -24,5 +24,5 @@ OUTPUT MID("ABCDEFGH", 2, 3) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md), [cpsc-function-length(7)](cpsc-function-length.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-right(7)](cpsc-function-right.7.md), [cpsc-function-length(7)](cpsc-function-length.7.md). diff --git a/doc/language/cpsc-function-num_to_str.7.md b/doc/language/function/cpsc-function-num_to_str.7.md index 30dc39b..fb4f6fc 100644 --- a/doc/language/cpsc-function-num_to_str.7.md +++ b/doc/language/function/cpsc-function-num_to_str.7.md @@ -23,5 +23,5 @@ OUTPUT NUM_TO_STR(42), " ", NUM_TO_STR(3.5) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-str_to_num(7)](cpsc-function-str_to_num.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-str_to_num(7)](cpsc-function-str_to_num.7.md). diff --git a/doc/language/cpsc-function-right.7.md b/doc/language/function/cpsc-function-right.7.md index ae9114b..9aa10e6 100644 --- a/doc/language/cpsc-function-right.7.md +++ b/doc/language/function/cpsc-function-right.7.md @@ -23,5 +23,5 @@ OUTPUT RIGHT("Hello", 2) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-left(7)](cpsc-function-left.7.md), [cpsc-function-mid(7)](cpsc-function-mid.7.md). diff --git a/doc/language/cpsc-function-str_to_num.7.md b/doc/language/function/cpsc-function-str_to_num.7.md index 6128a13..341b757 100644 --- a/doc/language/cpsc-function-str_to_num.7.md +++ b/doc/language/function/cpsc-function-str_to_num.7.md @@ -24,5 +24,5 @@ OUTPUT STR_TO_NUM("12.5") # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-is_num(7)](cpsc-function-is_num.7.md), [cpsc-function-num_to_str(7)](cpsc-function-num_to_str.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-is_num(7)](cpsc-function-is_num.7.md), [cpsc-function-num_to_str(7)](cpsc-function-num_to_str.7.md). diff --git a/doc/language/cpsc-function-ucase.7.md b/doc/language/function/cpsc-function-ucase.7.md index dd44892..6356f48 100644 --- a/doc/language/cpsc-function-ucase.7.md +++ b/doc/language/function/cpsc-function-ucase.7.md @@ -24,5 +24,5 @@ OUTPUT UCASE("Hello") # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-function-lcase(7)](cpsc-function-lcase.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-function-lcase(7)](cpsc-function-lcase.7.md). diff --git a/doc/language/cpsc-keyword-and.7.md b/doc/language/keyword/cpsc-keyword-and.7.md index 6b98abf..8df8c56 100644 --- a/doc/language/cpsc-keyword-and.7.md +++ b/doc/language/keyword/cpsc-keyword-and.7.md @@ -24,5 +24,5 @@ OUTPUT (3 > 2) AND (4 > 1) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). diff --git a/doc/language/cpsc-keyword-call.7.md b/doc/language/keyword/cpsc-keyword-call.7.md index b17b3f4..e999a8b 100644 --- a/doc/language/cpsc-keyword-call.7.md +++ b/doc/language/keyword/cpsc-keyword-call.7.md @@ -27,5 +27,5 @@ CALL Hello() # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-function(7)](cpsc-keyword-function.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-function(7)](cpsc-keyword-function.7.md). diff --git a/doc/language/cpsc-keyword-class.7.md b/doc/language/keyword/cpsc-keyword-class.7.md index 7ff32ba..d7ec12f 100644 --- a/doc/language/cpsc-keyword-class.7.md +++ b/doc/language/keyword/cpsc-keyword-class.7.md @@ -39,5 +39,5 @@ OUTPUT PersonValue.Name # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-type(7)](cpsc-keyword-type.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-type(7)](cpsc-keyword-type.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md). diff --git a/doc/language/cpsc-keyword-closefile.7.md b/doc/language/keyword/cpsc-keyword-closefile.7.md index b986b86..381ae56 100644 --- a/doc/language/cpsc-keyword-closefile.7.md +++ b/doc/language/keyword/cpsc-keyword-closefile.7.md @@ -25,5 +25,5 @@ CLOSEFILE "notes.txt" # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md), [cpsc-keyword-writefile(7)](cpsc-keyword-writefile.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md), [cpsc-keyword-writefile(7)](cpsc-keyword-writefile.7.md). diff --git a/doc/language/cpsc-keyword-declare.7.md b/doc/language/keyword/cpsc-keyword-declare.7.md index 887ae12..7fe1cf6 100644 --- a/doc/language/cpsc-keyword-declare.7.md +++ b/doc/language/keyword/cpsc-keyword-declare.7.md @@ -36,5 +36,5 @@ OUTPUT Names[Count] # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-type(7)](cpsc-keyword-type.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md), [cpsc-keyword-output(7)](cpsc-keyword-output.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-type(7)](cpsc-keyword-type.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md), [cpsc-keyword-output(7)](cpsc-keyword-output.7.md). diff --git a/doc/language/cpsc-keyword-div.7.md b/doc/language/keyword/cpsc-keyword-div.7.md index 78715e1..6adb23d 100644 --- a/doc/language/cpsc-keyword-div.7.md +++ b/doc/language/keyword/cpsc-keyword-div.7.md @@ -24,5 +24,5 @@ OUTPUT 7 DIV 2 # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-mod(7)](cpsc-keyword-mod.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-mod(7)](cpsc-keyword-mod.7.md). diff --git a/doc/language/cpsc-keyword-for.7.md b/doc/language/keyword/cpsc-keyword-for.7.md index 201a492..57b5632 100644 --- a/doc/language/cpsc-keyword-for.7.md +++ b/doc/language/keyword/cpsc-keyword-for.7.md @@ -31,5 +31,5 @@ NEXT Index # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-while(7)](cpsc-keyword-while.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-while(7)](cpsc-keyword-while.7.md). diff --git a/doc/language/cpsc-keyword-function.7.md b/doc/language/keyword/cpsc-keyword-function.7.md index c37754c..d687ba9 100644 --- a/doc/language/cpsc-keyword-function.7.md +++ b/doc/language/keyword/cpsc-keyword-function.7.md @@ -37,5 +37,5 @@ OUTPUT Double(4) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-procedure(7)](cpsc-keyword-procedure.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md). diff --git a/doc/language/cpsc-keyword-if.7.md b/doc/language/keyword/cpsc-keyword-if.7.md index 9f14959..a934922 100644 --- a/doc/language/cpsc-keyword-if.7.md +++ b/doc/language/keyword/cpsc-keyword-if.7.md @@ -31,5 +31,5 @@ ENDIF # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md). diff --git a/doc/language/cpsc-keyword-input.7.md b/doc/language/keyword/cpsc-keyword-input.7.md index f31731f..c14fac1 100644 --- a/doc/language/cpsc-keyword-input.7.md +++ b/doc/language/keyword/cpsc-keyword-input.7.md @@ -27,5 +27,5 @@ OUTPUT Name # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-output(7)](cpsc-keyword-output.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-output(7)](cpsc-keyword-output.7.md). diff --git a/doc/language/cpsc-keyword-mod.7.md b/doc/language/keyword/cpsc-keyword-mod.7.md index cb437a4..2eceeb5 100644 --- a/doc/language/cpsc-keyword-mod.7.md +++ b/doc/language/keyword/cpsc-keyword-mod.7.md @@ -25,5 +25,5 @@ OUTPUT 7 MOD 2 # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-div(7)](cpsc-keyword-div.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-div(7)](cpsc-keyword-div.7.md). diff --git a/doc/language/cpsc-keyword-not.7.md b/doc/language/keyword/cpsc-keyword-not.7.md index 5bb1c18..0ada425 100644 --- a/doc/language/cpsc-keyword-not.7.md +++ b/doc/language/keyword/cpsc-keyword-not.7.md @@ -23,5 +23,5 @@ OUTPUT NOT (3 = 2) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-or(7)](cpsc-keyword-or.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). diff --git a/doc/language/cpsc-keyword-openfile.7.md b/doc/language/keyword/cpsc-keyword-openfile.7.md index a13b3f4..2aa2b44 100644 --- a/doc/language/cpsc-keyword-openfile.7.md +++ b/doc/language/keyword/cpsc-keyword-openfile.7.md @@ -33,5 +33,5 @@ CLOSEFILE "notes.txt" # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md), [cpsc-keyword-writefile(7)](cpsc-keyword-writefile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-readfile(7)](cpsc-keyword-readfile.7.md), [cpsc-keyword-writefile(7)](cpsc-keyword-writefile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md). diff --git a/doc/language/cpsc-keyword-or.7.md b/doc/language/keyword/cpsc-keyword-or.7.md index 7fca628..4594215 100644 --- a/doc/language/cpsc-keyword-or.7.md +++ b/doc/language/keyword/cpsc-keyword-or.7.md @@ -24,5 +24,5 @@ OUTPUT (3 < 2) OR (4 > 1) # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-and(7)](cpsc-keyword-and.7.md), [cpsc-keyword-not(7)](cpsc-keyword-not.7.md), [cpsc-keyword-if(7)](cpsc-keyword-if.7.md). diff --git a/doc/language/cpsc-keyword-output.7.md b/doc/language/keyword/cpsc-keyword-output.7.md index 9ee2133..a1c2d2a 100644 --- a/doc/language/cpsc-keyword-output.7.md +++ b/doc/language/keyword/cpsc-keyword-output.7.md @@ -28,5 +28,5 @@ OUTPUT "Score: ", Score # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-input(7)](cpsc-keyword-input.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-input(7)](cpsc-keyword-input.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md). diff --git a/doc/language/cpsc-keyword-procedure.7.md b/doc/language/keyword/cpsc-keyword-procedure.7.md index b2e6108..d8be9f4 100644 --- a/doc/language/cpsc-keyword-procedure.7.md +++ b/doc/language/keyword/cpsc-keyword-procedure.7.md @@ -39,5 +39,5 @@ OUTPUT Count # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md), [cpsc-keyword-function(7)](cpsc-keyword-function.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-call(7)](cpsc-keyword-call.7.md), [cpsc-keyword-function(7)](cpsc-keyword-function.7.md). diff --git a/doc/language/cpsc-keyword-readfile.7.md b/doc/language/keyword/cpsc-keyword-readfile.7.md index 71cd3db..8260dd2 100644 --- a/doc/language/cpsc-keyword-readfile.7.md +++ b/doc/language/keyword/cpsc-keyword-readfile.7.md @@ -30,5 +30,5 @@ CLOSEFILE "notes.txt" # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md), [cpsc-function-eof(7)](cpsc-function-eof.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md), [cpsc-function-eof(7)](../function/cpsc-function-eof.7.md). diff --git a/doc/language/cpsc-keyword-repeat.7.md b/doc/language/keyword/cpsc-keyword-repeat.7.md index 42fdd2d..b1a73c2 100644 --- a/doc/language/cpsc-keyword-repeat.7.md +++ b/doc/language/keyword/cpsc-keyword-repeat.7.md @@ -30,5 +30,5 @@ UNTIL Count = 3 # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-while(7)](cpsc-keyword-while.7.md), [cpsc-keyword-for(7)](cpsc-keyword-for.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-while(7)](cpsc-keyword-while.7.md), [cpsc-keyword-for(7)](cpsc-keyword-for.7.md). diff --git a/doc/language/cpsc-keyword-type.7.md b/doc/language/keyword/cpsc-keyword-type.7.md index d630403..9dd4c73 100644 --- a/doc/language/cpsc-keyword-type.7.md +++ b/doc/language/keyword/cpsc-keyword-type.7.md @@ -49,5 +49,5 @@ OUTPUT Position.X # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-declare(7)](cpsc-keyword-declare.7.md), [cpsc-keyword-class(7)](cpsc-keyword-class.7.md). diff --git a/doc/language/cpsc-keyword-while.7.md b/doc/language/keyword/cpsc-keyword-while.7.md index e6707b4..c6d8721 100644 --- a/doc/language/cpsc-keyword-while.7.md +++ b/doc/language/keyword/cpsc-keyword-while.7.md @@ -30,5 +30,5 @@ ENDWHILE # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-repeat(7)](cpsc-keyword-repeat.7.md), [cpsc-keyword-for(7)](cpsc-keyword-for.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-repeat(7)](cpsc-keyword-repeat.7.md), [cpsc-keyword-for(7)](cpsc-keyword-for.7.md). diff --git a/doc/language/cpsc-keyword-writefile.7.md b/doc/language/keyword/cpsc-keyword-writefile.7.md index a00be5e..caeafe7 100644 --- a/doc/language/cpsc-keyword-writefile.7.md +++ b/doc/language/keyword/cpsc-keyword-writefile.7.md @@ -26,5 +26,5 @@ CLOSEFILE "notes.txt" # SEE ALSO -[cpsc-language-overview(7)](cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md), [cpsc-function-num_to_str(7)](cpsc-function-num_to_str.7.md). +[cpsc-language-overview(7)](../cpsc-language-overview.7.md), [cpsc-keyword-openfile(7)](cpsc-keyword-openfile.7.md), [cpsc-keyword-closefile(7)](cpsc-keyword-closefile.7.md), [cpsc-function-num_to_str(7)](../function/cpsc-function-num_to_str.7.md). diff --git a/install.ps1 b/install.ps1 index 7d8ccce..e09efb3 100644 --- a/install.ps1 +++ b/install.ps1 @@ -3,7 +3,7 @@ .SYNOPSIS Installs cpsc and its HTML manual for the current user. .DESCRIPTION -Copies cpsc.exe, doc\cpsc.html and doc\language\*.html, creates a help shortcut, and +Copies cpsc.exe, doc\cpsc.html and doc\language HTML pages, creates a help shortcut, and adds the installation directory to the user PATH. No administrator is needed for the default location: %LOCALAPPDATA%\Programs\cpsc. .EXAMPLE @@ -26,7 +26,7 @@ $ErrorActionPreference = 'Stop' if ($Help) { Write-Output 'Usage: install.ps1 [-Prefix DIR] [-SourceDir DIR] [-Help]' Write-Output 'Default destination: %LOCALAPPDATA%\Programs\cpsc' - Write-Output 'Source must contain cpsc.exe, doc\cpsc.html and doc\language\*.html; default: script directory.' + Write-Output 'Source must contain cpsc.exe, doc\cpsc.html and doc\language HTML pages; default: script directory.' return } @@ -75,7 +75,19 @@ try { if (-not (Test-Path -LiteralPath $sourceLanguageDir -PathType Container)) { throw "Missing language manuals: $sourceLanguageDir; build the doc target first." } - $languageManuals = @(Get-ChildItem -LiteralPath $sourceLanguageDir -Filter 'cpsc-*.html' -File) + $sourceOverview = Join-Path $sourceLanguageDir 'cpsc-language-overview.html' + if (-not (Test-Path -LiteralPath $sourceOverview -PathType Leaf)) { + throw "Missing language overview: $sourceOverview; build the doc target first." + } + $languageManuals = @(Get-Item -LiteralPath $sourceOverview) + foreach ($category in @('function', 'keyword')) { + $categoryDir = Join-Path $sourceLanguageDir $category + $categoryManuals = @(Get-ChildItem -LiteralPath $categoryDir -Filter "cpsc-$category-*.html" -File) + if ($categoryManuals.Count -eq 0) { + throw "Missing language manuals: $categoryDir; build the doc target first." + } + $languageManuals += $categoryManuals + } if ($languageManuals.Count -eq 0) { throw "Missing language manuals: $sourceLanguageDir; build the doc target first." } @@ -84,14 +96,14 @@ try { $languageDir = Join-Path $docDir 'language' $targetExe = Join-Path $Prefix 'cpsc.exe' $targetManual = Join-Path $docDir 'cpsc.html' - foreach ($directory in @($Prefix, $docDir, $languageDir)) { + foreach ($directory in @($Prefix, $docDir, $languageDir, (Join-Path $languageDir 'function'), (Join-Path $languageDir 'keyword'))) { if ((Test-Path -LiteralPath $directory) -and -not (Test-Path -LiteralPath $directory -PathType Container)) { throw "Installation directory is occupied by a file: $directory" } } $targetFiles = @($targetExe, $targetManual) + @($languageManuals | ForEach-Object { - Join-Path $languageDir $_.Name + Join-Path $languageDir ($_.FullName.Substring($sourceLanguageDir.Length + 1)) }) foreach ($file in $targetFiles) { if (Test-Path -LiteralPath $file -PathType Container) { @@ -107,7 +119,9 @@ try { $shell = New-Object -ComObject WScript.Shell # Directory.CreateDirectory treats paths literally, including spaces and brackets. - [IO.Directory]::CreateDirectory($languageDir) | Out-Null + foreach ($category in @('function', 'keyword')) { + [IO.Directory]::CreateDirectory((Join-Path $languageDir $category)) | Out-Null + } if ($sourceExe -ine $targetExe) { Copy-Item -LiteralPath $sourceExe -Destination $targetExe -Force } @@ -115,7 +129,7 @@ try { Copy-Item -LiteralPath $sourceManual -Destination $targetManual -Force } foreach ($manual in $languageManuals) { - $destination = Join-Path $languageDir $manual.Name + $destination = Join-Path $languageDir ($manual.FullName.Substring($sourceLanguageDir.Length + 1)) if ($manual.FullName -ine $destination) { Copy-Item -LiteralPath $manual.FullName -Destination $destination -Force } @@ -8,7 +8,8 @@ Usage: install.sh [--prefix DIR] [--source-dir DIR] Install cpsc to DIR/bin and its man pages to DIR/share/cpsc/man/man1 and man7. The default prefix is /usr/local. The source directory defaults to the directory containing this script and must contain cpsc, doc/cpsc.1 and -doc/language/*.7. Installation registers the independent manual search path. +doc/language/cpsc-language-overview.7 and doc/language/{function,keyword}/*.7. +Installation registers the independent manual search path. Use --source-dir build when running this script from the source checkout. DESTDIR may be set to stage files without changing host manpath configuration. EOF @@ -46,7 +47,9 @@ source_dir=$(CDPATH= cd -- "$source_dir" && pwd) || die "cannot open source dire || die "missing readable executable: $source_dir/cpsc; build cpsc first" [ -f "$source_dir/doc/cpsc.1" ] && [ -r "$source_dir/doc/cpsc.1" ] \ || die "missing readable manual: $source_dir/doc/cpsc.1; run make doc first" -set -- "$source_dir"/doc/language/cpsc-*.7 +set -- "$source_dir/doc/language/cpsc-language-overview.7" \ + "$source_dir"/doc/language/function/cpsc-function-*.7 \ + "$source_dir"/doc/language/keyword/cpsc-keyword-*.7 [ -f "$1" ] || die "missing language manuals: $source_dir/doc/language; run make doc first" for manual do [ -f "$manual" ] && [ -r "$manual" ] || die "missing readable manual: $manual" |
