From 7b2deae88cce4f76977ea357f3d4fd1f3ca51737 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Sun, 6 Jul 2025 11:13:01 +0100 Subject: [PATCH] Second pass on fixing up documentation. Still some links not fixed. --- Doxyfile | 3 ++- docs/Access-control.md | 6 ++++-- docs/Cons-space.md | 2 ++ docs/Core-functions.md | 4 +++- src/io/history.c | 14 ++++++++++++++ src/io/history.h | 14 ++++++++++++++ 6 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 src/io/history.c create mode 100644 src/io/history.h diff --git a/Doxyfile b/Doxyfile index 2b6b284..1a06dca 100644 --- a/Doxyfile +++ b/Doxyfile @@ -790,7 +790,7 @@ WARN_LOGFILE = doxy.log # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = src docs +INPUT = src docs lisp # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -817,6 +817,7 @@ INPUT_ENCODING = UTF-8 FILE_PATTERNS = *.c \ *.h \ + *.lisp \ *.markdown \ *.md diff --git a/docs/Access-control.md b/docs/Access-control.md index 07e4851..693959e 100644 --- a/docs/Access-control.md +++ b/docs/Access-control.md @@ -1,6 +1,8 @@ # Access control -_ -ote that a number of details not yet finalised are used in examples in this note. There must be some mechanism for creating fully qualified and partially qualified hierarchical names, but I haven't finalised it yet. In this note I've assumed that the portions of an hierarchical name are separated by periods ('.'); that fully qualified names start with a quote mark; and that where a name doesn't start with a quote mark, the first portion of it is evaluated in the current environment and its value assumed to be a fully qualified equivalent. All of these details may change._ + +*Not yet implemented* + +_Note that a number of details not yet finalised are used in examples in this note. There must be some mechanism for creating fully qualified and partially qualified hierarchical names, but I haven't finalised it yet. In this note I've assumed that the portions of an hierarchical name are separated by periods ('.'); that fully qualified names start with a quote mark; and that where a name doesn't start with a quote mark, the first portion of it is evaluated in the current environment and its value assumed to be a fully qualified equivalent. All of these details may change._ In a multi-user environment, access control is necessary in order for a user to be able to protect an item of data from being seen by someone who isn't authorised to see it. But actually, in a world of immutable data, it's less necessary than you might think. As explained in my note on [Memory, threads and communication](https://www.journeyman.cc/blog/posts-output/2017-01-08-post-scarcity-memory-threads-and-communication/), if there's strict immutability, and all user processes spawn from a common root process, then no user can see into any other user's data space anyway. diff --git a/docs/Cons-space.md b/docs/Cons-space.md index d954d06..053f4f7 100644 --- a/docs/Cons-space.md +++ b/docs/Cons-space.md @@ -1,5 +1,7 @@ # Cons space +*See [cons_space_object.h](consspaceobject_8h.html), [cons_page.h](conspage_8h.html).* + Cons space is a space which contains cons cells, and other objects whose memory representation fits into the footprint of a cons cell. A cons cell comprises: +-----+-------+------+----------------+--------------+--------------+ diff --git a/docs/Core-functions.md b/docs/Core-functions.md index 7f3cea5..c05c2e4 100644 --- a/docs/Core-functions.md +++ b/docs/Core-functions.md @@ -1,5 +1,7 @@ # Core functions +*See [ops/lispops.h](lispops_8h.html).* + In the specifications that follow, a word in all upper case refers to a tag value, defined on either the [cons space](Cons-space.html) or the [vector space](Vector-space.html) page. # (and args...) @@ -16,7 +18,7 @@ Public. Takes an arbitrary number of arguments, which should either all be CONS # (assoc key store) -Public. Takes two arguments, a key and a store. The store may either be a CONS forming the head of a list formatted as an [assoc list](Assoc-list.html), or else a VECP pointing to a HASH. If the key is readable by the current user, returns the value associated with that key in the store, if it exists and is readable by the current user, else NIL. +Public. Takes two arguments, a key and a store. The store may either be a CONS forming the head of a list formatted as an [assoc list](Hybrid-assoc-lists.html), or else a VECP pointing to a HASH. If the key is readable by the current user, returns the value associated with that key in the store, if it exists and is readable by the current user, else NIL. # (car arg) diff --git a/src/io/history.c b/src/io/history.c new file mode 100644 index 0000000..3f22821 --- /dev/null +++ b/src/io/history.c @@ -0,0 +1,14 @@ +/* + * history.c + * + * Maintain, and recall, a history of things which have been read from standard + * input. Necessarily the history must be stored on the user session, and not be + * global. + * + * I *think* history will be maintained as a list of forms, not of strings, so + * only forms which have successfully been read can be recalled, and forms which + * have not been completed when the history function is invoked will be lost. + * + * (c) 2025 Simon Brooke + * Licensed under GPL version 2.0, or, at your option, any later version. + */ \ No newline at end of file diff --git a/src/io/history.h b/src/io/history.h new file mode 100644 index 0000000..74355b5 --- /dev/null +++ b/src/io/history.h @@ -0,0 +1,14 @@ +/* + * history.h + * + * Maintain, and recall, a history of things which have been read from standard + * input. Necessarily the history must be stored on the user session, and not be + * global. + * + * I *think* history will be maintained as a list of forms, not of strings, so + * only forms which have successfully been read can be recalled, and forms which + * have not been completed when the history function is invoked will be lost. + * + * (c) 2025 Simon Brooke + * Licensed under GPL version 2.0, or, at your option, any later version. + */ \ No newline at end of file