Merge branch 'master' of git.sr.ht:~swisschili/bluejay
diff --git a/doc/index.rst b/doc/index.rst
index 043078f..ca3da7b 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,8 +1,3 @@
-.. Bluejay documentation master file, created by
- sphinx-quickstart on Sun May 30 17:09:32 2021.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
The Bluejay Operating System
============================
@@ -10,7 +5,7 @@
:target: https://builds.sr.ht/~swisschili/bluejay/commits/.build.yml?
.. toctree::
- :maxdepth: 2
+ :maxdepth: 4
:caption: Contents:
:glob:
:hidden:
diff --git a/doc/lisp-std.rst b/doc/lisp-std.rst
index 1d00ce0..9f9dbd6 100644
--- a/doc/lisp-std.rst
+++ b/doc/lisp-std.rst
@@ -64,29 +64,37 @@
.. function:: (if condition true-condition [false-condition])
- Evaluates ``condition``, if it is truthy (non-``nil``) ``true-condition`` is
- evaluated. Otherwise ``false-condition`` is evaluated. If
- ``false-condition`` is not provided, ``if`` will evaluate to ``nil``.
+ Evaluates ``condition``, if it is truthy (non-``nil``) ``true-condition`` is
+ evaluated. Otherwise ``false-condition`` is evaluated. If
+ ``false-condition`` is not provided and ``condition`` is ``nil``, ``if``
+ will evaluate to ``nil``.
+
+ .. code-block:: lisp
+
+ (print (if (= 2 3)
+ "2 = 3"
+ "2 /= 3"))
+ ; 2 /= 3
.. function:: (let1 (variable binding) & body)
- Evaluates ``binding`` and binds it to ``variable``, then evaluates ``body``.
- After ``body`` is evaluated ``variable`` is unbound.
+ Evaluates ``binding`` and binds it to ``variable``, then evaluates ``body``.
+ After ``body`` is evaluated ``variable`` is unbound.
- .. code-block:: lisp
+ .. code-block:: lisp
- (let1 (greeting (greet "John"))
- (do-something greeting)
- (print greeting))
- ; greeting is no longer bound
+ (let1 (greeting (greet "John"))
+ (do-something greeting)
+ (print greeting))
+ ; greeting is no longer bound
.. function:: (gc)
- Force the garbage collector (GC) to run.
+ Force the garbage collector (GC) to run.
.. function:: (car pair)
- Return the first item in ``pair``.
+ Return the first item in ``pair``.
.. code-block:: lisp
@@ -94,7 +102,7 @@
.. function:: (cdr pair)
- Return the second (last) item in ``pair``.
+ Return the second (last) item in ``pair``.
.. code-block:: lisp
@@ -102,12 +110,12 @@
.. function:: (cons a b)
- Return a cons-pair containing ``a`` and ``b``.
+ Return a cons-pair containing ``a`` and ``b``.
.. function:: (print val)
- Print out ``val`` to standard output. This will not be formatted as an
- s-expression, but in a manner more similar to the internal representation.
+ Print out ``val`` to standard output. This will not be formatted as an
+ s-expression, but in a manner more similar to the internal representation.
.. function:: (list & items)
diff --git a/doc/logging.rst b/doc/logging.rst
index fd43282..9663d98 100644
--- a/doc/logging.rst
+++ b/doc/logging.rst
@@ -5,8 +5,10 @@
(currently only VGA since it is the only display target implemented) using
``kprintf`` in ``include/kernel/log.h``. Additional defines in the same file may
help differentiate different types of log messages (i.e. errors, debug
-information, etc). ::
+information, etc).
+
+.. code-block:: c
kprintf(OKAY "Something succeeded\n");
- kprintf(ERROR "Something failed :(\n");
- // etc, see log.h for details
+ kprintf(ERROR "Something failed :(\n");
+ // etc, see log.h for details