doxygenize ladicore

This commit is contained in:
Nedko Arnaudov 2023-11-16 18:54:25 +02:00
parent b0736e0bd9
commit 156313d2e8
13 changed files with 2952 additions and 12 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "doxygen-awesome-css"]
path = doc/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git

15
GNUmakefile Normal file
View File

@ -0,0 +1,15 @@
.PHONY: all
all: doc
.PHONY: doc
doc: build/README.html
doc: doxdoc
doxdoc:
mkdir -vp build
doxygen doc/Doxyfile
cp doc/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js build/doxout/html/
build/README.html: README.adoc doc/README-docinfo.html doc/README-docinfo-header.html
mkdir -vp build
asciidoc -b html5 -a data-uri -a icons --theme ladi -o build/README.html README.adoc

10
README.adoc Normal file
View File

@ -0,0 +1,10 @@
LADI core module complements the C runtime with few basic building blocks
that are used almost everywhere in the LADI system (jackdbus, a2jmidid, ladish, etc).
* klist.h - Linked list header implementation borrowed from Linux kernel
* catdup.h - String concatenation into newly allocated buffer
* file.h - File helpers
The in-tree build system is used only for rendering documetnation.
The C files are to be built by the build system of project using them
(via submodule or direct merge).

View File

@ -1,20 +1,70 @@
/* -*- Mode: C ; c-basic-offset: 2 -*- */
/*
* SPDX-FileCopyrightText: Copyright © 2009-2023 Nedko Arnaudov
* SPDX-License-Identifier: GPL-2.0-or-later
*
**************************************************************************
* This file contains prototype of the catdup() functions
**************************************************************************
/* -*- Mode: C ; c-basic-offset: 4 -*- */
/* SPDX-FileCopyrightText: Copyright © 2009-2023 Nedko Arnaudov */
/* SPDX-License-Identifier: ( GPL-2.0-or-later OR LGPL-2.1-or-later OR MIT OR AFL-2.1 ) */
/**
* @file catdup.h
* @brief String concatenation into newly allocated buffer
*/
/**************************************************************************
* This file contains implementation of double linked list (kernel style)
**************************************************************************/
#ifndef CATDUP_H__D42302F1_4D96_4EE4_AC09_E97ED5748277__INCLUDED
#define CATDUP_H__D42302F1_4D96_4EE4_AC09_E97ED5748277__INCLUDED
/**
* @brief Concatenate two strings into a newly allocated buffer
*
* @param s1 First string to concatenate
* @param s2 Second string to concatenate
*
* @return Newly allocated buffer where the input strings are concatenated into.
*/
char * catdup(const char * s1, const char * s2);
/**
* @brief Concatenate three strings into a newly allocated buffer
*
* @param s1 First string to concatenate
* @param s2 Second string to concatenate
* @param s3 Third string to concatenate
*
* @return Newly allocated buffer where the input strings are concatenated into.
*/
char * catdup3(const char * s1, const char * s2, const char * s3);
/**
* @brief Concatenate four strings into a newly allocated buffer
*
* @param s1 First string to concatenate
* @param s2 Second string to concatenate
* @param s3 Third string to concatenate
* @param s4 Fourth string to concatenate
*
* @return Newly allocated buffer where the input strings are concatenated into.
*/
char * catdup4(const char * s1, const char * s2, const char * s3, const char * s4);
/**
* @brief Concatenate any number of strings into a newly allocated buffer
*
* @param s1 First string to concatenate
* @param s2 Second string to concatenate
* @param ... Other strings to concatenate, NULL delimits end of list.
*
* @return Newly allocated buffer where the input strings are concatenated into.
*/
char * catdupv(const char * s1, const char * s2, ...);
/**
* @brief Concatenate strings specified as array into a newly allocated buffer,
* with optional delimiter,
*
* @param array NULL terminated array of input strings to concatenate
* @param delimiter Optional (can be NULL) string to insert in between input strings.
*
* @return Newly allocated buffer where the input strings are concatenated into.
*/
char * catdup_array(const char ** array, const char * delimiter);
#endif /* #ifndef CATDUP_H__D42302F1_4D96_4EE4_AC09_E97ED5748277__INCLUDED */

