Fixed signatures in manual; Minor fixes in spec.
h3rald h3rald@h3rald.com
Thu, 12 Dec 2024 10:09:51 +0100
2 files changed,
11 insertions(+),
11 deletions(-)
M
src/hex.c
→
src/hex.c
@@ -491,12 +491,12 @@ hex_doc(docs, "int", "s", "i", "Converts a string to a hex integer.");
hex_doc(docs, "str", "i", "s", "Converts a hex integer to a string."); hex_doc(docs, "dec", "i", "s", "Converts a hex integer to a decimal string."); hex_doc(docs, "hex", "s", "i", "Converter a decimal string to a hex integer."); - hex_doc(docs, "chr", "i", "s", "Converts an integer to a single-character string."); - hex_doc(docs, "ord", "s", "i", "Converts a single-character string to an integer."); + hex_doc(docs, "chr", "i", "s", "Converts an integer to a single-character."); + hex_doc(docs, "ord", "s", "i", "Converts a single-character to an integer."); hex_doc(docs, "type", "a", "s", "Pushes the data type of 'a' on the stack."); // List - hex_doc(docs, "cat", "(s s|q q) ", "(s|q)", "Concatenates two quotations or two strings."); + hex_doc(docs, "cat", "(s1 s2|q1 q2) ", "(s3|q3)", "Concatenates two quotations or two strings."); hex_doc(docs, "len", "(s|q)", "i ", "Returns the length of 's' or 'q'."); hex_doc(docs, "get", "(s|q)", "a", "Gets the item at position 'i' in 's' or 'q'."); hex_doc(docs, "index", "(s a|q a)", "i", "Returns the index of 'a' within 's' or 'q'.");@@ -508,8 +508,8 @@ hex_doc(docs, "replace", "s1 s2 s3", "s", "Replaces 's2' with 's3' within 's1'.");
// Quotation hex_doc(docs, "each", "q1 q2", "*", "Executes 'q2' for each item of 'q1'."); - hex_doc(docs, "map", "q1 q2", "q", "Applies 'q2' to 'q1' items and returns results."); - hex_doc(docs, "filter", "q1 q2", "q", "Filters 'q2' by applying 'q1'."); + hex_doc(docs, "map", "q1 q2", "q3", "Applies 'q2' to 'q1' items and returns results."); + hex_doc(docs, "filter", "q1 q2", "q3", "Filters 'q2' by applying 'q1'."); // I/O hex_doc(docs, "puts", "a", "", "Prints 'a' and a new line to standard output.");@@ -518,9 +518,9 @@ hex_doc(docs, "print", "a", "", "Prints 'a' to standard output.");
hex_doc(docs, "gets", "", "s", "Gets a string from standard input."); // File - hex_doc(docs, "read", "s", "s", "Returns the contents of the specified file."); - hex_doc(docs, "write", "s1 s2", "s", "Writes 's2' to the file 's1'."); - hex_doc(docs, "append", "s1 s2", "s", "Appends 's2' to the file 's1'."); + hex_doc(docs, "read", "s1", "s2", "Returns the contents of the specified file."); + hex_doc(docs, "write", "s1 s2", "", "Writes 's2' to the file 's1'."); + hex_doc(docs, "append", "s1 s2", "", "Appends 's2' to the file 's1'."); // Shell hex_doc(docs, "args", "", "q", "Returns the program arguments.");@@ -4001,9 +4001,9 @@ {
printf(" | "); hex_rpad(docs->entries[i].name, 7); printf(" | "); - hex_lpad(docs->entries[i].input, 17); + hex_lpad(docs->entries[i].input, 15); printf(" -> "); - hex_rpad(docs->entries[i].output, 5); + hex_rpad(docs->entries[i].output, 7); printf(" | "); hex_rpad(docs->entries[i].description, 47); printf(" |\n");
M
web/contents/spec.html
→
web/contents/spec.html
@@ -154,7 +154,7 @@ <h5 id="xor-symbol"><code>xor</code> Symbol</h5>
<p><mark> i1 i2 → i</mark></p> <p>Pushes <code>0x1</code> on the stack if <code>i1</code> and <code>i2</code> are different, or <code>0x0</code> otherwise.</p> - <h4 id="datatype-conversions-and-checking-symbols">Datatype Conversions and Checking Symbols</h4> + <h4 id="type-checking-and-conversion-symbols">Type Checking and Conversion Symbols</h4> <h5 id="int-symbol"><code>int</code> Symbol</h5> <p><mark>s → i</mark></p> <p>Converts the string <code>s</code> representing a hexadecimal integer to an integer value and pushes it on the