You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/contributing.rst
+61-20Lines changed: 61 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ Contributing
4
4
Coding style
5
5
++++++++++++
6
6
7
-
Source code should be written following the `K&R (Kernighan & Ritchie) style <https://en.wikipedia.org/wiki/Indentation_style#K&R_style>`_ with a few modifications.
7
+
Source code should be written following the `K&R (Kernighan & Ritchie)
8
+
style <https://en.wikipedia.org/wiki/Indentation_style#K&R_style>`_ with
9
+
a few modifications.
8
10
9
11
* Line length: max 80 characters
10
12
@@ -13,68 +15,107 @@ Source code should be written following the `K&R (Kernighan & Ritchie) style <ht
13
15
* Braces:
14
16
15
17
- Functions: opening brace at next line
18
+
16
19
- Control statements (mandatory): opening brace at same line
17
20
18
21
* Spacing:
19
22
20
23
- 2 lines between function definitions
21
-
- 1 line between logical blocks within functions (and between variable declarations and definitions)
24
+
25
+
- 1 line between logical blocks within functions (and between variable
26
+
declarations and definitions)
22
27
23
28
* Comments:
24
29
25
-
- Documentation of functions and other symbols: balanced, multi-line ``/** ... */`` comments in `reStructuredText <https://docutils.sourceforge.io/rst.html>`_ format using `field lists <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#field-lists>`_ ``:param:`` and ``:return:`` to document function parameters and return values, respectively, and ``:c:member:``, ``:c:func:``, ``:c:macro:``, ``:c:struct:``, ``:c:union:``, ``:c:enum:``, ``:c:enumerator:``, ``:c:type:``, ``:c:expr:``, ``:c:var:`` from the `Sphinx C domain <https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#the-c-domain>`_ directive to `cross-reference other C language constructs <https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#cross-referencing-c-constructs>`_ or to insert a C expression as inline code.
30
+
- Documentation of functions and other symbols: balanced,
31
+
multi-line ``/** ... */`` comments in `reStructuredText
32
+
<https://docutils.sourceforge.io/rst.html>`_ format using `field lists
- Inline comments in function body: single-line ``//`` C++ style comments
28
44
29
45
* Naming conventions:
30
46
31
-
- Data structures (``struct`` or ``enum``) and types are named using upper camel case (e.g., ``DcmDataSet``), while functions are named using all lower case with underscores (e.g., ``dcm_dataset_create()``).
47
+
- Data structures (``struct`` or ``enum``) and types are named using
48
+
upper camel case (e.g., ``DcmDataSet``), while functions are named using
49
+
all lower case with underscores (e.g., ``dcm_dataset_create()``).
32
50
33
-
- Names of ``external`` functions, data structures, and types that are declared in the ``dicom.h`` header file are prefixed with ``dcm_`` or ``Dcm``. Names of ``static`` functions, types, or data structures declared in ``*.c`` files are never prefixed.
51
+
- Names of ``external`` functions, data structures, and types that are
52
+
declared in the ``dicom.h`` header file are prefixed with ``dcm_`` or
53
+
``Dcm``. Names of ``static`` functions, types, or data structures declared
54
+
in ``*.c`` files are never prefixed.
34
55
35
56
36
57
Interface
37
58
+++++++++
38
59
39
-
The library exposes an "object-oriented" application programming interface (API), which provides data structures and functions to store, access, and manipulate the data.
60
+
The library exposes an "object-oriented" application programming interface
61
+
(API), which provides data structures and functions to store, access,
62
+
and manipulate the data.
40
63
41
64
To facilitate portability, the ``dicom.h`` header file is restricted to
42
65
43
-
* C99 version of the standard (C89 + Boolean type from ``stdbool.h`` + fixed-width integer types from ``stdint.h``/``inttypes.h``)
66
+
* C99 version of the standard (C89 + Boolean type from ``stdbool.h`` +
67
+
fixed-width integer types from ``stdint.h``/``inttypes.h``)
Documentation is written in `reStructuredText <https://docutils.sourceforge.io/rst.html>`_ format and HTML documents are autogenerated using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
61
-
API documentation is automatically extracted from the comments in the source code in the ``dicom.h`` header file via the `Hawkmoth Sphinx C Autodoc <https://hawkmoth.readthedocs.io/en/latest/index.html>`_ extension, which relies on `Clang <https://libclang.readthedocs.io/en/latest/index.html>`_ to parse C code.
91
+
Documentation is written in `reStructuredText
92
+
<https://docutils.sourceforge.io/rst.html>`_ format and HTML documents
93
+
are autogenerated using `Sphinx <https://www.sphinx-doc.org/en/master/>`_.
94
+
API documentation is automatically extracted from the comments in the source
95
+
code in the ``dicom.h`` header file via the `Hawkmoth Sphinx C Autodoc
96
+
<https://hawkmoth.readthedocs.io/en/latest/index.html>`_ extension, which
97
+
relies on `Clang <https://libclang.readthedocs.io/en/latest/index.html>`_
98
+
to parse C code.
62
99
63
-
Documentation files are located under the ``doc/source`` directory of the repository.
64
-
To build the documentation, install ``libclang`` development headers and the Python ``venv`` module, then build with ``meson``:
100
+
Documentation files are located under the ``doc/source`` directory of the
101
+
repository. To build the documentation, install ``libclang`` development
102
+
headers and the Python ``venv`` module, then build with ``meson``:
65
103
66
104
meson compile -C builddir html
67
105
68
-
The generated documentation files will then be located under the ``builddir/html`` directory.
69
-
The ``builddir/html/index.html`` HTML document can be rendered in the web browser.
106
+
The generated documentation files will then be located under the
107
+
``builddir/html`` directory. The ``builddir/html/index.html`` HTML document
108
+
can be rendered in the web browser.
70
109
71
110
72
111
Testing
73
112
+++++++
74
113
75
-
Unit test cases are defined and run using `check <https://github.com/libcheck/check>`_.
114
+
Unit test cases are defined and run using `check
115
+
<https://github.com/libcheck/check>`_.
76
116
77
-
Test files are located under ``/tests`` and can be built and run using ``meson``::
117
+
Test files are located under ``/tests`` and can be built and run using
Copy file name to clipboardExpand all lines: doc/source/installation.rst
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,8 @@ Installation
4
4
Building
5
5
++++++++
6
6
7
-
The library and executables can be built using `Meson <https://mesonbuild.com/>`_:
7
+
The library and executables can be built using `Meson
8
+
<https://mesonbuild.com/>`_:
8
9
9
10
.. code:: bash
10
11
@@ -45,15 +46,18 @@ Build for development and debugging:
45
46
46
47
.. code:: bash
47
48
48
-
CFLAGS="-DDEBUG"meson setup builddir
49
+
meson setup builddir --buildtype debug
49
50
meson compile -C builddir
50
51
51
52
52
53
Optional dependencies
53
54
+++++++++++++++++++++
54
55
55
-
This package uses `check <https://libcheck.github.io/check/>`_ for unit testing and `uthash <https://troydhanson.github.io/uthash/>`_ for data structures.
56
-
It will automatically download and build both libraries, or can use system copies.
56
+
This package uses `check <https://libcheck.github.io/check/>`_ for unit
57
+
testing and `uthash <https://troydhanson.github.io/uthash/>`_ for data
58
+
structures. It will automatically download and build both libraries,
0 commit comments