Skip to content

Commit

Permalink
Lots of doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 9, 2024
1 parent 6d1710a commit aa76777
Show file tree
Hide file tree
Showing 11 changed files with 197 additions and 180 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
LivInTheLookingGlass’s Project Euler solutions
==============================================

.. |C| image:: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/c.yml/badge.svg
.. |Ci| image:: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/c.yml/badge.svg
:target: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/c.yml
.. |C#| image:: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/csharp.yml/badge.svg
.. |C#i| image:: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/csharp.yml/badge.svg
:target: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/csharp.yml
.. |JavaScript| image:: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/javascript.yml/badge.svg
:target: https://github.com/LivInTheLookingGlass/Euler/actions/workflows/javascript.yml
Expand All @@ -29,12 +29,12 @@ LivInTheLookingGlass’s Project Euler solutions
+------------+---------------------+--------------+---------------+
| Language | Version | Solved | Status |
+============+=====================+==============+===============+
| C | C11+ in: ``gcc``, | 17 / |total| | |C| |
| C | C11+ in: ``gcc``, | 17 / |total| | |Ci| |
| | |br| ``clang``, | | |
| | ``msvc``, |br| | | |
| | ``pcc``, ``tcc`` | | |
+------------+---------------------+--------------+---------------+
| C# | .NET 2+ | 2 / |total| | |C#| |
| C# | .NET 2+ | 2 / |total| | |C#i| |
+------------+---------------------+--------------+---------------+
| JavaScript | Node 12+ | 2 / |total| | |JavaScript| |
+------------+---------------------+--------------+---------------+
Expand Down
2 changes: 1 addition & 1 deletion docs/c/bcd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ It was also a good exercise in x86 assembly, as several portions are accellerate
.. c:function:: BCD_int BCD_from_bytes(const unsigned char *str, size_t chars, bool negative, bool little_endian)
Takes in an arbitrary-sized encoded integer (like in Python's :external:python:ref:`int.from_bytes`) to a
Takes in an arbitrary-sized encoded integer (like in Python's :external:py:meth:`int.from_bytes`) to a
:c:type:`BCD_int`.
.. c:function:: BCD_int BCD_from_ascii(const char *str, size_t digits, bool negative)
Expand Down
6 changes: 3 additions & 3 deletions docs/c/digits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ digits.h
Implements the :c:macro:`Iterator <c.iterator.IteratorHead>` API
and yields successive decimal digits of a given number.

.. c:member:: unsigned char (*iterator_function)(*digit_counter)
.. c:member:: unsigned char (*iterator_function)(digit_counter *dc)
The function to advance the iterator and return the next element.
Expand All @@ -32,8 +32,8 @@ digits.h
This represents the current position in :c:member:`digits`.
.. c:function:: digit_counter digits(uintmax_t n)
.. c:function:: digit_counter digits(uintmax_t n)
.. c:function:: void free_digit_counter(digit_counter dc)
.. c:function:: void free_digit_counter(digit_counter dc)
.. c:namespace-pop::
4 changes: 2 additions & 2 deletions docs/c/fibonacci.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fibonacci.h
========
===========

.. c:namespace-push:: fibonacci
Expand All @@ -8,7 +8,7 @@ fibonacci.h
Implements the :c:macro:`Iterator <c.iterator.IteratorHead>` API
and yields successive Fibonacci numbers.

.. c:member:: uintmax_t (*iterator_function)(*digit_counter)
.. c:member:: uintmax_t (*iterator_function)(fibonacci *fib)
The function to advance the iterator and return the next element.

Expand Down
2 changes: 1 addition & 1 deletion docs/c/iterator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ iterator.h
This is an example implementation of the :c:macro:`Iterator <IteratorHead>`
API used in this project. You can construct it using any of the factory
functions found below, and it is generally used much like Python's
:external:py:ref:`range` object.
:external:py:class:`range` object.
.. c:member:: uintmax_t (*iterator_function)(counter *it)
Expand Down
22 changes: 11 additions & 11 deletions docs/c/macros.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ macros.h
These macros implement the ``likely()`` and ``unlikely()`` flags, as in the Linux kernel to
assist in branch prediction. On ``tcc`` and ``cl`` it has no effect.
.. c:macro:: MAX_FACTORIAL_64 20
MAX_FACTORIAL_128 34
.. c:macro:: MAX_FACTORIAL_64
MAX_FACTORIAL_128
.. c:macro:: PCC_SQRT_ACCURACY 8
.. c:macro:: PCC_SQRT_ACCURACY
.. c:macro:: MAX_POW_10_16 10000U
POW_OF_MAX_POW_10_16 4
.. c:macro:: MAX_POW_10_16
POW_OF_MAX_POW_10_16
.. c:macro:: MAX_POW_10_32 1000000000UL
POW_OF_MAX_POW_10_32 9
.. c:macro:: MAX_POW_10_32
POW_OF_MAX_POW_10_32
.. c:macro:: MAX_POW_10_64 10000000000000000000ULL
POW_OF_MAX_POW_10_64 19
.. c:macro:: MAX_POW_10_64
POW_OF_MAX_POW_10_64
.. c:macro:: MAX_POW_10_128 ((uintmax_t) MAX_POW_10_64 * (uintmax_t) MAX_POW_10_64)
POW_OF_MAX_POW_10_128 38
.. c:macro:: MAX_POW_10_128
POW_OF_MAX_POW_10_128
.. c:namespace-pop::
6 changes: 3 additions & 3 deletions docs/c/primes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ primes.h
Implements the :c:macro:`Iterator <c.iterator.IteratorHead>` API
and yields successive prime numbers.

.. c:member:: uintmax_t (*iterator_function)(*prime_counter pc)
.. c:member:: uintmax_t (*iterator_function)(prime_counter *pc)
The function to advance the iterator and return the next element.

Expand Down Expand Up @@ -43,7 +43,7 @@ primes.h
An :c:macro:`Iterator <c.iterator.IteratorHead>` that implements a modified sieve of eratosthenes
.. c:member:: uintmax_t (*iterator_function)(*prime_sieve ps)
.. c:member:: uintmax_t (*iterator_function)(prime_sieve *ps)
The function to advance the iterator and return the next element.
Expand Down Expand Up @@ -92,7 +92,7 @@ primes.h
Implements the :c:macro:`Iterator <c.iterator.IteratorHead>` API
and yields successive prime factors.
.. c:member:: uintmax_t (*iterator_function)(*prime_factor_counter pfc)
.. c:member:: uintmax_t (*iterator_function)(prime_factor_counter *pfc)
The function to advance the iterator and return the next element.
Expand Down
8 changes: 4 additions & 4 deletions docs/csharp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Usage

.. highlight:: make

This folder contains a Makefile with several recipes>
This facilitates the root Makefile dispatching tasks>
This folder contains a Makefile with several recipes, most of which are aliases to ``dotnet`` commands.
This facilitates the root Makefile dispatching tasks to each language, many of which have more complex
build or test processes.

.. make:target:: test
Expand All @@ -28,15 +28,15 @@ build or test processes.

WIP

Runs tests in parallel with one less thread than you have CPUs. Alias for ``dotnet test ``.
Runs tests in parallel with one less thread than you have CPUs. Alias for ``dotnet test``.

.. make:target:: test_%
.. note::

WIP

Runs tests in parallel with the specified number of threads. Alias for ``dotnet test `.
Runs tests in parallel with the specified number of threads. Alias for ``dotnet test``.

.. make:target:: clean
Expand Down
Loading

0 comments on commit aa76777

Please sign in to comment.