2743
doc/Doxyfile Normal file

File diff suppressed because it is too large Load Diff

View File

11
doc/README-docinfo.html Normal file
View File

@ -0,0 +1,11 @@
<style>
div.stdout {
border: 1px;
background-color: #DDDDDD;
border-style: solid;
font-size: 50%;
}
pre.stdout {
margin: 2em;
}
</style>

@ -0,0 +1 @@
Subproject commit 8cea9a073ecd50a5b2c0958a3df100292d6c7374

78
doc/doxygen-header.html Normal file
View File

@ -0,0 +1,78 @@
<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="$langISO">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN FULL_SIDEBAR-->
<script type="text/javascript">var page_layout=1;</script>
<!--END FULL_SIDEBAR-->
<!--END DISABLE_INDEX-->
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
$darkmode
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
<script type="text/javascript" src="$relpath^doxygen-awesome-darkmode-toggle.js"></script>
<script type="text/javascript">
DoxygenAwesomeDarkModeToggle.init()
</script>
</head>
<body>
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN FULL_SIDEBAR-->
<div id="side-nav" class="ui-resizable side-nav-resizable"><!-- do not remove this div, it is closed by doxygen! -->
<!--END FULL_SIDEBAR-->
<!--END DISABLE_INDEX-->
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign">
<div id="projectname">$projectname<!--BEGIN PROJECT_NUMBER--><span id="projectnumber">&#160;$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td>
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<!--BEGIN !FULL_SIDEBAR-->
<td>$searchbox</td>
<!--END !FULL_SIDEBAR-->
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
<!--BEGIN SEARCHENGINE-->
<!--BEGIN FULL_SIDEBAR-->
<tr><td colspan="2">$searchbox</td></tr>
<!--END FULL_SIDEBAR-->
<!--END SEARCHENGINE-->
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

10
doc/mainpage.dox Normal file
View File

@ -0,0 +1,10 @@
/**
@mainpage LADI core module
LADI core module complements the C runtime with few basic building blocks
that are used almost everywhere in the LADI system (jackdbus, a2jmidid, ladish, etc).
- klist.h - Linked list header implementation borrowed from Linux kernel
- catdup.h - String concatenation into newly allocated buffer
- file.h - File helpers
*/

12
file.h
View File

@ -2,10 +2,22 @@
/* SPDX-FileCopyrightText: Copyright © 2010-2023 Nedko Arnaudov */
/* SPDX-FileCopyrightText: Copyright © 2010 Nikita Zlobin <nick87720z@gmail.com> */
/* SPDX-License-Identifier: GPL-2.0-or-later */
/**
* @file file.h
* @brief File helpers
*/
#ifndef FILE_H__A3F70F24_F665_462E_87D0_608A2A392A5A__INCLUDED
#define FILE_H__A3F70F24_F665_462E_87D0_608A2A392A5A__INCLUDED
/**
* @brief Read (small) file contents into newly allocated buffer
* Use this function with caution as big enough files may not fit in RAM.
*
* @param name of file to read
*
* @return Newly allocated buffer where the contents if specified file are read into.
*/
char * read_file_contents(const char * filename);
#endif /* #ifndef FILE_H__A3F70F24_F665_462E_87D0_608A2A392A5A__INCLUDED */

14
klist.h
View File

@ -1,16 +1,22 @@
/* -*- Mode: C ; c-basic-offset: 2 -*- */
/*
/* SPDX-FileCopyrightText: Copyright © Linux kernel tree authors */
/* SPDX-License-Identifier: ( GPL-2.0 ) */
/**
* @file klist.h
* @brief Linux kernel header adapted for user-mode
*
* Linux kernel header adapted for user-mode. The 2.6.17-rt1 version was used.
*
* Original copyright holders of this code are unknown, they were not
* mentioned in the original file.
*
* Linux source code is GPL licensed
**************************************************************************
* This file contains implementation of double linked list (kernel style)
**************************************************************************
*/
/**************************************************************************
* This file contains implementation of double linked list (kernel style)
**************************************************************************/
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H