-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,443 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
|
||
[*.{c,h}] | ||
indent_style = space | ||
indent_size = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
ci-linux: | ||
name: Linux CI | ||
uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 | ||
with: | ||
cabuild_ref: "v1" | ||
linux: true | ||
m32: true | ||
matrixmode: true | ||
valgrind: true | ||
ci-macos: | ||
name: MacOS CI | ||
uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 | ||
with: | ||
cabuild_ref: "v1" | ||
linux: false | ||
macos: true | ||
ci-windows: | ||
name: Windows CI | ||
uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1 | ||
with: | ||
cabuild_ref: "v1" | ||
linux: false | ||
windows: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
LICENSE: | ||
This project is dual-licensed under both the Apache License, Version | ||
2.0, and the GNU Lesser General Public License, Version 2.1+. | ||
|
||
AUTHORS-ASL: | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
AUTHORS-LGPL: | ||
This program is free software; you can redistribute it and/or modify it | ||
under the terms of the GNU Lesser General Public License as published | ||
by the Free Software Foundation; either version 2.1 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details. | ||
|
||
You should have received a copy of the GNU Lesser General Public License | ||
along with this program; If not, see <http://www.gnu.org/licenses/>. | ||
|
||
COPYRIGHT: (ordered alphabetically) | ||
Copyright (C) 2015-2022 Red Hat, Inc. | ||
|
||
AUTHORS: (ordered alphabetically) | ||
Danilo Horta <[email protected]> | ||
David Rheinsberg <[email protected]> | ||
Lucas De Marchi <[email protected]> | ||
Michele Dionisio | ||
Thomas Haller <[email protected]> | ||
Tom Gundersen <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# c-list - Circular Intrusive Double Linked List Collection | ||
|
||
## CHANGES WITH 3.1.0: | ||
|
||
* The minimum required meson version is now 0.60.0. | ||
|
||
* New function c_list_split() is added. It reverses c_list_splice() | ||
and thus allows to split a list in half. | ||
|
||
Contributions from: David Rheinsberg, Michele Dionisio | ||
|
||
- Brno, 2022-06-22 | ||
|
||
## CHANGES WITH 3: | ||
|
||
* API break: The c_list_loop_*() symbols were removed, since we saw | ||
little use for them. No user was known at the time, so | ||
all projects should build with the new API version | ||
unchanged. | ||
Since c-list does not distribute any compiled code, there | ||
is no ABI issue with this change. | ||
|
||
* Two new symbols c_list_length() and c_list_contains(). They are meant | ||
for debugging purposes, to easily verify list integrity. Since they | ||
run in O(n) time, they are not recommended for any other use than | ||
debugging. | ||
|
||
* New symbol c_list_init() is provided as alternative to the verbose | ||
C_LIST_INIT assignment. | ||
|
||
* The c-list API is extended to work well with `const CList` objects. | ||
That is, any read-only accessor function allows constant objects as | ||
input now. | ||
Note that this does not propagate into other members linked in the | ||
list. Using `const` for CList members is of little practical use. | ||
However, it might be of use for its embedding objects, so we now | ||
allow it in the CList API as well. | ||
|
||
* The c_list_splice() call now clears the source list, rather than | ||
returning with stale pointers. Technically, this is also an API | ||
break, but unlikely to affect any existing code. | ||
|
||
Contributions from: David Herrmann, Thomas Haller | ||
|
||
- Berlin, 2017-08-13 | ||
|
||
## CHANGES WITH 2: | ||
|
||
* Adjust project-name in build-system to reflect the actual project. The | ||
previous releases incorrectly claimed to be c-rbtree in the build | ||
system. | ||
|
||
* Add c_list_swap() that swaps two lists given their head pointers. | ||
|
||
* Add c_list_splice() that moves a list. | ||
|
||
* Add LGPL2.1+ as license so c-list can be imported into GPL2 projects. | ||
It is now officially dual-licensed. | ||
|
||
* As usual a bunch of fixes, additional tests, and documentation | ||
updates. | ||
|
||
Contributions from: David Herrmann, Tom Gundersen | ||
|
||
- Lund, 2017-05-03 | ||
|
||
## CHANGES WITH 1: | ||
|
||
* Initial release of c-list. | ||
|
||
* This project provides an implementation of a circular double linked | ||
list in standard ISO-C11. License is ASL-2.0 and the build system | ||
used is `Meson'. | ||
|
||
Contributions from: David Herrmann, Tom Gundersen | ||
|
||
- Berlin, 2017-03-03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
c-list | ||
====== | ||
|
||
Circular Intrusive Double Linked List Collection | ||
|
||
The c-list project implements an intrusive collection based on circular double | ||
linked lists in ISO-C11. It aims for minimal API constraints, leaving maximum | ||
control over the data-structures to the API consumer. | ||
|
||
### Project | ||
|
||
* **Website**: <https://c-util.github.io/c-list> | ||
* **Bug Tracker**: <https://github.com/c-util/c-list/issues> | ||
|
||
### Requirements | ||
|
||
The requirements for this project are: | ||
|
||
* `libc` (e.g., `glibc >= 2.16`) | ||
|
||
At build-time, the following software is required: | ||
|
||
* `meson >= 0.60` | ||
* `pkg-config >= 0.29` | ||
|
||
### Build | ||
|
||
The meson build-system is used for this project. Contact upstream | ||
documentation for detailed help. In most situations the following | ||
commands are sufficient to build and install from source: | ||
|
||
```sh | ||
mkdir build | ||
cd build | ||
meson setup .. | ||
ninja | ||
meson test | ||
ninja install | ||
``` | ||
|
||
No custom configuration options are available. | ||
|
||
### Repository: | ||
|
||
- **web**: <https://github.com/c-util/c-list> | ||
- **https**: `https://github.com/c-util/c-list.git` | ||
- **ssh**: `[email protected]:c-util/c-list.git` | ||
|
||
### License: | ||
|
||
- **Apache-2.0** OR **LGPL-2.1-or-later** | ||
- See AUTHORS file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
project( | ||
'c-list', | ||
'c', | ||
default_options: [ | ||
'c_std=c99', | ||
], | ||
license: 'Apache', | ||
meson_version: '>=0.60.0', | ||
version: '3.1.0', | ||
) | ||
major = meson.project_version().split('.')[0] | ||
project_description = 'Circular Intrusive Double Linked List Collection' | ||
|
||
mod_pkgconfig = import('pkgconfig') | ||
|
||
# See c-stdaux for details on these. We do not have c-stdaux as dependency, so | ||
# we keep a duplicated set here, reduced to the minimum. | ||
cflags = meson.get_compiler('c').get_supported_arguments( | ||
'-D_GNU_SOURCE', | ||
|
||
'-Wno-gnu-alignof-expression', | ||
'-Wno-maybe-uninitialized', | ||
'-Wno-unknown-warning-option', | ||
'-Wno-unused-parameter', | ||
|
||
'-Wno-error=type-limits', | ||
'-Wno-error=missing-field-initializers', | ||
|
||
'-Wdate-time', | ||
'-Wdeclaration-after-statement', | ||
'-Wlogical-op', | ||
'-Wmissing-include-dirs', | ||
'-Wmissing-noreturn', | ||
'-Wnested-externs', | ||
'-Wredundant-decls', | ||
'-Wshadow', | ||
'-Wstrict-aliasing=3', | ||
'-Wsuggest-attribute=noreturn', | ||
'-Wundef', | ||
'-Wwrite-strings', | ||
) | ||
add_project_arguments(cflags, language: 'c') | ||
|
||
subdir('src') | ||
|
||
meson.override_dependency('libclist-'+major, libclist_dep, static: true) |
Oops, something went wrong.