This commit is contained in:
Leonardo Vencovsky committed 2023-02-22 16:06:58 +01:00
1 parent 6f8496d39e
commit feb5dab0ce
129 files changed
+3608 -3636

No files matched your search

+3
View File
@@ -1,5 +1,8 @@
# RELEASE.MAJOR.MINOR
0.26.0
Complete refactor of the library, using a different approach to code generation
0.25.0
New Project Architecture - Files are no longer separated in folders, but rather prefixed by their sub-library
Added sac_list.h
+10
View File
@@ -3,7 +3,11 @@ help:
@echo Welcome to the C Macro Collections Library. Targets:
@echo
@echo - tests: run tests
@echo - tests_dev: run tests for dev
@echo - format: formats the entire project
@echo - bench: runs benchmarks
@echo - docbuild: builds documentation to ./docs
@echo - docserve: serves mdbook docs
tests:
make -C ./tests
@@ -16,3 +20,9 @@ format:
bench:
make -C ./benchmarks benchmark
docbuild:
mdbook build -d ../docs documentation
docserve:
mdbook serve documentation
+4 -21
View File
@@ -4,7 +4,7 @@
<img src="https://leoven.github.io/C-Macro-Collections/img/logo.png" alt="C Macro Collections Logo" width="300"/>
</p>
<p align="center">Easy to use, modular, header only, macro based, generic and type-safe Data Structures in C.</p>
<p align="center">Easy to use, modular, header only, macro based, generic and type-safe Data Structures in C</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections"><img src="https://img.shields.io/badge/GitHub-C%20Macro%20Collections-2195F3.svg?logo=github" alt="LinkToRepo"/></a>
@@ -13,7 +13,7 @@
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"/></a>
<a href="https://github.com/LeoVen/C-Macro-Collections/releases"><img src="https://img.shields.io/badge/Version-v0.25.0-orange.svg" alt="Version"/></a>
<a href="https://github.com/LeoVen/C-Macro-Collections/releases"><img src="https://img.shields.io/badge/Version-v0.26.0-orange.svg" alt="Version"/></a>
<a href="https://travis-ci.org/LeoVen/C-Macro-Collections"><img src="https://travis-ci.org/LeoVen/C-Macro-Collections.svg?branch=master" alt="travis-ci"/></a>
<a href="https://codecov.io/gh/LeoVen/C-Macro-Collections"><img src="https://codecov.io/gh/LeoVen/C-Macro-Collections/branch/master/graph/badge.svg" alt="codecov"/></a>
<a href="https://github.com/LeoVen/C-Macro-Collections/actions"><img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/></a>
@@ -21,8 +21,8 @@
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/stargazers"><img src="https://img.shields.io/github/stars/LeoVen/C-Macro-Collections?style=flat&color=ffa000" alt="Stars"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Lines%20of%20Code-20244-007596.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Files-107-961c00.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Lines%20of%20Code-28513-007596.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Files-130-961c00.svg" alt="loc"/></a>
</p>
## Table of Contents
@@ -130,27 +130,10 @@ The C Macro Collections library is organized into many other sub-libraries. The
| CMC | Macro Collections | The main library with dynamically-sized collections |
| COR | Core | Core functionalities used by more than one collection, usually from different sub-libraries |
| EXT | Extensions | Extension to collections |
| INT | Integrations | Macros that facilitate the creation of code that involves more than one type of collection |
| SAC | Statically Allocated Collections | Collections with a fixed sized array that don't use any heap allocation |
| TSC | Thread-Safe Collections | Collections that allow multiple operations from multiple threads |
| UTL | Utilities | General utilities |
Every macro that generates code for a certain collection can be found with the following template. Some exceptions exist as certain collections don't have or can't have some features. One big example is the `UTL` library, which does not follow this pattern.
```
macro_name := CMC_[ lib ]_[ collection ]_[ part ]_[ access ]_[ file ]
lib := CMC | COR | DEV | EXT | INT | SAC | TSC
collection := BITSET | DEQUE | HASHBIDIMAP | ... | TREEMULTISET | TREESET
part := CORE | ITER | INIT | ... | SETF | NODE
access := PUBLIC | PRIVATE
file := HEADER | SOURCE
```
__Some `collection`s might not be present in a certain `lib`. Check the documentation.__
Every macro is suffixed by `CMC` and each section is separated by an underscore (`_`). The first section is the library (`lib`). The second is the collection name in all uppercase. Then the `part` (or which module) that you wish to generate. And last, if it is code that should belong to a header file or code that should belong to a source file.
## Project Structure
* __benchmarks__ - Where all benchmarks are hosted
+3 -4
View File
@@ -13,14 +13,11 @@ Check out CHANGELOG
#!! Next Patch -----------------------------------------------------------------
[ ] Fix BitSet, using capacity vs. counter
[ ] #12 - Fix the collections that depend on ITER
#!! Major ----------------------------------------------------------------------
[ ] Stabilize the library
[ ] Add INT library
[ ] Add SAC library
[ ] Add TSC library
[ ] Separate inner Data Structure implementation from the Collection's one
@@ -31,8 +28,8 @@ Check out CHANGELOG
#!! Minor ----------------------------------------------------------------------
[ ] Fix BitSet, using capacity vs. counter
[ ] #13 - Properly implement HashBidiMap iterator
[ ] #10 - Fix Benchmarks and Examples
[ ] More SortedList functions
[ ] BidiMap's _is_mapping() to check if a mapping K <=> V exists
[ ] New asserts - _array_int(), _array_not_in() and str
@@ -103,3 +100,5 @@ Check out CHANGELOG
[X] Replace IntervalHeap node by a simple buffer of two pointers (V (*buffer)[2])
[X] PUBLIC and PRIVATE is back (opaque data structures)
[X] Add EXT library
[X] #12 - Fix the collections that depend on ITER
[X] #10 - Fix Benchmarks and Examples
-1
View File
@@ -1 +0,0 @@
book
+1 -1
View File
@@ -1 +1 @@
This file makes sure that Github Pages doesn't process mdBook's output.
This file makes sure that Github Pages doesn't process mdBook's output.
+187
View File
@@ -0,0 +1,187 @@
<!DOCTYPE HTML>
<html lang="en" class="sidebar-visible no-js light">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Page not found - CMC Docs</title>
<base href="/">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('no-js')
html.classList.remove('light')
html.classList.add(theme);
html.classList.add('js');
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="chapter-item expandedLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<h1 id="document-not-found-404"><a class="header" href="#document-not-found-404">Document not found (404)</a></h1>
<p>This URL is invalid, sorry. Please use the navigation bar or search to continue.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+74 -94
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Examples - C Macro Collections</title>
<title>Examples - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html" class="active"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utl/timer.h/index.Line truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,27 +142,27 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#minimal-example" id="minimal-example">Minimal Example</a></h1>
<h1 id="minimal-example"><a class="header" href="#minimal-example">Minimal Example</a></h1>
<p>(TODO this example is currently outdated)</p>
<p>Lets create a list of type <code>int</code>, add some elements to it and get the sum of all the elements printed on the screen.</p>
<h3><a class="header" href="#include-headers" id="include-headers">Include headers</a></h3>
<h3 id="include-headers"><a class="header" href="#include-headers">Include headers</a></h3>
<pre><code class="language-c">#include &lt;cmc/list.h&gt;
</code></pre>
<p>First you need to include only the necessary headers. It is not recommended that you include everything with <code>macro_collections.h</code>, only in cases where you might be using almost all features from the library.</p>
<h3><a class="header" href="#generating-a-list" id="generating-a-list">Generating a list</a></h3>
<h3 id="generating-a-list"><a class="header" href="#generating-a-list">Generating a list</a></h3>
<pre><code class="language-c">// CMC_GENERATE_LIST(PFX, SNAME, V)
CMC_GENERATE_LIST(il, int_list, int)
</code></pre>
<p>The List is also known as <code>vector</code>, <code>ArrayList</code> and dynamic array. In fact the latter is the best description for this collection. It is a dynamic array that can grow and shrink as needed. To generate it we can simply call the macro <code>CMC_GENERATE_LIST</code> after our includes. It has three parameters:</p>
<table><thead><tr><th align="center">Parameter name</th><th>Purpose</th></tr></thead><tbody>
<tr><td align="center"><strong>PFX</strong></td><td>Functions prefix (namespace)</td></tr>
<tr><td align="center"><strong>SNAME</strong></td><td>Struct name</td></tr>
<tr><td align="center"><strong>V</strong></td><td>The list value type (can be any valid data type)</td></tr>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">Parameter name</th><th>Purpose</th></tr></thead><tbody>
<tr><td style="text-align: center"><strong>PFX</strong></td><td>Functions prefix (namespace)</td></tr>
<tr><td style="text-align: center"><strong>SNAME</strong></td><td>Struct name</td></tr>
<tr><td style="text-align: center"><strong>V</strong></td><td>The list value type (can be any valid data type)</td></tr>
</tbody></table>
<aside class="notice">
</div><aside class="notice">
All collections can be generated by using the macro CMC_GENERATE_ and then the name of the include (in this case list.h) but in uppercase without the `.h`.
</aside>
<h3><a class="header" href="#initializing-and-adding-elements" id="initializing-and-adding-elements">Initializing and adding elements</a></h3>
<h3 id="initializing-and-adding-elements"><a class="header" href="#initializing-and-adding-elements">Initializing and adding elements</a></h3>
<pre><code class="language-c">// Allocate an int_list with an initial capacity of 100
int_list *list = il_new(100);
@@ -187,7 +181,7 @@ for (int i = 0; i &lt;= 1000; i++)
<p>Which expands to:</p>
<p><code>typedef struct int_list_s int_list</code></p>
<p>To add elements to the back of a list we can use <code>il_push_back</code>. This function will first check if the list has enough space for a new element. If not, reallocate the internal buffer with doubled size and then add the new element.</p>
<h3><a class="header" href="#iteration" id="iteration">Iteration</a></h3>
<h3 id="iteration"><a class="header" href="#iteration">Iteration</a></h3>
<blockquote>
<p>It is recommended that the iterator is allocated on the stack</p>
</blockquote>
@@ -209,22 +203,23 @@ for (il_iter_init(&amp;it, list); !il_iter_end(&amp;it); il_iter_next(&amp;it))
printf(&quot;%d\n&quot;, sum);
</code></pre>
<p>There are 6 (2 optional) steps to iterate over the elements of any collection:</p>
<table><thead><tr><th align="center">Step</th><th>Description</th><th>Function</th></tr></thead><tbody>
<tr><td align="center">1</td><td>Allocate the iterator (optional)</td><td><code>il_iter_new</code></td></tr>
<tr><td align="center">2</td><td>Initialize the iterator given a target list</td><td><code>il_iter_init</code></td></tr>
<tr><td align="center">3</td><td>Access the iterator's elements (value, index, etc)</td><td><code>il_iter_value</code></td></tr>
<tr><td align="center">4</td><td>Go to the next element</td><td><code>il_iter_next</code></td></tr>
<tr><td align="center">5</td><td>Check if we haven't reached the end of the list</td><td><code>il_iter_end</code></td></tr>
<tr><td align="center">6</td><td>Free the iterator if it was allocated on the heap</td><td><code>il_iter_free</code></td></tr>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">Step</th><th>Description</th><th>Function</th></tr></thead><tbody>
<tr><td style="text-align: center">1</td><td>Allocate the iterator (optional)</td><td><code>il_iter_new</code></td></tr>
<tr><td style="text-align: center">2</td><td>Initialize the iterator given a target list</td><td><code>il_iter_init</code></td></tr>
<tr><td style="text-align: center">3</td><td>Access the iterator's elements (value, index, etc)</td><td><code>il_iter_value</code></td></tr>
<tr><td style="text-align: center">4</td><td>Go to the next element</td><td><code>il_iter_next</code></td></tr>
<tr><td style="text-align: center">5</td><td>Check if we haven't reached the end of the list</td><td><code>il_iter_end</code></td></tr>
<tr><td style="text-align: center">6</td><td>Free the iterator if it was allocated on the heap</td><td><code>il_iter_free</code></td></tr>
</tbody></table>
</div>
<p>Note that all iterator functions are prefixed by the user defined prefix and then by <code>iter</code> (<code>il + iter = il_iter</code>). Also, the steps <strong>1</strong> and <strong>6</strong> are optional so <code>il_iter_new</code> and <code>il_iter_free</code> are not used in the example.</p>
<p>By the end of the example we have the variable <code>sum</code> with the sum of all integers inside our list. We can then print it and this example is almost done.</p>
<h3><a class="header" href="#freeing-resources" id="freeing-resources">Freeing resources</a></h3>
<h3 id="freeing-resources"><a class="header" href="#freeing-resources">Freeing resources</a></h3>
<pre><code class="language-c">// void il_free(int_list *_list_, void(*deallocator)(int))
il_free(list, NULL);
</code></pre>
<p>The list is currently allocated in memory. To deallocate it we call <code>il_free</code>. This function takes a pointer to the allocated list and a pointer to a <code>deallocator</code> function that will be responsible for deallocating each element in the list. This last parameter is optional and we won't be using it since our data type <code>int</code> is not allocated in the heap. This optional parameter can be set to <code>NULL</code> to be ignored by the <code>il_free</code> function.</p>
<h3><a class="header" href="#compile-and-run" id="compile-and-run">Compile and run</a></h3>
<h3 id="compile-and-run"><a class="header" href="#compile-and-run">Compile and run</a></h3>
<blockquote>
<p>source.c</p>
</blockquote>
@@ -261,20 +256,17 @@ int main(void)
</code></pre>
<p>If the source file is <code>source.c</code>, all you have to do is to include the <code>src</code> folder to the include path and compile. The following example uses <code>gcc</code>:</p>
<p><code>gcc source.c -I path/to/library/src</code></p>
<h3><a class="header" href="#conclusion" id="conclusion">Conclusion</a></h3>
<h3 id="conclusion"><a class="header" href="#conclusion">Conclusion</a></h3>
<p>The C Macro Collections Library is prepared to accept any data type and is highly customizable. It is also very easy to integrate and no previous compilation is required. The library also comes with many utilities in the <code>utl</code> folder that are designed to work well with all collections.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../utl/timer.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -282,45 +274,33 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../utl/timer.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../utl/timer.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>How to install - C Macro Collections</title>
<title>How to install - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html" class="active"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html" class="active"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#how-to-install" id="how-to-install">How to install</a></h1>
<h1 id="how-to-install"><a class="header" href="#how-to-install">How to install</a></h1>
<p>To start using the library you need first to download the source code. You can either fork the repository or download a zip file containing everything. Either way, after you unzip everything you will end up with the root folder (probably something called <code>C-Macro-Collections</code>) and inside it is the <code>src</code> folder.</p>
<p>With the <code>src</code> folder you can start including the library headers to your project with <code>-I path/to/library/src</code>.</p>
<p>The library has no external dependencies other than the C standard library.</p>
@@ -167,17 +161,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/why_this_library.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Introduction/library_structure.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -185,49 +175,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/why_this_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/why_this_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Introduction/library_structure.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Introduction/library_structure.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>How to use the library - C Macro Collections</title>
<title>How to use the library - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html" class="active"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html" class="active"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#how-to-use-the-library" id="how-to-use-the-library">How to Use the Library</a></h1>
<h1 id="how-to-use-the-library"><a class="header" href="#how-to-use-the-library">How to Use the Library</a></h1>
<p>The C Macro Collections Library comes with very powerful data structures and they are only one macro away from you.</p>
<p>TODO</p>
@@ -156,17 +150,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/understanding_the_library.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Overview/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -174,49 +164,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/understanding_the_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/understanding_the_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Overview/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Overview/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+62 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Introduction - C Macro Collections</title>
<title>Introduction - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html" class="active"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html" class="active"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,21 +142,26 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#introduction" id="introduction">Introduction</a></h1>
<h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1>
<p align="center">
<img src="img/logo.png" alt="C Macro Collections Logo" width="300"/>
</p>
<p align="center">Header only, macro generated, generic and type-safe Collections in C.</p>
<p align="center">Easy to use, modular, header only, macro based, generic and type-safe Data Structures in C</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections"><img src="https://img.shields.io/badge/GitHub-C%20Macro%20Collections-2195F3.svg?logo=github" alt="LinkToRepo"/></a>
<a href="https://leoven.github.io/C-Macro-Collections/"><img style="color: #ffffff;" src="https://img.shields.io/badge/Read%20the%20Docs-D13636.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHN0eWxlPSIiPjxyZWN0IGlkPSJiYWNrZ3JvdW5kcmVjdCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgeD0iMCIgeT0iMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIi8%2BPHRpdGxlPmljbi9kb2MtdGV4dDwvdGl0bGU%2BPGcgY2xhc3M9ImN1cnJlbnRMYXllciIgc3R5bGU9IiI%2BPHRpdGxlPkxheWVyIDE8L3RpdGxlPjxwYXRoIGQ9Ik01IDFoNC4yNDRhMiAyIDAgMCAxIDEuNDM0LjYwNmwyLjc1NiAyLjgzNEEyIDIgMCAwIDEgMTQgNS44MzVWMTJhMyAzIDAgMCAxLTMgM0g1YTMgMyAwIDAgMS0zLTNWNGEzIDMgMCAwIDEgMy0zem0wIDJhMSAxIDAgMCAwLTEgMXY4YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjUuODM1TDkuMjQ0IDNINXptMS41IDdoM2EuNS41IDAgMSAxIDAgMWgtM2EuNS41IDAgMSAxIDAtMXptMC0yaDJhLjUuNSAwIDAgMSAwIDFoLTJhLjUuNSAwIDAgMSAwLTF6TTggMmwzIDEuOTk1TDEzIDdIOWExIDEgMCAwIDEtMS0xVjJ6IiBpZD0iYSIgY2xhc3M9IiIgZmlsbD0iI2ZmZmZmZiIgZmlsbC1vcGFjaXR5PSIxIi8%2BPC9nPjwvc3ZnPg%3D%3D" alt="LinkToDocs"/></a>
</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"/></a>
<img src="https://img.shields.io/badge/Version-v0.23.1-orange.svg" alt="Version"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/releases"><img src="https://img.shields.io/badge/Version-v0.26.0-orange.svg" alt="Version"/></a>
<a href="https://travis-ci.org/LeoVen/C-Macro-Collections"><img src="https://travis-ci.org/LeoVen/C-Macro-Collections.svg?branch=master" alt="travis-ci"/></a>
<a href="https://codecov.io/gh/LeoVen/C-Macro-Collections"><img src="https://codecov.io/gh/LeoVen/C-Macro-Collections/branch/master/graph/badge.svg" alt="codecov"/></a>
<img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/actions"><img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/></a>
</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/stargazers"><img src="https://img.shields.io/github/stars/LeoVen/C-Macro-Collections?style=flat&color=ffa000" alt="Stars"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Lines%20of%20Code-28513-007596.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Files-130-961c00.svg" alt="loc"/></a>
</p>
<p>The C Macro Collections Library is a compilation of macros that can be used to generate common data structures for any desired type. These data structures are <a href="https://en.wikipedia.org/wiki/Type_safety">type safe</a> and are powered with many features (see Features section).</p>
<p>The documentation is currently being written in hopes that in the future it can be used to help you get to know better this amazing C library.</p>
@@ -171,13 +170,10 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="next" href="../Introduction/why_this_library.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -185,45 +181,33 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/why_this_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Introduction/why_this_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+60 -83
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Library structure - C Macro Collections</title>
<title>Library structure - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html" class="active"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html" class="active"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#library-structure" id="library-structure">Library Structure</a></h1>
<h1 id="library-structure"><a class="header" href="#library-structure">Library Structure</a></h1>
<p>The <code>src</code> folder is subdivided in 5 other folders and one file:</p>
<ul>
<li><strong>cmc</strong> - The main C Macro Collections Library</li>
@@ -157,32 +151,28 @@
<li><strong>utl</strong> - Utility like ForEach macros, logging, etc</li>
<li><strong>macro_collections.h</strong> - Master header containing all collections and utilities</li>
</ul>
<h2><a class="header" href="#cmc" id="cmc">cmc</a></h2>
<h2 id="cmc"><a class="header" href="#cmc">cmc</a></h2>
<p>This is where the C Macro Collections are hosted.</p>
<h2><a class="header" href="#dev" id="dev">dev</a></h2>
<h2 id="dev"><a class="header" href="#dev">dev</a></h2>
<p>In this folder is an exact copy of the <code>cmc</code> Collections with the added logging utility (<code>./utl/log.h</code>). These are useful to debug your code because everything that is happening inside the data structure can be seen.</p>
<h2><a class="header" href="#sac" id="sac">sac</a></h2>
<h2 id="sac"><a class="header" href="#sac">sac</a></h2>
<p>This is where the Statically Allocated Collections are hosted. These collections are just like the <code>cmc</code> Collections but they have a constant size, a C array, instead of a dynamically allocated array (yes, even for Linked List).</p>
<h2><a class="header" href="#utl" id="utl">utl</a></h2>
<h2 id="utl"><a class="header" href="#utl">utl</a></h2>
<p>Utility. Here you will find things like assert macros, foreach macros, logging utility, unit test and timer.</p>
<h2><a class="header" href="#macro_collectionsh" id="macro_collectionsh">macro_collections.h</a></h2>
<h2 id="macro_collectionsh"><a class="header" href="#macro_collectionsh">macro_collections.h</a></h2>
<p>This is the master header. Include this big boy and all functionalities of the library will be in your hands.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/how_to_install.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Introduction/understanding_the_library.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -190,49 +180,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/how_to_install.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/how_to_install.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Introduction/understanding_the_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Introduction/understanding_the_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Understanding the library - C Macro Collections</title>
<title>Understanding the library - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html" class="active"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html" class="active"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,10 +142,10 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#understanding-the-library" id="understanding-the-library">Understanding the Library</a></h1>
<h1 id="understanding-the-library"><a class="header" href="#understanding-the-library">Understanding the Library</a></h1>
<p>Every macro within the library is prefixed by <code>CMC</code> or <code>cmc</code>. If you have <a href="https://code.visualstudio.com/docs/editor/intellisense">intellisense</a> you can easily check all the features of the library once you include the necessary headers.</p>
<p>When you generate code for a certain collection you will need to pass four very important parameters: <code>SNAME</code>, <code>PFX</code>, <code>K</code> and <code>V</code>.</p>
<h2><a class="header" href="#sname" id="sname">SNAME</a></h2>
<h2 id="sname"><a class="header" href="#sname">SNAME</a></h2>
<p><code>SNAME</code> is short for struct name. This parameter will define your collection so that its type name becomes:</p>
<pre><code class="language-c">struct SNAME;
</code></pre>
@@ -161,7 +155,7 @@
struct SNAME##_node;
</code></pre>
<p>Note that the <code>##</code> is a <a href="https://en.wikipedia.org/wiki/C_preprocessor#Token_concatenation">Token Pasting Operator</a>.</p>
<h2><a class="header" href="#pfx" id="pfx">PFX</a></h2>
<h2 id="pfx"><a class="header" href="#pfx">PFX</a></h2>
<p><code>PFX</code> is a short for prefix. <strong>Every function generated will be within this namespace</strong>. When using <a href="https://code.visualstudio.com/docs/editor/intellisense">Intellisense</a>, write whichever prefix you gave to your functions and everything will be in there.</p>
<p>Functions that are part of the implementation and shouldn't be called directly are prefixed by <code>PFX</code> and then by <code>_impl_</code>. Every iterator function will be prefixed by <code>PFX</code> and then by <code>_iter_</code>. For example:</p>
<pre><code class="language-c">// A function that you shouldn't use directly
@@ -170,11 +164,11 @@ size_t PFX##_impl_quick_sort(struct SNAME *list);
<pre><code class="language-c">// A function that is associated with the iterator
struct SNAME##_iter *PFX##_iter_new(struct SNAME *target);
</code></pre>
<h2><a class="header" href="#k" id="k">K</a></h2>
<h2 id="k"><a class="header" href="#k">K</a></h2>
<p><code>K</code>, short for Key, is the data type that is only used by associative collections to map a key to a value.</p>
<h2><a class="header" href="#v" id="v">V</a></h2>
<h2 id="v"><a class="header" href="#v">V</a></h2>
<p><code>V</code>, short for Value, is the primary data type for most collections.</p>
<h2><a class="header" href="#summarizing" id="summarizing">Summarizing</a></h2>
<h2 id="summarizing"><a class="header" href="#summarizing">Summarizing</a></h2>
<p>With <code>SNAME</code> and <code>PFX</code> a common function definition looks like:</p>
<p><code>size_t PFX##_count(struct SNAME *list);</code></p>
<p>So if input <code>SNAME</code> as <code>i32list</code> and <code>PFX</code> as <code>i32l</code> you will have the following function definition:</p>
@@ -184,17 +178,13 @@ struct SNAME##_iter *PFX##_iter_new(struct SNAME *target);
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/library_structure.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Introduction/how_to_use_the_library.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -202,49 +192,36 @@ struct SNAME##_iter *PFX##_iter_new(struct SNAME *target);
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/library_structure.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/library_structure.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Introduction/how_to_use_the_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Introduction/how_to_use_the_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Why this library - C Macro Collections</title>
<title>Why this library - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html" class="active"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html" class="active"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#why-this-library" id="why-this-library">Why this library</a></h1>
<h1 id="why-this-library"><a class="header" href="#why-this-library">Why this library</a></h1>
<p>C is a low level language and lacks all the data structures that we commonly use. Many high level languages already come with these collections so that we don't have to implement everything ourselves. A lot of third party libraries that implement these missing data structures for the C language usually make use of a void pointers and a lot of macros. <strong>This is why the C Macro Collections Library was created.</strong> All you need to do is to write down one macro and which data type you wish to work with. The library currently provides many data structures, such as:</p>
<ul>
<li><strong>Linear Collections</strong> : List, LinkedList, Deque, Stack, Queue, SortedList</li>
@@ -170,17 +164,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/introduction.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Introduction/how_to_install.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -188,49 +178,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/introduction.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/introduction.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Introduction/how_to_install.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Introduction/how_to_install.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+72 -95
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Collections Overview - C Macro Collections</title>
<title>Collections Overview - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html" class="active"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html" class="active"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,40 +142,36 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#collections-overview" id="collections-overview">Collections Overview</a></h1>
<table><thead><tr><th align="center">Collection</th><th align="center">Abstract Data Type</th><th align="center">Data Structure</th><th align="center">Details</th></tr></thead><tbody>
<tr><td align="center">BidiMap <br> <em>bidimap.h</em></td><td align="center">Bidirectional Map</td><td align="center">Two Hashtables</td><td align="center">A bijection between two sets of unique keys and unique values <code>K &lt;-&gt; V</code> using two hashtables</td></tr>
<tr><td align="center">Deque <br> <em>deque.h</em></td><td align="center">Double-Ended Queue</td><td align="center">Dynamic Circular Array</td><td align="center">A circular array that allows <code>push</code> and <code>pop</code> on both ends (only) at constant time</td></tr>
<tr><td align="center">HashMap <br> <em>hashmap.h</em></td><td align="center">Map</td><td align="center">Hashtable</td><td align="center">A unique set of keys associated with a value <code>K -&gt; V</code> with constant time look up using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td align="center">HashSet <br> <em>hashset.h</em></td><td align="center">Set</td><td align="center">Hashtable</td><td align="center">A unique set of values with constant time look up using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td align="center">Heap <br> <em>heap.h</em></td><td align="center">Priority Queue</td><td align="center">Dynamic Array</td><td align="center">A binary heap as a dynamic array as an implicit data structure</td></tr>
<tr><td align="center">IntervalHeap <br> <em>intervalheap.h</em></td><td align="center">Double-Ended Priority Queue</td><td align="center">Custom Dynamic Array</td><td align="center">A dynamic array of nodes, each hosting one value from the MinHeap and one from the MaxHeap</td></tr>
<tr><td align="center">LinkedList <br> <em>linkedlist.h</em></td><td align="center">List</td><td align="center">Doubly-Linked List</td><td align="center">A default doubly-linked list</td></tr>
<tr><td align="center">List <br> <em>list.h</em></td><td align="center">List</td><td align="center">Dynamic Array</td><td align="center">A dynamic array with <code>push</code> and <code>pop</code> anywhere on the array</td></tr>
<tr><td align="center">MultiMap <br> <em>multimap.h</em></td><td align="center">Multimap</td><td align="center">Custom Hashtable</td><td align="center">A mapping of multiple keys with one node per key using a hashtable with separate chaining</td></tr>
<tr><td align="center">Multiset <br> <em>multiset.h</em></td><td align="center">Multiset</td><td align="center">Hashtable</td><td align="center">A mapping of a value and its multiplicity using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td align="center">Queue <br> <em>queue.h</em></td><td align="center">FIFO</td><td align="center">Dynamic Circular Array</td><td align="center">A queue using a circular array with <code>enqueue</code> at the <code>back</code> index and <code>dequeue</code> at the <code>front</code> index</td></tr>
<tr><td align="center">SortedList <br> <em>sortedlist.h</em></td><td align="center">Sorted List</td><td align="center">Sorted Dynamic Array</td><td align="center">A lazily sorted dynamic array that is sorted only when necessary</td></tr>
<tr><td align="center">Stack <br> <em>stack.h</em></td><td align="center">FILO</td><td align="center">Dynamic Array</td><td align="center">A stack with push and pop at the end of a dynamic array</td></tr>
<tr><td align="center">TreeMap <br> <em>treemap.h</em></td><td align="center">Sorted Map</td><td align="center">AVL Tree</td><td align="center">A unique set of keys associated with a value <code>K -&gt; V</code> using an AVL tree with <code>log(n)</code> look up and sorted iteration</td></tr>
<tr><td align="center">TreeSet <br> <em>treeset.h</em></td><td align="center">Sorted Set</td><td align="center">AVL Tree</td><td align="center">A unique set of keys using an AVL tree with <code>log(n)</code> look up and sorted iteration</td></tr>
<h1 id="collections-overview"><a class="header" href="#collections-overview">Collections Overview</a></h1>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">Collection</th><th style="text-align: center">Abstract Data Type</th><th style="text-align: center">Data Structure</th><th style="text-align: center">Details</th></tr></thead><tbody>
<tr><td style="text-align: center">BidiMap <br> <em>bidimap.h</em></td><td style="text-align: center">Bidirectional Map</td><td style="text-align: center">Two Hashtables</td><td style="text-align: center">A bijection between two sets of unique keys and unique values <code>K &lt;-&gt; V</code> using two hashtables</td></tr>
<tr><td style="text-align: center">Deque <br> <em>deque.h</em></td><td style="text-align: center">Double-Ended Queue</td><td style="text-align: center">Dynamic Circular Array</td><td style="text-align: center">A circular array that allows <code>push</code> and <code>pop</code> on both ends (only) at constant time</td></tr>
<tr><td style="text-align: center">HashMap <br> <em>hashmap.h</em></td><td style="text-align: center">Map</td><td style="text-align: center">Hashtable</td><td style="text-align: center">A unique set of keys associated with a value <code>K -&gt; V</code> with constant time look up using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td style="text-align: center">HashSet <br> <em>hashset.h</em></td><td style="text-align: center">Set</td><td style="text-align: center">Hashtable</td><td style="text-align: center">A unique set of values with constant time look up using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td style="text-align: center">Heap <br> <em>heap.h</em></td><td style="text-align: center">Priority Queue</td><td style="text-align: center">Dynamic Array</td><td style="text-align: center">A binary heap as a dynamic array as an implicit data structure</td></tr>
<tr><td style="text-align: center">IntervalHeap <br> <em>intervalheap.h</em></td><td style="text-align: center">Double-Ended Priority Queue</td><td style="text-align: center">Custom Dynamic Array</td><td style="text-align: center">A dynamic array of nodes, each hosting one value from the MinHeap and one from the MaxHeap</td></tr>
<tr><td style="text-align: center">LinkedList <br> <em>linkedlist.h</em></td><td style="text-align: center">List</td><td style="text-align: center">Doubly-Linked List</td><td style="text-align: center">A default doubly-linked list</td></tr>
<tr><td style="text-align: center">List <br> <em>list.h</em></td><td style="text-align: center">List</td><td style="text-align: center">Dynamic Array</td><td style="text-align: center">A dynamic array with <code>push</code> and <code>pop</code> anywhere on the array</td></tr>
<tr><td style="text-align: center">MultiMap <br> <em>multimap.h</em></td><td style="text-align: center">Multimap</td><td style="text-align: center">Custom Hashtable</td><td style="text-align: center">A mapping of multiple keys with one node per key using a hashtable with separate chaining</td></tr>
<tr><td style="text-align: center">Multiset <br> <em>multiset.h</em></td><td style="text-align: center">Multiset</td><td style="text-align: center">Hashtable</td><td style="text-align: center">A mapping of a value and its multiplicity using a hashtable with open addressing and robin hood hashing</td></tr>
<tr><td style="text-align: center">Queue <br> <em>queue.h</em></td><td style="text-align: center">FIFO</td><td style="text-align: center">Dynamic Circular Array</td><td style="text-align: center">A queue using a circular array with <code>enqueue</code> at the <code>back</code> index and <code>dequeue</code> at the <code>front</code> index</td></tr>
<tr><td style="text-align: center">SortedList <br> <em>sortedlist.h</em></td><td style="text-align: center">Sorted List</td><td style="text-align: center">Sorted Dynamic Array</td><td style="text-align: center">A lazily sorted dynamic array that is sorted only when necessary</td></tr>
<tr><td style="text-align: center">Stack <br> <em>stack.h</em></td><td style="text-align: center">FILO</td><td style="text-align: center">Dynamic Array</td><td style="text-align: center">A stack with push and pop at the end of a dynamic array</td></tr>
<tr><td style="text-align: center">TreeMap <br> <em>treemap.h</em></td><td style="text-align: center">Sorted Map</td><td style="text-align: center">AVL Tree</td><td style="text-align: center">A unique set of keys associated with a value <code>K -&gt; V</code> using an AVL tree with <code>log(n)</code> look up and sorted iteration</td></tr>
<tr><td style="text-align: center">TreeSet <br> <em>treeset.h</em></td><td style="text-align: center">Sorted Set</td><td style="text-align: center">AVL Tree</td><td style="text-align: center">A unique set of keys using an AVL tree with <code>log(n)</code> look up and sorted iteration</td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Overview/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Overview/features_overview.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -189,49 +179,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Overview/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Overview/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Overview/features_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Overview/features_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+57 -80
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Features Overview - C Macro Collections</title>
<title>Features Overview - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html" class="active"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html" class="active"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,31 +142,27 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#features-overview" id="features-overview">Features Overview</a></h1>
<h1 id="features-overview"><a class="header" href="#features-overview">Features Overview</a></h1>
<p>The C Macro Collections library comes with some core features available to all collections.</p>
<table><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Feature</th><th>Description</th></tr></thead><tbody>
<tr><td><a href="../cor/callbacks/index.html">Callbacks</a></td><td>Callbacks are functions that are called when an operation is successful. These operations are divided in 5 categories (create, read, update, delete, resize).</td></tr>
<tr><td><a href="../cor/custom_allocation/index.html">Custom Allocation</a></td><td>Allows you to use your own custom dynamic memory allocation functions inside the collections.</td></tr>
<tr><td><a href="../cor/error_codes/index.html">Error Codes</a></td><td>Error codes that can be used to treat certain common errors when operating on a collection.</td></tr>
<tr><td><a href="../cor/functions_table/index.html">Functions Table</a></td><td>A standard way to access required behaviors from the custom data types. Things like hash, comparison, freeing from memory if needed, etc.</td></tr>
<tr><td><a href="../cor/iterators/index.html">Iterators</a></td><td>Iterators are a simplified access to the values of a collection.</td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Overview/collections_overview.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Overview/files_overview.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -180,49 +170,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Overview/collections_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Overview/collections_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Overview/files_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Overview/files_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+81 -109
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Files Overview - C Macro Collections</title>
<title>Files Overview - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html" class="active"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html" class="active"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,63 +142,54 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#files-overview" id="files-overview">Files Overview</a></h1>
<h1 id="files-overview"><a class="header" href="#files-overview">Files Overview</a></h1>
<p>An overview of the source files (all <code>.h</code>) of the C Macro Collections library.</p>
<ul>
<li><code>./cmc</code> - The main C Macro Collections library
<li><code>cmc</code> - The main C Macro Collections library</li>
<li><code>cor</code> - Core functionalities of the C Macro Collections libraries
<ul>
<li><code>./bidimap.h</code> - A bi-directional map based on a hash table</li>
<li><code>./deque.h</code> - A double-ended queue</li>
<li><code>./hashmap.h</code> - A map based on a hash table</li>
<li><code>./hashset.h</code> - A set based on a hash table</li>
<li><code>./heap.h</code> - A binary heap based on a dynamic array</li>
<li><code>./intervalheap.h</code> - A heap that is both Min and Max based on a dynamic array</li>
<li><code>./linkedlist.h</code> - A doubly-linked list</li>
<li><code>./list.h</code> - A dynamic array</li>
<li><code>./multimap.h</code> - A map that accepts multiple keys based on a hash table</li>
<li><code>./multiset.h</code> - A multiset based on a hash table</li>
<li><code>./queue.h</code> - A FIFO based on a circular dynamic array</li>
<li><code>./sortedlist.h</code> - A sorted list based on a dynamic array</li>
<li><code>./stack.h</code> - A LIFO based on a dynamic array</li>
<li><code>./treemap.h</code> - A sorted map based on an AVL tree</li>
<li><code>./treeset.h</code> - A sorted set based on an AVL tree</li>
<li><code>core.h</code> - Core functionalities of the library</li>
<li><code>hashtable.h</code> - Common things used by hash table based collections</li>
</ul>
</li>
<li><code>./cor</code> - Core functionalities of the C Macro Collections libraries
<li><code>utl</code> - Utilities
<ul>
<li><code>./core.h</code> - Core functionalities of the library</li>
<li><code>./hashtable.h</code> - Common things used by hash table based collections</li>
</ul>
</li>
<li><code>./dev</code> - A mirror of the main library to be used during development</li>
<li><code>./sac</code> - Statically Allocated Collections that don't use dynamic allocation</li>
<li><code>./utl</code> - Utilities
<ul>
<li><code>./assert.h</code> - Non-abortive assert macros</li>
<li><code>./foreach.h</code> - For Each macros</li>
<li><code>./futils.h</code> - Common functions used by Functions Table</li>
<li><code>./log.h</code> - Logging utility with levels of severity</li>
<li><code>./test.h</code> - Simple Unit Test building with macros</li>
<li><code>./test.h</code> - Timing code execution utility</li>
<li><code>assert.h</code> - Non-abortive assert macros</li>
<li><code>foreach.h</code> - For Each macros</li>
<li><code>futils.h</code> - Common functions used by Functions Table</li>
<li><code>log.h</code> - Logging utility with levels of severity</li>
<li><code>test.h</code> - Simple Unit Test building with macros</li>
<li><code>test.h</code> - Timing code execution utility</li>
</ul>
</li>
<li><code>bidimap.h</code> - A bi-directional map based on a hash table</li>
<li><code>deque.h</code> - A double-ended queue</li>
<li><code>hashmap.h</code> - A map based on a hash table</li>
<li><code>hashset.h</code> - A set based on a hash table</li>
<li><code>heap.h</code> - A binary heap based on a dynamic array</li>
<li><code>intervalheap.h</code> - A heap that is both Min and Max based on a dynamic array</li>
<li><code>linkedlist.h</code> - A doubly-linked list</li>
<li><code>list.h</code> - A dynamic array</li>
<li><code>multimap.h</code> - A map that accepts multiple keys based on a hash table</li>
<li><code>multiset.h</code> - A multiset based on a hash table</li>
<li><code>queue.h</code> - A FIFO based on a circular dynamic array</li>
<li><code>sortedlist.h</code> - A sorted list based on a dynamic array</li>
<li><code>stack.h</code> - A LIFO based on a dynamic array</li>
<li><code>treemap.h</code> - A sorted map based on an AVL tree</li>
<li><code>treeset.h</code> - A sorted set based on an AVL tree</li>
</ul>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Overview/features_overview.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../cor/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -212,49 +197,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Overview/features_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Overview/features_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../cor/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../cor/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Overview - C Macro Collections</title>
<title>Overview - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html" class="active"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html" class="active"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,24 +142,20 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#overview" id="overview">Overview</a></h1>
<h1 id="overview"><a class="header" href="#overview">Overview</a></h1>
<p>In this section you will be able to quickly glance at what are the core functionalities that the C Macro Collections library can bring you.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Introduction/how_to_use_the_library.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../Overview/collections_overview.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -173,49 +163,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Introduction/how_to_use_the_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Introduction/how_to_use_the_library.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../Overview/collections_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../Overview/collections_overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+2 -3
View File
@@ -8,12 +8,10 @@ Original by Dempfi (https://github.com/dempfi/ayu)
overflow-x: auto;
background: #191f26;
color: #e6e1cf;
padding: 0.5em;
}
.hljs-comment,
.hljs-quote,
.hljs-meta {
.hljs-quote {
color: #5c6773;
font-style: italic;
}
@@ -30,6 +28,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
}
.hljs-number,
.hljs-meta,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
+156 -73
View File
@@ -4,14 +4,16 @@
window.onunload = function () { };
// Global variable, shared between modules
function playpen_text(playpen) {
let code_block = playpen.querySelector("code");
function playground_text(playground, hidden = true) {
let code_block = playground.querySelector("code");
if (window.ace && code_block.classList.contains("editable")) {
let editor = window.ace.edit(code_block);
return editor.getValue();
} else {
} else if (hidden) {
return code_block.textContent;
} else {
return code_block.innerText;
}
}
@@ -23,8 +25,8 @@ function playpen_text(playpen) {
]);
}
var playpens = Array.from(document.querySelectorAll(".playpen"));
if (playpens.length > 0) {
var playgrounds = Array.from(document.querySelectorAll(".playground"));
if (playgrounds.length > 0) {
fetch_with_timeout("https://play.rust-lang.org/meta/crates", {
headers: {
'Content-Type': "application/json",
@@ -36,21 +38,21 @@ function playpen_text(playpen) {
.then(response => {
// get list of crates available in the rust playground
let playground_crates = response.crates.map(item => item["id"]);
playpens.forEach(block => handle_crate_list_update(block, playground_crates));
playgrounds.forEach(block => handle_crate_list_update(block, playground_crates));
});
}
function handle_crate_list_update(playpen_block, playground_crates) {
function handle_crate_list_update(playground_block, playground_crates) {
// update the play buttons after receiving the response
update_play_button(playpen_block, playground_crates);
update_play_button(playground_block, playground_crates);
// and install on change listener to dynamically update ACE editors
if (window.ace) {
let code_block = playpen_block.querySelector("code");
let code_block = playground_block.querySelector("code");
if (code_block.classList.contains("editable")) {
let editor = window.ace.edit(code_block);
editor.addEventListener("change", function (e) {
update_play_button(playpen_block, playground_crates);
update_play_button(playground_block, playground_crates);
});
// add Ctrl-Enter command to execute rust code
editor.commands.addCommand({
@@ -59,7 +61,7 @@ function playpen_text(playpen) {
win: "Ctrl-Enter",
mac: "Ctrl-Enter"
},
exec: _editor => run_rust_code(playpen_block)
exec: _editor => run_rust_code(playground_block)
});
}
}
@@ -77,7 +79,7 @@ function playpen_text(playpen) {
}
// get list of `extern crate`'s from snippet
var txt = playpen_text(pre_block);
var txt = playground_text(pre_block);
var re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g;
var snippet_crates = [];
var item;
@@ -106,11 +108,14 @@ function playpen_text(playpen) {
code_block.append(result_block);
}
let text = playpen_text(code_block);
let text = playground_text(code_block);
let classes = code_block.querySelector('code').classList;
let has_2018 = classes.contains("edition2018");
let edition = has_2018 ? "2018" : "2015";
let edition = "2015";
if(classes.contains("edition2018")) {
edition = "2018";
} else if(classes.contains("edition2021")) {
edition = "2021";
}
var params = {
version: "stable",
optimize: "0",
@@ -133,7 +138,15 @@ function playpen_text(playpen) {
body: JSON.stringify(params)
})
.then(response => response.json())
.then(response => result_block.innerText = response.result)
.then(response => {
if (response.result.trim() === '') {
result_block.innerText = "No output";
result_block.classList.add("result-no-output");
} else {
result_block.innerText = response.result;
result_block.classList.remove("result-no-output");
}
})
.catch(error => result_block.innerText = "Playground Communication: " + error.message);
}
@@ -143,27 +156,28 @@ function playpen_text(playpen) {
languages: [], // Languages used for auto-detection
});
let code_nodes = Array
.from(document.querySelectorAll('code'))
// Don't highlight `inline code` blocks in headers.
.filter(function (node) {return !node.parentElement.classList.contains("header"); });
if (window.ace) {
// language-rust class needs to be removed for editable
// blocks or highlightjs will capture events
Array
.from(document.querySelectorAll('code.editable'))
code_nodes
.filter(function (node) {return node.classList.contains("editable"); })
.forEach(function (block) { block.classList.remove('language-rust'); });
Array
.from(document.querySelectorAll('code:not(.editable)'))
code_nodes
.filter(function (node) {return !node.classList.contains("editable"); })
.forEach(function (block) { hljs.highlightBlock(block); });
} else {
Array
.from(document.querySelectorAll('code'))
.forEach(function (block) { hljs.highlightBlock(block); });
code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
}
// Adding the hljs class gives code blocks the color css
// even if highlighting doesn't apply
Array
.from(document.querySelectorAll('code'))
.forEach(function (block) { block.classList.add('hljs'); });
code_nodes.forEach(function (block) { block.classList.add('hljs'); });
Array.from(document.querySelectorAll("code.language-rust")).forEach(function (block) {
@@ -174,23 +188,23 @@ function playpen_text(playpen) {
var buttons = document.createElement('div');
buttons.className = 'buttons';
buttons.innerHTML = "<button class=\"fa fa-expand\" title=\"Show hidden lines\" aria-label=\"Show hidden lines\"></button>";
buttons.innerHTML = "<button class=\"fa fa-eye\" title=\"Show hidden lines\" aria-label=\"Show hidden lines\"></button>";
// add expand button
var pre_block = block.parentNode;
pre_block.insertBefore(buttons, pre_block.firstChild);
pre_block.querySelector('.buttons').addEventListener('click', function (e) {
if (e.target.classList.contains('fa-expand')) {
e.target.classList.remove('fa-expand');
e.target.classList.add('fa-compress');
if (e.target.classList.contains('fa-eye')) {
e.target.classList.remove('fa-eye');
e.target.classList.add('fa-eye-slash');
e.target.title = 'Hide lines';
e.target.setAttribute('aria-label', e.target.title);
block.classList.remove('hide-boring');
} else if (e.target.classList.contains('fa-compress')) {
e.target.classList.remove('fa-compress');
e.target.classList.add('fa-expand');
} else if (e.target.classList.contains('fa-eye-slash')) {
e.target.classList.remove('fa-eye-slash');
e.target.classList.add('fa-eye');
e.target.title = 'Show hidden lines';
e.target.setAttribute('aria-label', e.target.title);
@@ -199,10 +213,10 @@ function playpen_text(playpen) {
});
});
if (window.playpen_copyable) {
if (window.playground_copyable) {
Array.from(document.querySelectorAll('pre code')).forEach(function (block) {
var pre_block = block.parentNode;
if (!pre_block.classList.contains('playpen')) {
if (!pre_block.classList.contains('playground')) {
var buttons = pre_block.querySelector(".buttons");
if (!buttons) {
buttons = document.createElement('div');
@@ -221,8 +235,8 @@ function playpen_text(playpen) {
});
}
// Process playpen code blocks
Array.from(document.querySelectorAll(".playpen")).forEach(function (pre_block) {
// Process playground code blocks
Array.from(document.querySelectorAll(".playground")).forEach(function (pre_block) {
// Add play button
var buttons = pre_block.querySelector(".buttons");
if (!buttons) {
@@ -242,7 +256,7 @@ function playpen_text(playpen) {
run_rust_code(pre_block);
});
if (window.playpen_copyable) {
if (window.playground_copyable) {
var copyCodeClipboardButton = document.createElement('button');
copyCodeClipboardButton.className = 'fa fa-copy clip-button';
copyCodeClipboardButton.innerHTML = '<i class="tooltiptext"></i>';
@@ -284,7 +298,14 @@ function playpen_text(playpen) {
function showThemes() {
themePopup.style.display = 'block';
themeToggleButton.setAttribute('aria-expanded', true);
themePopup.querySelector("button#" + document.body.className).focus();
themePopup.querySelector("button#" + get_theme()).focus();
}
function updateThemeSelected() {
themePopup.querySelectorAll('.theme-selected').forEach(function (el) {
el.classList.remove('theme-selected');
});
themePopup.querySelector("button#" + get_theme()).classList.add('theme-selected');
}
function hideThemes() {
@@ -293,6 +314,16 @@ function playpen_text(playpen) {
themeToggleButton.focus();
}
function get_theme() {
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { }
if (theme === null || theme === undefined) {
return default_theme;
} else {
return theme;
}
}
function set_theme(theme, store = true) {
let ace_theme;
@@ -324,9 +355,7 @@ function playpen_text(playpen) {
});
}
var previousTheme;
try { previousTheme = localStorage.getItem('mdbook-theme'); } catch (e) { }
if (previousTheme === null || previousTheme === undefined) { previousTheme = default_theme; }
var previousTheme = get_theme();
if (store) {
try { localStorage.setItem('mdbook-theme', theme); } catch (e) { }
@@ -334,12 +363,11 @@ function playpen_text(playpen) {
html.classList.remove(previousTheme);
html.classList.add(theme);
updateThemeSelected();
}
// Set theme
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var theme = get_theme();
set_theme(theme, false);
@@ -352,7 +380,14 @@ function playpen_text(playpen) {
});
themePopup.addEventListener('click', function (e) {
var theme = e.target.id || e.target.parentElement.id;
var theme;
if (e.target.className === "theme") {
theme = e.target.id;
} else if (e.target.parentElement.className === "theme") {
theme = e.target.parentElement.id;
} else {
return;
}
set_theme(theme);
});
@@ -408,7 +443,6 @@ function playpen_text(playpen) {
(function sidebar() {
var html = document.querySelector("html");
var sidebar = document.getElementById("sidebar");
var sidebarScrollBox = document.getElementById("sidebar-scrollbox");
var sidebarLinks = document.querySelectorAll('#sidebar a');
var sidebarToggleButton = document.getElementById("sidebar-toggle");
var sidebarResizeHandle = document.getElementById("sidebar-resize-handle");
@@ -450,6 +484,11 @@ function playpen_text(playpen) {
// Toggle sidebar
sidebarToggleButton.addEventListener('click', function sidebarToggle() {
if (html.classList.contains("sidebar-hidden")) {
var current_width = parseInt(
document.documentElement.style.getPropertyValue('--sidebar-width'), 10);
if (current_width < 150) {
document.documentElement.style.setProperty('--sidebar-width', '150px');
}
showSidebar();
} else if (html.classList.contains("sidebar-visible")) {
hideSidebar();
@@ -470,7 +509,16 @@ function playpen_text(playpen) {
html.classList.add('sidebar-resizing');
}
function resize(e) {
document.documentElement.style.setProperty('--sidebar-width', (e.clientX - sidebar.offsetLeft) + 'px');
var pos = (e.clientX - sidebar.offsetLeft);
if (pos < 20) {
hideSidebar();
} else {
if (html.classList.contains("sidebar-hidden")) {
showSidebar();
}
pos = Math.min(pos, window.innerWidth - 100);
document.documentElement.style.setProperty('--sidebar-width', pos + 'px');
}
}
//on mouseup remove windows functions mousemove & mouseup
function stopResize(e) {
@@ -505,9 +553,10 @@ function playpen_text(playpen) {
}, { passive: true });
// Scroll sidebar to current active section
var activeSection = sidebar.querySelector(".active");
var activeSection = document.getElementById("sidebar").querySelector(".active");
if (activeSection) {
sidebarScrollBox.scrollTop = activeSection.offsetTop;
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
activeSection.scrollIntoView({ block: 'center' });
}
})();
@@ -551,8 +600,8 @@ function playpen_text(playpen) {
var clipboardSnippets = new ClipboardJS('.clip-button', {
text: function (trigger) {
hideTooltip(trigger);
let playpen = trigger.closest("pre");
return playpen_text(playpen);
let playground = trigger.closest("pre");
return playground_text(playground, false);
}
});
@@ -580,26 +629,60 @@ function playpen_text(playpen) {
});
})();
(function autoHideMenu() {
(function controllMenu() {
var menu = document.getElementById('menu-bar');
var previousScrollTop = document.scrollingElement.scrollTop;
document.addEventListener('scroll', function () {
if (menu.classList.contains('folded') && document.scrollingElement.scrollTop < previousScrollTop) {
menu.classList.remove('folded');
} else if (!menu.classList.contains('folded') && document.scrollingElement.scrollTop > previousScrollTop) {
menu.classList.add('folded');
}
if (!menu.classList.contains('bordered') && document.scrollingElement.scrollTop > 0) {
menu.classList.add('bordered');
}
if (menu.classList.contains('bordered') && document.scrollingElement.scrollTop === 0) {
menu.classList.remove('bordered');
}
previousScrollTop = Math.max(document.scrollingElement.scrollTop, 0);
}, { passive: true });
(function controllPosition() {
var scrollTop = document.scrollingElement.scrollTop;
var prevScrollTop = scrollTop;
var minMenuY = -menu.clientHeight - 50;
// When the script loads, the page can be at any scroll (e.g. if you reforesh it).
menu.style.top = scrollTop + 'px';
// Same as parseInt(menu.style.top.slice(0, -2), but faster
var topCache = menu.style.top.slice(0, -2);
menu.classList.remove('sticky');
var stickyCache = false; // Same as menu.classList.contains('sticky'), but faster
document.addEventListener('scroll', function () {
scrollTop = Math.max(document.scrollingElement.scrollTop, 0);
// `null` means that it doesn't need to be updated
var nextSticky = null;
var nextTop = null;
var scrollDown = scrollTop > prevScrollTop;
var menuPosAbsoluteY = topCache - scrollTop;
if (scrollDown) {
nextSticky = false;
if (menuPosAbsoluteY > 0) {
nextTop = prevScrollTop;
}
} else {
if (menuPosAbsoluteY > 0) {
nextSticky = true;
} else if (menuPosAbsoluteY < minMenuY) {
nextTop = prevScrollTop + minMenuY;
}
}
if (nextSticky === true && stickyCache === false) {
menu.classList.add('sticky');
stickyCache = true;
} else if (nextSticky === false && stickyCache === true) {
menu.classList.remove('sticky');
stickyCache = false;
}
if (nextTop !== null) {
menu.style.top = nextTop + 'px';
topCache = nextTop;
}
prevScrollTop = scrollTop;
}, { passive: true });
})();
(function controllBorder() {
menu.classList.remove('bordered');
document.addEventListener('scroll', function () {
if (menu.offsetTop === 0) {
menu.classList.remove('bordered');
} else {
menu.classList.add('bordered');
}
}, { passive: true });
})();
})();
+74 -93
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>bitset.h - C Macro Collections</title>
<title>bitset.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html" class="active"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html" class="active"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,47 +142,51 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#bitseth" id="bitseth">bitset.h</a></h1>
<h1 id="bitseth"><a class="header" href="#bitseth">bitset.h</a></h1>
<p>A Bit Set is an array where each bit can be individually modified and queried by using bitwise operators such as <code>|</code>, <code>&amp;</code>, <code>^</code>, <code>~</code>, <code>&gt;&gt;</code> and <code>&lt;&lt;</code> (<code>or</code>, <code>and</code>, <code>xor</code>, <code>not</code>, <code>right shift</code>, <code>left shift</code> respectively).</p>
<h2><a class="header" href="#bitset-implementation" id="bitset-implementation">BitSet Implementation</a></h2>
<h2 id="bitset-implementation"><a class="header" href="#bitset-implementation">BitSet Implementation</a></h2>
<p>This BitSet implementation uses an array of type <code>cmc_bitset_word</code> which can be <code>typedef</code>ed to any unsigned type such as <code>uint8_t</code>, <code>uint16_t</code>, <code>uint32_t</code>, <code>uint64_t</code>, <code>size_t</code>, etc. The BitSet does not make use of <code>K</code> or <code>V</code>. Because of that, it also doesn't have Functions Tables.</p>
<p>The BitSet is initialized with a custom capacity but, if a bit index accessed is greater than the total capacity, the BitSet will resize. This means that the BitSet will try to guarantee that every bit index is accessible, as long as there is enough memory.</p>
<h2><a class="header" href="#bitset-generation-macros" id="bitset-generation-macros">BitSet Generation Macros</a></h2>
<h2 id="bitset-generation-macros"><a class="header" href="#bitset-generation-macros">BitSet Generation Macros</a></h2>
<ul>
<li><code>CMC_GENERATE_BITSET(PFX, SNAME)</code> - Generate full definition.</li>
<li><code>CMC_GENERATE_BITSET_HEADER(PFX, SNAME)</code> - Generate only the header portion</li>
<li><code>CMC_GENERATE_BITSET_SOURCE(PFX, SNAME)</code> - Generate only the source portion</li>
</ul>
<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody>
<tr><td><code>PFX</code></td><td>Functions namespace or prefix</td></tr>
<tr><td><code>SNAME</code></td><td>Structure name</td></tr>
</tbody></table>
<h2><a class="header" href="#bitset-structures" id="bitset-structures">BitSet Structures</a></h2>
<table><thead><tr><th>Declared structs</th><th>Description</th></tr></thead><tbody>
</div>
<h2 id="bitset-structures"><a class="header" href="#bitset-structures">BitSet Structures</a></h2>
<div class="table-wrapper"><table><thead><tr><th>Declared structs</th><th>Description</th></tr></thead><tbody>
<tr><td><code>struct SNAME</code></td><td>A bit set data structure</td></tr>
<tr><td><code>struct SNAME##_iter</code></td><td>A bit set iterator</td></tr>
</tbody></table>
<h2><a class="header" href="#struct-sname" id="struct-sname">struct SNAME</a></h2>
<table><thead><tr><th><code>struct SNAME</code></th><th>Description</th></tr></thead><tbody>
</div>
<h2 id="struct-sname"><a class="header" href="#struct-sname">struct SNAME</a></h2>
<div class="table-wrapper"><table><thead><tr><th><code>struct SNAME</code></th><th>Description</th></tr></thead><tbody>
<tr><td><code>cmc_bitset_word *buffer</code></td><td>Dynamic array of bits.</td></tr>
<tr><td><code>size_t capacity</code></td><td>Current array capacity .</td></tr>
<tr><td><code>int flag</code></td><td>Flag indicating errors or success.</td></tr>
<tr><td><code>struct cmc_alloc_node *alloc</code></td><td>Custom allocation functions.</td></tr>
<tr><td><code>struct cmc_callbacks *callbacks</code></td><td>Callback functions.</td></tr>
</tbody></table>
<h2><a class="header" href="#struct-sname_iter" id="struct-sname_iter">struct SNAME##_iter</a></h2>
<table><thead><tr><th><code>struct SNAME##_iter</code></th><th>Description</th></tr></thead><tbody>
</div>
<h2 id="struct-sname_iter"><a class="header" href="#struct-sname_iter">struct SNAME##_iter</a></h2>
<div class="table-wrapper"><table><thead><tr><th><code>struct SNAME##_iter</code></th><th>Description</th></tr></thead><tbody>
<tr><td><code>struct SNAME *target</code></td><td>BitSet being iterated over.</td></tr>
<tr><td><code>size_t cursor</code></td><td>Cursor's current position (index).</td></tr>
<tr><td><code>bool start</code></td><td>If the iterator reached the start of the iteration.</td></tr>
<tr><td><code>bool end</code></td><td>If the iterator reached the end of iteration.</td></tr>
</tbody></table>
<h2><a class="header" href="#cmc_bitset_word" id="cmc_bitset_word">cmc_bitset_word</a></h2>
</div>
<h2 id="cmc_bitset_word"><a class="header" href="#cmc_bitset_word">cmc_bitset_word</a></h2>
<p>The <code>typedef</code>ed data type o the underlying bit set buffer.</p>
<pre><code class="language-c">typedef uint32_t cmc_bitset_word;
</code></pre>
<p>This <code>typedef</code> can be changed to any unsigned integer data type and the bit set will still work properly.</p>
<h2><a class="header" href="#callbacks" id="callbacks">Callbacks</a></h2>
<h2 id="callbacks"><a class="header" href="#callbacks">Callbacks</a></h2>
<p>This list associates which functions calls which callbacks.</p>
<ul>
<li><code>create</code>
@@ -211,26 +209,22 @@
</ul>
</li>
</ul>
<h2><a class="header" href="#functions-table" id="functions-table">Functions Table</a></h2>
<table><thead><tr><th align="center">CMP</th><th align="center">CPY</th><th align="center">STR</th><th align="center">FREE</th><th align="center">HASH</th><th align="center">PRI</th></tr></thead><tbody>
<tr><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<h2 id="functions-table"><a class="header" href="#functions-table">Functions Table</a></h2>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">CMP</th><th style="text-align: center">CPY</th><th style="text-align: center">STR</th><th style="text-align: center">FREE</th><th style="text-align: center">HASH</th><th style="text-align: center">PRI</th></tr></thead><tbody>
<tr><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cmc/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cmc/deque.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -238,49 +232,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cmc/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cmc/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cmc/deque.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cmc/deque.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+65 -85
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Functions.h - C Macro Collections</title>
<title>Functions.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html" class="active"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html" class="active"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#index" id="index">Index</a></h1>
<h1 id="index"><a class="header" href="#index">Index</a></h1>
<p><strong>Deque</strong></p>
<ul>
<li><a href="#_new"><code>_new()</code></a></li>
@@ -175,53 +169,52 @@
</ul>
<p><strong>Deque Iterator</strong></p>
<p>WIP.</p>
<h2><a class="header" href="#a-hrefindexspan-id_new-_new-spana" id="a-hrefindexspan-id_new-_new-spana"><a href="#index"><span id="_new"> _new() </span></a></a></h2>
<h2 id="_new"><a class="header" href="#_new"><a href="#index"><span id="_new"> _new() </span></a></a></h2>
<p>Allocates on the heap and returns a new Deque with an internal capacity of the specified value. The Deque will be empty, using the default allocator <code>cmc_alloc_node_default</code> and no callbacks will be set, that is, <code>callbacks</code> will be set to <code>NULL</code>. Its <code>flag</code> will be initially <code>cmc_flags.OK</code>.</p>
<p><strong>Declaration</strong></p>
<p><code>struct SNAME *PFX##_new(size_t capacity, struct SNAME##_fval *f_val);</code></p>
<p><strong>Parameters</strong></p>
<table><thead><tr><th>Parameter</th><th>Required</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Parameter</th><th>Required</th><th>Description</th></tr></thead><tbody>
<tr><td><code>size_t capacity</code></td><td>Yes</td><td>The initial Deque capacity</td></tr>
<tr><td><code>struct SNAME##_fval *f_val</code></td><td>Yes</td><td>A Functions Table for <code>V</code></td></tr>
</tbody></table>
</div>
<p><strong>Returns</strong></p>
<table><thead><tr><th>Returns</th><th>When</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Returns</th><th>When</th></tr></thead><tbody>
<tr><td><code>struct SNAME *</code></td><td>If operation was successful</td></tr>
<tr><td><code>NULL</code></td><td>If allocation failed, if capacity is <code>0</code> or if <code>f_val</code> is <code>NULL</code></td></tr>
</tbody></table>
<h2><a class="header" href="#a-hrefindexspan-id_new_custom-_new_custom-spana" id="a-hrefindexspan-id_new_custom-_new_custom-spana"><a href="#index"><span id="_new_custom"> _new_custom() </span></a></a></h2>
</div>
<h2 id="_new_custom"><a class="header" href="#_new_custom"><a href="#index"><span id="_new_custom"> _new_custom() </span></a></a></h2>
<p>Like <a href="#_new">_new()</a> but allows for custom allocation node and callbacks. The allocation node is optional. If present, the function will immediately use it to allocate the new Deque. If <code>NULL</code>, <code>cmc_alloc_node_default</code> will instead be used.</p>
<p><strong>Declaration</strong></p>
<pre><code>struct SNAME *PFX##_new_custom(size_t capacity, struct SNAME##_fval *f_val, struct cmc_alloc_node *alloc, struct cmc_callbacks *callbacks);
</code></pre>
<p><strong>Parameters</strong></p>
<table><thead><tr><th>Parameter</th><th>Required</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Parameter</th><th>Required</th><th>Description</th></tr></thead><tbody>
<tr><td><code>size_t capacity</code></td><td>Yes</td><td>The initial Deque capacity</td></tr>
<tr><td><code>struct SNAME##_fval *f_val</code></td><td>Yes</td><td>A Functions Table for <code>V</code></td></tr>
<tr><td><code>struct cmc_alloc_node *alloc</code></td><td>No</td><td>A custom allocation node</td></tr>
<tr><td><code>struct cmc_callbacks *callbacks</code></td><td>No</td><td>A custom callbacks struct</td></tr>
</tbody></table>
</div>
<p><strong>Returns</strong></p>
<table><thead><tr><th>Returns</th><th>When</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Returns</th><th>When</th></tr></thead><tbody>
<tr><td><code>struct SNAME *</code></td><td>If operation was successful</td></tr>
<tr><td><code>NULL</code></td><td>If allocation failed, if capacity is <code>0</code> or if <code>f_val</code> is <code>NULL</code></td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cmc/deque.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../dev/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -229,49 +222,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cmc/deque.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cmc/deque.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../dev/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../dev/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+74 -93
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>deque.h - C Macro Collections</title>
<title>deque.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html" class="active"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html" class="active"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,30 +142,32 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#dequeh" id="dequeh">deque.h</a></h1>
<h1 id="dequeh"><a class="header" href="#dequeh">deque.h</a></h1>
<p>A Deque, also known as a double-ended queue, is a linear data structure that is able to add and remove elements from both ends. It can also be thought of a double-ended stack since you can push and pop elements from two ends. The Deque can also be used as a Queue. The only elements accessible from a Deque ar the two elements at its ends (front element and back element).</p>
<h2><a class="header" href="#deque-implementation" id="deque-implementation">Deque Implementation</a></h2>
<h2 id="deque-implementation"><a class="header" href="#deque-implementation">Deque Implementation</a></h2>
<p>This implementation uses a circular buffer (ring buffer or cyclic buffer) in order to operate on O(1) for push and pop on either ends. The only case where it takes longer than O(1) is when the buffer is reallocated. If it was implemented as a regular array, adding or removing elements from the front would take O(N) due to the need to shift all elements in the Deque.</p>
<p>Two indices are kept track of. The <code>front</code> index and the <code>rear</code> index. These represent the both ends of the Deque. If an index reaches one end of the real buffer, they wrap around to the other end and an element is added there. This abstracts the real buffer as a circular buffer with the cost os constantly checking for boundaries and using the modulo operator.</p>
<h2><a class="header" href="#deque-generation-macros" id="deque-generation-macros">Deque Generation Macros</a></h2>
<h2 id="deque-generation-macros"><a class="header" href="#deque-generation-macros">Deque Generation Macros</a></h2>
<ul>
<li><code>CMC_GENERATE_DEQUE(PFX, SNAME, V)</code> - Generate full definition.</li>
<li><code>CMC_GENERATE_DEQUE_HEADER(PFX, SNAME, V)</code> - Generate only the header portion</li>
<li><code>CMC_GENERATE_DEQUE_SOURCE(PFX, SNAME, V)</code> - Generate only the source portion</li>
</ul>
<table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody>
<tr><td><code>PFX</code></td><td>Functions namespace or prefix</td></tr>
<tr><td><code>SNAME</code></td><td>Structure name</td></tr>
<tr><td><code>V</code></td><td>Value type</td></tr>
</tbody></table>
<h2><a class="header" href="#deque-structures" id="deque-structures">Deque Structures</a></h2>
<table><thead><tr><th>Declared structs</th><th>Description</th></tr></thead><tbody>
</div>
<h2 id="deque-structures"><a class="header" href="#deque-structures">Deque Structures</a></h2>
<div class="table-wrapper"><table><thead><tr><th>Declared structs</th><th>Description</th></tr></thead><tbody>
<tr><td><code>struct SNAME</code></td><td>A double-ended queue data structure</td></tr>
<tr><td><code>struct SNAME##_fval</code></td><td>A function table for the <code>V</code> type</td></tr>
<tr><td><code>struct SNAME##_iter</code></td><td>A double-ended queue iterator</td></tr>
</tbody></table>
<h2><a class="header" href="#struct-sname" id="struct-sname">struct SNAME</a></h2>
<table><thead><tr><th><code>struct SNAME</code></th><th>Description</th></tr></thead><tbody>
</div>
<h2 id="struct-sname"><a class="header" href="#struct-sname">struct SNAME</a></h2>
<div class="table-wrapper"><table><thead><tr><th><code>struct SNAME</code></th><th>Description</th></tr></thead><tbody>
<tr><td><code>V *buffer</code></td><td>Dynamic circular array of elements.</td></tr>
<tr><td><code>size_t capacity</code></td><td>Current circular array capacity.</td></tr>
<tr><td><code>size_t count</code></td><td>Current amount of elements.</td></tr>
@@ -182,17 +178,19 @@
<tr><td><code>struct cmc_alloc_node *alloc</code></td><td>Custom allocation functions.</td></tr>
<tr><td><code>struct cmc_callbacks *callbacks</code></td><td>Callback functions.</td></tr>
</tbody></table>
<h2><a class="header" href="#struct-sname_fval" id="struct-sname_fval">struct SNAME##_fval</a></h2>
</div>
<h2 id="struct-sname_fval"><a class="header" href="#struct-sname_fval">struct SNAME##_fval</a></h2>
<p>The Functions Table for <code>V</code>. Check out the Functions Table documentation <a href="../../cor/functions_table/index.html">here</a>.</p>
<h2><a class="header" href="#struct-sname_iter" id="struct-sname_iter">struct SNAME##_iter</a></h2>
<table><thead><tr><th><code>struct SNAME##_iter</code></th><th>Description</th></tr></thead><tbody>
<h2 id="struct-sname_iter"><a class="header" href="#struct-sname_iter">struct SNAME##_iter</a></h2>
<div class="table-wrapper"><table><thead><tr><th><code>struct SNAME##_iter</code></th><th>Description</th></tr></thead><tbody>
<tr><td><code>struct SNAME *target</code></td><td>Deque being iterated over.</td></tr>
<tr><td><code>size_t cursor</code></td><td>Cursor's current position (index).</td></tr>
<tr><td><code>size_t index</code></td><td>Relative index to all elements in the iteration.</td></tr>
<tr><td><code>bool start</code></td><td>If the iterator reached the start of the iteration.</td></tr>
<tr><td><code>bool end</code></td><td>If the iterator reached the end of iteration.</td></tr>
</tbody></table>
<h2><a class="header" href="#callbacks" id="callbacks">Callbacks</a></h2>
</div>
<h2 id="callbacks"><a class="header" href="#callbacks">Callbacks</a></h2>
<p>This list associates which functions calls which callbacks.</p>
<ul>
<li><code>create</code>
@@ -221,26 +219,22 @@
</ul>
</li>
</ul>
<h2><a class="header" href="#functions-table" id="functions-table">Functions Table</a></h2>
<table><thead><tr><th align="center">CMP</th><th align="center">CPY</th><th align="center">STR</th><th align="center">FREE</th><th align="center">HASH</th><th align="center">PRI</th></tr></thead><tbody>
<tr><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<h2 id="functions-table"><a class="header" href="#functions-table">Functions Table</a></h2>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">CMP</th><th style="text-align: center">CPY</th><th style="text-align: center">STR</th><th style="text-align: center">FREE</th><th style="text-align: center">HASH</th><th style="text-align: center">PRI</th></tr></thead><tbody>
<tr><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cmc/bitset.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cmc/deque.h/functions.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -248,49 +242,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cmc/bitset.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cmc/bitset.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cmc/deque.h/functions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cmc/deque.h/functions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+56 -79
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>cmc - C Macro Collections</title>
<title>cmc - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html" class="active"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html" class="active"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,11 +142,11 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#cmc" id="cmc">CMC</a></h1>
<h1 id="cmc"><a class="header" href="#cmc">CMC</a></h1>
<p>The main C Macro Collections.</p>
<p>The C Macro Collections library was created out of necessity. To create powerful data structures of any type without the constant use of macros and <code>void *</code> pointers, but at the same time being <a href="https://en.wikipedia.org/wiki/Type_safety">type-safe</a>. These collections are generated by macros containing a template. These templates allow for some much needed customizations including the data type you wish to handle.</p>
<p>In the <code>cmc</code> folder is the default implementation of all collections. There is also a <code>dev</code> folder that pretty much has the same macros that expand to the same code, except that they have an extensive use of logging that might be useful for debugging or getting to know what is happening in your program. There is also the <code>sac</code> collections that are statically allocated (have a fixed sized buffer).</p>
<h2><a class="header" href="#quick-example" id="quick-example">Quick Example</a></h2>
<h2 id="quick-example"><a class="header" href="#quick-example">Quick Example</a></h2>
<p>Let's say you need a HashMap mapping keys of type <code>char *</code> to <code>int</code>. All you need to do is:</p>
<pre><code class="language-c">#include &quot;cmc/hashmap&quot;
@@ -172,17 +166,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../cor/iterators/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../cmc/bitset.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -190,49 +180,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../cor/iterators/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../cor/iterators/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../cmc/bitset.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../cmc/bitset.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+59 -81
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Callbacks - C Macro Collections</title>
<title>Callbacks - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html" class="active"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html" class="active"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,17 +142,18 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#callbacks" id="callbacks">Callbacks</a></h1>
<h1 id="callbacks"><a class="header" href="#callbacks">Callbacks</a></h1>
<p>Every collection can have an optional callback node. In this node there are five functions:</p>
<table><thead><tr><th>Callback</th><th>Description</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Callback</th><th>Description</th></tr></thead><tbody>
<tr><td><code>create</code></td><td>Is called when an element was successfully added to the collection</td></tr>
<tr><td><code>read</code></td><td>Is called when the collection was successfully queried about an element</td></tr>
<tr><td><code>update</code></td><td>Is called when an element in the collection was successfully updated</td></tr>
<tr><td><code>delete</code></td><td>Is called when an element was successfully removed from the collection</td></tr>
<tr><td><code>resize</code></td><td>Is called when the collection was full and successfully resized</td></tr>
</tbody></table>
</div>
<p>Check the documentation for each collection to see which functions call which callbacks.</p>
<h2><a class="header" href="#cmc_callbacks" id="cmc_callbacks">cmc_callbacks</a></h2>
<h2 id="cmc_callbacks"><a class="header" href="#cmc_callbacks">cmc_callbacks</a></h2>
<p>Every collection has a pointer to this <code>struct</code>. If it is <code>NULL</code> then the collection has no callbacks. Also, individual callbacks can be optional if set to <code>NULL</code>.</p>
<pre><code class="language-c">struct cmc_callbacks
{
@@ -169,7 +164,7 @@
void (*resize)(void);
};
</code></pre>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &quot;cmc/heap.h&quot;
#include &quot;utl/futils.h&quot; // cmc_i32_cmp
@@ -203,17 +198,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cor/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cor/custom_allocation/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -221,49 +212,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cor/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cor/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cor/custom_allocation/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cor/custom_allocation/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+58 -81
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Custom allocation - C Macro Collections</title>
<title>Custom allocation - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html" class="active"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html" class="active"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,9 +142,9 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#custom-allocation" id="custom-allocation">Custom Allocation</a></h1>
<h1 id="custom-allocation"><a class="header" href="#custom-allocation">Custom Allocation</a></h1>
<p>All collections have an allocation node. This node can be modified so that every allocation and de-allocation can be done with custom functions. Every custom allocation function must follow the same prototype of the <code>stdlib.h</code> functions.</p>
<h2><a class="header" href="#cmc_alloc_node" id="cmc_alloc_node">cmc_alloc_node</a></h2>
<h2 id="cmc_alloc_node"><a class="header" href="#cmc_alloc_node">cmc_alloc_node</a></h2>
<pre><code class="language-c">struct cmc_alloc_node
{
void *(*malloc)(size_t);
@@ -159,12 +153,12 @@
void (*free)(void *);
};
</code></pre>
<h2><a class="header" href="#cmc_alloc_node_default" id="cmc_alloc_node_default">cmc_alloc_node_default</a></h2>
<h2 id="cmc_alloc_node_default"><a class="header" href="#cmc_alloc_node_default">cmc_alloc_node_default</a></h2>
<p>The default allocation node. If a collections is not initialized with a custom allocation node, this will be the default one using the functions from the C standard library.</p>
<pre><code class="language-c">static struct cmc_alloc_node cmc_alloc_node_default = { malloc, calloc,
realloc, free };
</code></pre>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &quot;cmc/heap.h&quot;
#include &quot;utl/futils.h&quot; // cmc_i32_cmp
@@ -233,17 +227,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cor/callbacks/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cor/error_codes/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -251,49 +241,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cor/callbacks/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cor/callbacks/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cor/error_codes/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cor/error_codes/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+58 -81
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Error Codes - C Macro Collections</title>
<title>Error Codes - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html" class="active"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html" class="active"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,12 +142,12 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#error-codes" id="error-codes">Error Codes</a></h1>
<h1 id="error-codes"><a class="header" href="#error-codes">Error Codes</a></h1>
<p>Error codes are ways to signal errors or success. It is accessed through the <code>flag</code> component of a <code>struct</code> or through a function that is present in every collection:</p>
<pre><code class="language-c">int PFX##_flag(struct SNAME *_collection_);
</code></pre>
<p>Some functions have a return type of <code>bool</code> indicating if it exited successfully or not. These error codes can be used for further error handling.</p>
<h2><a class="header" href="#cmc_flags" id="cmc_flags">cmc_flags</a></h2>
<h2 id="cmc_flags"><a class="header" href="#cmc_flags">cmc_flags</a></h2>
<p>It is a global <code>struct</code> with default values for error codes.</p>
<pre><code class="language-c">static struct
{
@@ -177,13 +171,13 @@
<li><code>DUPLICATE</code> - Duplicate key or value.</li>
<li><code>ERROR</code> - Generic error. Usually caused by algorithm errors.</li>
</ul>
<h2><a class="header" href="#cmc_flags_to_str" id="cmc_flags_to_str">cmc_flags_to_str</a></h2>
<h2 id="cmc_flags_to_str"><a class="header" href="#cmc_flags_to_str">cmc_flags_to_str</a></h2>
<p>Maps the integer representation of error codes to their character representation.</p>
<pre><code class="language-c">const char *cmc_flags_to_str[8] = { &quot;OK&quot;, &quot;ALLOC&quot;, &quot;EMPTY&quot;,
&quot;NOT_FOUND&quot;, &quot;INVALID&quot;, &quot;RANGE&quot;,
&quot;DUPLICATE&quot;, &quot;ERROR&quot; };
</code></pre>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &quot;cmc/treeset.h&quot;
#include &quot;utl/futils.h&quot; // cmc_i32_cmp
@@ -215,17 +209,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cor/custom_allocation/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cor/functions_table/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -233,49 +223,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cor/custom_allocation/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cor/custom_allocation/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cor/functions_table/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cor/functions_table/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+85 -108
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Functions Table - C Macro Collections</title>
<title>Functions Table - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html" class="active"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html" class="active"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#functions-table" id="functions-table">Functions Table</a></h1>
<h1 id="functions-table"><a class="header" href="#functions-table">Functions Table</a></h1>
<p>Functions Table is a <code>struct</code> with function pointers that are used to extract behavior from a custom data type. This exists because an <code>int</code> or a <code>char *</code> or <code>struct my_data_type</code> don't have default hash functions or ways to compare between them. This could be achieved with <a href="https://en.wikipedia.org/wiki/Operator_overloading">operator overloading</a> but C doesn't have that. Hence, Functions Table was created to provide a single access point to extract these behaviors for <strong>any</strong> data type.</p>
<p>Some functions are optional and others are needed in order for a collection to operate. Say you want a HashMap. There are two required functions: <code>hash</code> and <code>cmp</code> (comparator). Without them it is impossible to know how to hash your custom that type (it could be anything). This means you can also customize the collection by using different hash functions.</p>
<p>Many required functions are simply mundane. Like a comparator function between integers or between floats. The header <a href="../../utl/futils.h/index.html"><code>utl/futils.h</code></a> defines many of these functions for basic C data types.</p>
@@ -181,7 +175,7 @@ struct SNAME##_fkey \
}; \
\
</code></pre>
<h3><a class="header" href="#cmp" id="cmp">CMP</a></h3>
<h3 id="cmp"><a class="header" href="#cmp">CMP</a></h3>
<ul>
<li><code>K</code> - <code>int (*cmp)(K, K)</code></li>
<li><code>V</code> - <code>int (*cmp)(V, V)</code></li>
@@ -193,33 +187,33 @@ struct SNAME##_fkey \
<li>Return <code>-1</code> if the first argument is less than the second.</li>
</ul>
<p>Note that certain collections require a total ordering of its elements (sorted collections) while others only require to know if one data equals another. Check out the documentation for each collection to know more.</p>
<h3><a class="header" href="#cpy" id="cpy">CPY</a></h3>
<h3 id="cpy"><a class="header" href="#cpy">CPY</a></h3>
<ul>
<li><code>K</code> - <code>K (*cpy)(K)</code></li>
<li><code>V</code> - <code>V (*cpy)(V)</code></li>
</ul>
<p>A copy function is used when a collection is being copied. It can be used to make a deep copy of of your custom data type. It must take a single parameter and return a new copy of that same data type. If this function is absent (<code>NULL</code>) the data type will be copied by assignment (for pointers this is a shallow copy).</p>
<p>Note that it doesn't makes sense to define a <code>cpy</code> function for data types that are not pointers. This function is useful for deep copies of a pointer in case you don't want two collections holding the same reference to the data.</p>
<h3><a class="header" href="#str" id="str">STR</a></h3>
<h3 id="str"><a class="header" href="#str">STR</a></h3>
<ul>
<li><code>K</code> - <code>bool (*str)(FILE *, K)</code></li>
<li><code>V</code> - <code>bool (*str)(FILE *, V)</code></li>
</ul>
<p>A string function is responsible for taking a <code>FILE</code> pointer and a custom data type and outputting the string representation of that data returning a <code>bool</code> indication success or failure. It is useful for debugging and doesn't necessarily needs to print all the data that the specific type holds.</p>
<h3><a class="header" href="#free" id="free">FREE</a></h3>
<h3 id="free"><a class="header" href="#free">FREE</a></h3>
<ul>
<li><code>K</code> - <code>void (*free)(K)</code></li>
<li><code>V</code> - <code>void (*free)(V)</code></li>
</ul>
<p>The free function is called when a collection is cleared (all elements removed) or freed (all elements removed and the collection is freed from memory) and it is responsible for completely freeing all resources that are usually acquired by your data type.</p>
<p>This function only makes sense to be used when the data type has dynamically allocated memory. It is the only completely optional function.</p>
<h3><a class="header" href="#hash" id="hash">HASH</a></h3>
<h3 id="hash"><a class="header" href="#hash">HASH</a></h3>
<ul>
<li><code>K</code> - <code>size_t (*hash)(K)</code></li>
<li><code>V</code> - <code>size_t (*hash)(V)</code></li>
</ul>
<p>This function receives a custom data type as parameter and returns a <code>size_t</code> <a href="https://en.wikipedia.org/wiki/Hash_function">hash</a> that represents that data. Used by collections with an underlying hash tables.</p>
<h3><a class="header" href="#pri" id="pri">PRI</a></h3>
<h3 id="pri"><a class="header" href="#pri">PRI</a></h3>
<ul>
<li><code>K</code> - <code>int (*cmp)(K, K)</code></li>
<li><code>V</code> - <code>int (*cmp)(V, V)</code></li>
@@ -232,47 +226,43 @@ struct SNAME##_fkey \
</ul>
<p>Why use both <code>cmp</code> and <code>pri</code>? Heaps have their internal structure based in the priority of elements. This priority is not necessarily how each element is compared to each other. Maybe their equality is defined differently for an equality of priorities. Maybe the rules for their priorities is different for when comparing an element against another.</p>
<p>The following table shows which functions are required, optional or never used for each Collection:</p>
<table><thead><tr><th>Collection</th><th align="center">CMP</th><th align="center">CPY</th><th align="center">STR</th><th align="center">FREE</th><th align="center">HASH</th><th align="center">PRI</th></tr></thead><tbody>
<tr><td>BidiMap</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Deque</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>HashMap</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>HashSet</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Heap</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td></tr>
<tr><td>IntervalHeap</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td></tr>
<tr><td>List</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>LinkedList</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>MultiMap</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>MultiSet</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Queue</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>SortedList</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Stack</td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>TreeMap</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>TreeSet</td><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<div class="table-wrapper"><table><thead><tr><th>Collection</th><th style="text-align: center">CMP</th><th style="text-align: center">CPY</th><th style="text-align: center">STR</th><th style="text-align: center">FREE</th><th style="text-align: center">HASH</th><th style="text-align: center">PRI</th></tr></thead><tbody>
<tr><td>BidiMap</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Deque</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>HashMap</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>HashSet</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Heap</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td></tr>
<tr><td>IntervalHeap</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td></tr>
<tr><td>List</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>LinkedList</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>MultiMap</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>MultiSet</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Queue</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>SortedList</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>Stack</td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>TreeMap</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
<tr><td>TreeSet</td><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td></tr>
</tbody></table>
<br>
<table><thead><tr><th align="center">Color</th><th>Label</th></tr></thead><tbody>
<tr><td align="center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td>Required for basic functionality.</td></tr>
<tr><td align="center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td>Required for specific functions.</td></tr>
<tr><td align="center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td>Required for non-core specific functions.</td></tr>
<tr><td align="center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td>Optional.</td></tr>
<tr><td align="center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td>Not Used.</td></tr>
</div><br>
<div class="table-wrapper"><table><thead><tr><th style="text-align: center">Color</th><th>Label</th></tr></thead><tbody>
<tr><td style="text-align: center"><img src="https://placehold.it/20/b82b28/000000?text=+" alt="#b82b28" /></td><td>Required for basic functionality.</td></tr>
<tr><td style="text-align: center"><img src="https://placehold.it/20/9f3b94/000000?text=+" alt="#9f3b94" /></td><td>Required for specific functions.</td></tr>
<tr><td style="text-align: center"><img src="https://placehold.it/20/497edd/000000?text=+" alt="#497edd" /></td><td>Required for non-core specific functions.</td></tr>
<tr><td style="text-align: center"><img src="https://placehold.it/20/00d3eb/000000?text=+" alt="#00d3eb" /></td><td>Optional.</td></tr>
<tr><td style="text-align: center"><img src="https://placehold.it/20/2ef625/000000?text=+" alt="#2ef625" /></td><td>Not Used.</td></tr>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cor/error_codes/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cor/iterators/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -280,49 +270,36 @@ struct SNAME##_fkey \
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cor/error_codes/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cor/error_codes/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cor/iterators/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cor/iterators/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>cor - C Macro Collections</title>
<title>cor - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html" class="active"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html" class="active"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,24 +142,20 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#cor" id="cor">COR</a></h1>
<h1 id="cor"><a class="header" href="#cor">COR</a></h1>
<p>Core functionalities of the C Macro Collections Library.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../Overview/files_overview.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../cor/callbacks/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -173,49 +163,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../Overview/files_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../Overview/files_overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../cor/callbacks/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../cor/callbacks/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Iterators - C Macro Collections</title>
<title>Iterators - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html" class="active"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html" class="active"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#iterators" id="iterators">Iterators</a></h1>
<h1 id="iterators"><a class="header" href="#iterators">Iterators</a></h1>
<p>Every collection comes with an interface of iterators where you can easily access the elements of a collection. These can move at any direction, can start at any 'end' of a collection and can move any amount of steps per iteration. Every collection generated comes with an iterator.</p>
<p>By design choice these iterators do not support modifications to the collection. If a collection is modified, all iterators that have been initialized will most likely be invalidated and may cause undefined behavior if used afterwards.</p>
@@ -156,17 +150,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../cor/functions_table/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../cmc/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -174,49 +164,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../cor/functions_table/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../cor/functions_table/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../cmc/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../cmc/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+90 -29
View File
@@ -2,12 +2,6 @@
@import 'variables.css';
::-webkit-scrollbar {
background: var(--bg);
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}
html {
scrollbar-color: var(--scrollbar) var(--bg);
}
@@ -18,16 +12,28 @@ a > .hljs {
color: var(--links);
}
/*
body-container is necessary because mobile browsers don't seem to like
overflow-x on the body tag when there is a <meta name="viewport"> tag.
*/
#body-container {
/*
This is used when the sidebar pushes the body content off the side of
the screen on small screens. Without it, dragging on mobile Safari
will want to reposition the viewport in a weird way.
*/
overflow-x: hidden;
}
/* Menu Bar */
#menu-bar {
position: -webkit-sticky;
position: sticky;
top: 0;
#menu-bar,
#menu-bar-hover-placeholder {
z-index: 101;
margin: auto calc(0px - var(--page-padding));
}
#menu-bar > #menu-bar-sticky-container {
#menu-bar {
position: relative;
display: flex;
flex-wrap: wrap;
background-color: var(--bg);
@@ -35,10 +41,21 @@ a > .hljs {
border-bottom-width: 1px;
border-bottom-style: solid;
}
.js #menu-bar > #menu-bar-sticky-container {
transition: transform 0.3s;
#menu-bar.sticky,
.js #menu-bar-hover-placeholder:hover + #menu-bar,
.js #menu-bar:hover,
.js.sidebar-visible #menu-bar {
position: -webkit-sticky;
position: sticky;
top: 0 !important;
}
#menu-bar.bordered > #menu-bar-sticky-container {
#menu-bar-hover-placeholder {
position: sticky;
position: -webkit-sticky;
top: 0;
height: var(--menu-bar-height);
}
#menu-bar.bordered {
border-bottom-color: var(--table-border-color);
}
#menu-bar i, #menu-bar .icon-button {
@@ -72,10 +89,6 @@ a > .hljs {
text-decoration: none;
}
html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container {
transform: translateY(calc(-10px - var(--menu-bar-height)));
}
.left-buttons {
display: flex;
margin: 0 5px;
@@ -87,7 +100,7 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta
.menu-title {
display: inline-block;
font-weight: 200;
font-size: 2rem;
font-size: 2.4rem;
line-height: var(--menu-bar-height);
text-align: center;
margin: 0;
@@ -202,24 +215,63 @@ pre {
pre > .buttons {
position: absolute;
z-index: 100;
right: 5px;
top: 5px;
right: 0px;
top: 2px;
margin: 0px;
padding: 2px 0px;
color: var(--sidebar-fg);
cursor: pointer;
visibility: hidden;
opacity: 0;
transition: visibility 0.1s linear, opacity 0.1s linear;
}
pre:hover > .buttons {
visibility: visible;
opacity: 1
}
pre > .buttons :hover {
color: var(--sidebar-active);
border-color: var(--icons-hover);
background-color: var(--theme-hover);
}
pre > .buttons i {
margin-left: 8px;
}
pre > .buttons button {
color: inherit;
background: transparent;
border: none;
cursor: inherit;
margin: 0px 5px;
padding: 3px 5px;
font-size: 14px;
border-style: solid;
border-width: 1px;
border-radius: 4px;
border-color: var(--icons);
background-color: var(--theme-popup-bg);
transition: 100ms;
transition-property: color,border-color,background-color;
color: var(--icons);
}
@media (pointer: coarse) {
pre > .buttons button {
/* On mobile, make it easier to tap buttons. */
padding: 0.3rem 1rem;
}
}
pre > code {
padding: 1rem;
}
/* FIXME: ACE editors overlap their buttons because ACE does absolute
positioning within the code block which breaks padding. The only solution I
can think of is to move the padding to the outer pre tag (or insert a div
wrapper), but that would require fixing a whole bunch of CSS rules.
*/
.hljs.ace_editor {
padding: 0rem 0rem;
}
pre > .result {
margin-top: 10px;
}
@@ -417,6 +469,11 @@ ul#searchresults span.teaser em {
display: none;
}
.chapter li.chapter-item {
line-height: 1.5em;
margin-top: 0.6em;
}
.chapter li.expanded > a.toggle div {
transform: rotate(90deg);
}
@@ -457,6 +514,8 @@ ul#searchresults span.teaser em {
padding: 0;
list-style: none;
display: none;
/* Don't let the children's background extend past the rounded corners. */
overflow: hidden;
}
.theme-popup .default {
color: var(--icons);
@@ -465,7 +524,7 @@ ul#searchresults span.teaser em {
width: 100%;
border: 0;
margin: 0;
padding: 2px 10px;
padding: 2px 20px;
line-height: 25px;
white-space: nowrap;
text-align: left;
@@ -477,8 +536,10 @@ ul#searchresults span.teaser em {
.theme-popup .theme:hover {
background-color: var(--theme-hover);
}
.theme-popup .theme:hover:first-child,
.theme-popup .theme:hover:last-child {
border-top-left-radius: inherit;
border-top-right-radius: inherit;
.theme-selected::before {
display: inline-block;
content: "✓";
margin-left: -14px;
width: 14px;
}
+58 -14
View File
@@ -12,6 +12,7 @@ html {
color: var(--fg);
background-color: var(--bg);
text-size-adjust: none;
-webkit-text-size-adjust: none;
}
body {
@@ -21,15 +22,30 @@ body {
}
code {
font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
font-family: var(--mono-font) !important;
font-size: var(--code-font-size);
}
/* make long words/inline code not x overflow */
main {
overflow-wrap: break-word;
}
/* make wide tables scroll if they overflow */
.table-wrapper {
overflow-x: auto;
}
/* Don't change font size in headers. */
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
font-size: unset;
}
.left { float: left; }
.right { float: right; }
.boring { opacity: 0.6; }
.hide-boring .boring { display: none; }
.hidden { display: none; }
.hidden { display: none !important; }
h2, h3 { margin-top: 2.5em; }
h4, h5 { margin-top: 2em; }
@@ -40,26 +56,30 @@ h4, h5 { margin-top: 2em; }
margin-top: 1em;
}
h1 a.header:target::before,
h2 a.header:target::before,
h3 a.header:target::before,
h4 a.header:target::before {
h1:target::before,
h2:target::before,
h3:target::before,
h4:target::before,
h5:target::before,
h6:target::before {
display: inline-block;
content: "»";
margin-left: -30px;
width: 30px;
}
h1 a.header:target,
h2 a.header:target,
h3 a.header:target,
h4 a.header:target {
/* This is broken on Safari as of version 14, but is fixed
in Safari Technology Preview 117 which I think will be Safari 14.2.
https://bugs.webkit.org/show_bug.cgi?id=218076
*/
:target {
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}
.page {
outline: 0;
padding: 0 var(--page-padding);
margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
}
.page-wrapper {
box-sizing: border-box;
@@ -70,17 +90,19 @@ h4 a.header:target {
.content {
overflow-y: auto;
padding: 0 15px;
padding-bottom: 50px;
padding: 0 5px 50px 5px;
}
.content main {
margin-left: auto;
margin-right: auto;
max-width: var(--content-max-width);
}
.content p { line-height: 1.45em; }
.content ol { line-height: 1.45em; }
.content ul { line-height: 1.45em; }
.content a { text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content img { max-width: 100%; }
.content img, .content video { max-width: 100%; }
.content .header:link,
.content .header:visited {
color: var(--fg);
@@ -126,6 +148,18 @@ blockquote {
border-bottom: .1em solid var(--quote-border);
}
kbd {
background-color: var(--table-border-color);
border-radius: 4px;
border: solid 1px var(--theme-popup-border);
box-shadow: inset 0 -1px 0 var(--theme-hover);
display: inline-block;
font-size: var(--code-font-size);
font-family: var(--mono-font);
line-height: 10px;
padding: 4px 5px;
vertical-align: middle;
}
:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
@@ -157,3 +191,13 @@ blockquote {
.tooltipped .tooltiptext {
visibility: visible;
}
.chapter li.part-title {
color: var(--sidebar-fg);
margin: 5px 0px;
font-weight: bold;
}
.result-no-output {
font-style: italic;
}
+13 -11
View File
@@ -6,6 +6,8 @@
--page-padding: 15px;
--content-max-width: 750px;
--menu-bar-height: 50px;
--mono-font: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
--code-font-size: 0.875em /* please adjust the ace font size accordingly in editor.js */
}
/* Themes */
@@ -67,7 +69,7 @@
--links: #2b79a2;
--inline-code-color: #c5c8c6;;
--inline-code-color: #c5c8c6;
--theme-popup-bg: #141617;
--theme-popup-border: #43484d;
@@ -92,22 +94,22 @@
.light {
--bg: hsl(0, 0%, 100%);
--fg: #333333;
--fg: hsl(0, 0%, 0%);
--sidebar-bg: #fafafa;
--sidebar-fg: #364149;
--sidebar-fg: hsl(0, 0%, 0%);
--sidebar-non-existant: #aaaaaa;
--sidebar-active: #008cff;
--sidebar-active: #1f1fff;
--sidebar-spacer: #f4f4f4;
--scrollbar: #cccccc;
--scrollbar: #8F8F8F;
--icons: #cccccc;
--icons-hover: #333333;
--icons: #747474;
--icons-hover: #000000;
--links: #4183c4;
--links: #20609f;
--inline-code-color: #6e6b5e;
--inline-code-color: #301900;
--theme-popup-bg: #fafafa;
--theme-popup-border: #cccccc;
@@ -147,7 +149,7 @@
--links: #2b79a2;
--inline-code-color: #c5c8c6;;
--inline-code-color: #c5c8c6;
--theme-popup-bg: #161923;
--theme-popup-border: #737480;
@@ -228,7 +230,7 @@
--links: #2b79a2;
--inline-code-color: #c5c8c6;;
--inline-code-color: #c5c8c6;
--theme-popup-bg: #141617;
--theme-popup-border: #43484d;
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>dev - C Macro Collections</title>
<title>dev - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html" class="active"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html" class="active"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,24 +142,20 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#dev" id="dev">DEV</a></h1>
<h1 id="dev"><a class="header" href="#dev">DEV</a></h1>
<p>The development collections. These collections are an exact copy of the <code>cmc</code> collections but they come with many logging throughout the generated code. Useful for debugging or during development.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../cmc/deque.h/functions.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../sac/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -173,49 +163,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../cmc/deque.h/functions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../cmc/deque.h/functions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../sac/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../sac/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 199.7 184.2">
<style>
@media (prefers-color-scheme: dark) {
svg { fill: white; }
}
</style>
<path d="M189.5,36.8c0.2,2.8,0,5.1-0.6,6.8L153,162c-0.6,2.1-2,3.7-4.2,5c-2.2,1.2-4.4,1.9-6.7,1.9H31.4c-9.6,0-15.3-2.8-17.3-8.4
c-0.8-2.2-0.8-3.9,0.1-5.2c0.9-1.2,2.4-1.8,4.6-1.8H123c7.4,0,12.6-1.4,15.4-4.1s5.7-8.9,8.6-18.4l32.9-108.6
c1.8-5.9,1-11.1-2.2-15.6S169.9,0,164,0H72.7c-1,0-3.1,0.4-6.1,1.1l0.1-0.4C64.5,0.2,62.6,0,61,0.1s-3,0.5-4.3,1.4
c-1.3,0.9-2.4,1.8-3.2,2.8S52,6.5,51.2,8.1c-0.8,1.6-1.4,3-1.9,4.3s-1.1,2.7-1.8,4.2c-0.7,1.5-1.3,2.7-2,3.7c-0.5,0.6-1.2,1.5-2,2.5
s-1.6,2-2.2,2.8s-0.9,1.5-1.1,2.2c-0.2,0.7-0.1,1.8,0.2,3.2c0.3,1.4,0.4,2.4,0.4,3.1c-0.3,3-1.4,6.9-3.3,11.6
c-1.9,4.7-3.6,8.1-5.1,10.1c-0.3,0.4-1.2,1.3-2.6,2.7c-1.4,1.4-2.3,2.6-2.6,3.7c-0.3,0.4-0.3,1.5-0.1,3.4c0.3,1.8,0.4,3.1,0.3,3.8
c-0.3,2.7-1.3,6.3-3,10.8c-1.7,4.5-3.4,8.2-5,11c-0.2,0.5-0.9,1.4-2,2.8c-1.1,1.4-1.8,2.5-2,3.4c-0.2,0.6-0.1,1.8,0.1,3.4
c0.2,1.6,0.2,2.8-0.1,3.6c-0.6,3-1.8,6.7-3.6,11c-1.8,4.3-3.6,7.9-5.4,11c-0.5,0.8-1.1,1.7-2,2.8c-0.8,1.1-1.5,2-2,2.8
s-0.8,1.6-1,2.5c-0.1,0.5,0,1.3,0.4,2.3c0.3,1.1,0.4,1.9,0.4,2.6c-0.1,1.1-0.2,2.6-0.5,4.4c-0.2,1.8-0.4,2.9-0.4,3.2
c-1.8,4.8-1.7,9.9,0.2,15.2c2.2,6.2,6.2,11.5,11.9,15.8c5.7,4.3,11.7,6.4,17.8,6.4h110.7c5.2,0,10.1-1.7,14.7-5.2s7.7-7.8,9.2-12.9
l33-108.6c1.8-5.8,1-10.9-2.2-15.5C194.9,39.7,192.6,38,189.5,36.8z M59.6,122.8L73.8,80c0,0,7,0,10.8,0s28.8-1.7,25.4,17.5
c-3.4,19.2-18.8,25.2-36.8,25.4S59.6,122.8,59.6,122.8z M78.6,116.8c4.7-0.1,18.9-2.9,22.1-17.1S89.2,86.3,89.2,86.3l-8.9,0
l-10.2,30.5C70.2,116.9,74,116.9,78.6,116.8z M75.3,68.7L89,26.2h9.8l0.8,34l23.6-34h9.9l-13.6,42.5h-7.1l12.5-35.4l-24.5,35.4h-6.8
l-0.8-35L82,68.7H75.3z"/>
</svg>
<!-- Original image Copyright Dave Gandy — CC BY 4.0 License -->

After

Width:  |  Height:  |  Size: 1.8 KiB

+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.
+93
View File
@@ -0,0 +1,93 @@
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
+100
View File
@@ -0,0 +1,100 @@
/* Open Sans is licensed under the Apache License, Version 2.0. See http://www.apache.org/licenses/LICENSE-2.0 */
/* Source Code Pro is under the Open Font License. See https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL */
/* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'),
url('open-sans-v17-all-charsets-300.woff2') format('woff2');
}
/* open-sans-300italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
src: local('Open Sans Light Italic'), local('OpenSans-LightItalic'),
url('open-sans-v17-all-charsets-300italic.woff2') format('woff2');
}
/* open-sans-regular - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans Regular'), local('OpenSans-Regular'),
url('open-sans-v17-all-charsets-regular.woff2') format('woff2');
}
/* open-sans-italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local('Open Sans Italic'), local('OpenSans-Italic'),
url('open-sans-v17-all-charsets-italic.woff2') format('woff2');
}
/* open-sans-600 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
url('open-sans-v17-all-charsets-600.woff2') format('woff2');
}
/* open-sans-600italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
url('open-sans-v17-all-charsets-600italic.woff2') format('woff2');
}
/* open-sans-700 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'),
url('open-sans-v17-all-charsets-700.woff2') format('woff2');
}
/* open-sans-700italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
url('open-sans-v17-all-charsets-700italic.woff2') format('woff2');
}
/* open-sans-800 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
src: local('Open Sans ExtraBold'), local('OpenSans-ExtraBold'),
url('open-sans-v17-all-charsets-800.woff2') format('woff2');
}
/* open-sans-800italic - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 800;
src: local('Open Sans ExtraBold Italic'), local('OpenSans-ExtraBoldItalic'),
url('open-sans-v17-all-charsets-800italic.woff2') format('woff2');
}
/* source-code-pro-500 - latin_vietnamese_latin-ext_greek_cyrillic-ext_cyrillic */
@font-face {
font-family: 'Source Code Pro';
font-style: normal;
font-weight: 500;
src: url('source-code-pro-v11-all-charsets-500.woff2') format('woff2');
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+21 -18
View File
@@ -1,14 +1,18 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/*
* An increased contrast highlighting scheme loosely based on the
* "Base16 Atelier Dune Light" theme by Bram de Haan
* (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)
* Original Base16 color scheme by Chris Kempson
* (https://github.com/chriskempson/base16)
*/
/* Atelier-Dune Comment */
/* Comment */
.hljs-comment,
.hljs-quote {
color: #AAA;
color: #575757;
}
/* Atelier-Dune Red */
/* Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
@@ -19,10 +23,10 @@
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
color: #d70025;
}
/* Atelier-Dune Orange */
/* Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
@@ -30,34 +34,33 @@
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
color: #b21e00;
}
/* Atelier-Dune Green */
/* Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
color: #008200;
}
/* Atelier-Dune Blue */
/* Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
color: #0030f2;
}
/* Atelier-Dune Purple */
/* Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
color: #9d00ec;
}
.hljs {
display: block;
overflow-x: auto;
background: #f1f1f1;
color: #6e6b5e;
padding: 0.5em;
background: #f6f7f6;
color: #000;
}
.hljs-emphasis {
+6 -2
View File
@@ -1,2 +1,6 @@
/*! highlight.js v9.15.10 | BSD3 License | git.io/hljslicense */
!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"==typeof exports||exports.nodeType?n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs})):e(exports)}(function(a){var f=[],u=Object.keys,N={},c={},n=/^(no-?highlight|plain|text)$/i,s=/\blang(?:uage)?-([\w-]+)\b/i,t=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,r={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},b="</span>",h={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function _(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function E(e){return e.nodeName.toLowerCase()}function v(e,n){var t=e&&e.exec(n);return t&&0===t.index}function l(e){return n.test(e)}function g(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function R(e){var a=[];return function e(n,t){for(var r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?t+=r.nodeValue.length:1===r.nodeType&&(a.push({event:"start",offset:t,node:r}),t=e(r,t),E(r).match(/br|hr|img|input/)||a.push({event:"stop",offset:t,node:r}));return t}(e,0),a}function i(e){if(r&&!e.langApiRestored){for(var n in e.langApiRestored=!0,r)e[n]&&(e[r[n]]=e[n]);(e.c||[]).concat(e.v||[]).forEach(i)}}function m(o){function s(e){return e&&e.source||e}function c(e,n){return new RegExp(s(e),"m"+(o.cI?"i":"")+(n?"g":""))}!function n(t,e){if(!t.compiled){if(t.compiled=!0,t.k=t.k||t.bK,t.k){function r(t,e){o.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var n=e.split("|");a[n[0]]=[t,n[1]?Number(n[1]):1]})}var a={};"string"==typeof t.k?r("keyword",t.k):u(t.k).forEach(function(e){r(e,t.k[e])}),t.k=a}t.lR=c(t.l||/\w+/,!0),e&&(t.bK&&(t.b="\\b("+t.bK.split(" ").join("|")+")\\b"),t.b||(t.b=/\B|\b/),t.bR=c(t.b),t.endSameAsBegin&&(t.e=t.b),t.e||t.eW||(t.e=/\B|\b/),t.e&&(t.eR=c(t.e)),t.tE=s(t.e)||"",t.eW&&e.tE&&(t.tE+=(t.e?"|":"")+e.tE)),t.i&&(t.iR=c(t.i)),null==t.r&&(t.r=1),t.c||(t.c=[]),t.c=Array.prototype.concat.apply([],t.c.map(function(e){return function(n){return n.v&&!n.cached_variants&&(n.cached_variants=n.v.map(function(e){return g(n,{v:null},e)})),n.cached_variants||n.eW&&[g(n)]||[n]}("self"===e?t:e)})),t.c.forEach(function(e){n(e,t)}),t.starts&&n(t.starts,e);var i=t.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([t.tE,t.i]).map(s).filter(Boolean);t.t=i.length?c(function(e,n){for(var t=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,a="",i=0;i<e.length;i++){var o=r,c=s(e[i]);for(0<i&&(a+=n);0<c.length;){var u=t.exec(c);if(null==u){a+=c;break}a+=c.substring(0,u.index),c=c.substring(u.index+u[0].length),"\\"==u[0][0]&&u[1]?a+="\\"+String(Number(u[1])+o):(a+=u[0],"("==u[0]&&r++)}}return a}(i,"|"),!0):{exec:function(){return null}}}}(o)}function C(e,n,i,t){function c(e,n,t,r){var a='<span class="'+(r?"":h.classPrefix);return e?(a+=e+'">')+n+(t?"":b):n}function o(){E+=null!=l.sL?function(){var e="string"==typeof l.sL;if(e&&!N[l.sL])return _(g);var n=e?C(l.sL,g,!0,f[l.sL]):O(g,l.sL.length?l.sL:void 0);return 0<l.r&&(R+=n.r),e&&(f[l.sL]=n.top),c(n.language,n.value,!1,!0)}():function(){var e,n,t,r,a,i,o;if(!l.k)return _(g);for(r="",n=0,l.lR.lastIndex=0,t=l.lR.exec(g);t;)r+=_(g.substring(n,t.index)),a=l,i=t,void 0,o=s.cI?i[0].toLowerCase():i[0],(e=a.k.hasOwnProperty(o)&&a.k[o])?(R+=e[1],r+=c(e[0],_(t[0]))):r+=_(t[0]),n=l.lR.lastIndex,t=l.lR.exec(g);return r+_(g.substr(n))}(),g=""}function u(e){E+=e.cN?c(e.cN,"",!0):"",l=Object.create(e,{parent:{value:l}})}function r(e,n){if(g+=e,null==n)return o(),0;var t=function(e,n){var t,r,a;for(t=0,r=n.c.length;t<r;t++)if(v(n.c[t].bR,e))return n.c[t].endSameAsBegin&&(n.c[t].eR=(a=n.c[t].bR.exec(e)[0],new RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"m"))),n.c[t]}(n,l);if(t)return t.skip?g+=n:(t.eB&&(g+=n),o(),t.rB||t.eB||(g=n)),u(t),t.rB?0:n.length;var r=function e(n,t){if(v(n.eR,t)){for(;n.endsParent&&n.parent;)n=n.parent;return n}if(n.eW)return e(n.parent,t)}(l,n);if(r){var a=l;for(a.skip?g+=n:(a.rE||a.eE||(g+=n),o(),a.eE&&(g=n));l.cN&&(E+=b),l.skip||l.sL||(R+=l.r),(l=l.parent)!==r.parent;);return r.starts&&(r.endSameAsBegin&&(r.starts.eR=r.eR),u(r.starts)),a.rE?0:n.length}if(function(e,n){return!i&&v(n.iR,e)}(n,l))throw new Error('Illegal lexeme "'+Line truncated
/*
Highlight.js 10.1.1 (93fd0d73)
License: BSD-3-Clause
Copyright (c) 2006-2020, Ivan Sagalaev
*/
var hljs=function(){"use strict";function e(n){Object.freeze(n);var t="function"==typeof n;return Object.getOwnPropertyNames(n).forEach((function(r){!Object.hasOwnProperty.call(n,r)||null===n[r]||"object"!=typeof n[r]&&"function"!=typeof n[r]||t&&("caller"===r||"callee"===r||"arguments"===r)||Object.isFrozen(n[r])||e(n[r])})),n}class n{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data}ignoreMatch(){this.ignore=!0}}function t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(e,...n){var t={};for(const n in e)t[n]=e[n];return n.forEach((function(e){for(const n in e)t[n]=e[n]})),t}function a(e){return e.nodeName.toLowerCase()}var i=Object.freeze({__proto__:null,escapeHTML:t,inherit:r,nodeStream:function(e){var n=[];return function e(t,r){for(var i=t.firstChild;i;i=i.nextSibling)3===i.nodeType?r+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:r,node:i}),r=e(i,r),a(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:i}));return r}(e,0),n},mergeStreams:function(e,n,r){var i=0,s="",o=[];function l(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset<n[0].offset?e:n:"start"===n[0].event?e:n:e.length?e:n}function c(e){s+="<"+a(e)+[].map.call(e.attributes,(function(e){return" "+e.nodeName+'="'+t(e.value)+'"'})).join("")+">"}function u(e){s+="</"+a(e)+">"}function d(e){("start"===e.event?c:u)(e.node)}for(;e.length||n.length;){var g=l();if(s+=t(r.substring(i,g[0].offset)),i=g[0].offset,g===e){o.reverse().forEach(u);do{d(g.splice(0,1)[0]),g=l()}while(g===e&&g.length&&g[0].offset===i);o.reverse().forEach(c)}else"start"===g[0].event?o.push(g[0].node):o.pop(),d(g.splice(0,1)[0])}return s+t(r.substr(i))}});const s="</span>",o=e=>!!e.kind;class l{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){this.buffer+=t(e)}openNode(e){if(!o(e))return;let n=e.kind;e.sublanguage||(n=`${this.classPrefix}${n}`),this.span(n)}closeNode(e){o(e)&&(this.buffer+=s)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class c{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const n={kind:e,children:[]};this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),n.children.forEach(n=>this._walk(e,n)),e.closeNode(n)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every(e=>"string"==typeof e)?e.children=[e.children.join("")]:e.children.forEach(e=>{c._collapse(e)}))}}class u extends c{constructor(e){super(),this.options=e}addKeyword(e,n){""!==e&&(this.openNode(n),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,n){const t=e.root;t.kind=n,t.sublanguage=!0,this.add(t)}toHTML(){return new l(this,this.options).value()}finalize(){return!0}}function d(e){return e?"string"==typeof e?e:e.source:null}const g="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",h={begin:"\\\\[\\s\\S]",relevance:0},f={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[h]},p={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[h]},b={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},m=function(e,n,t={}){var a=r({className:"comment",begin:e,end:n,contains:[]},t);return a.contains.push(b),a.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),a},v=m("//","$"),x=m("/\\*","\\*/"),E=m("#","$");var _=Object.freeze({__proto__:null,IDENT_RE:"[a-zA-Z]\\w*",UNDERSCORE_IDENT_RE:"[a-zA-Z_]\\w*",NUMBER_RE:"\\b\\d+(\\.\\d+)?",C_NUMBER_RE:g,BINARY_NUMBER_RE:"\\b(0b[01]+)",RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const n=/^#![ ]*\//;return e.binary&&(e.begin=function(...e){return e.map(e=>d(e)).join("")}(n,/.*\b/,e.binary,/\b.*/)),r({className:"meta",begin:n,end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},BACKSLASH_ESCAPE:h,APOS_STRING_MODE:f,QUOTE_STRING_MODE:p,PHRASAL_WORDS_MODE:b,COMMENT:m,C_LINE_COMMENT_MODE:v,C_BLOCK_COMMENT_MODE:x,HASH_COMMENT_MODE:E,NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?",relevance:0},C_NUMBER_MODE:{className:"number",begin:g,relevance:0},BINARY_NUMBER_MODE:{className:"number",begin:"\\b(0b[01]+)",relevance:0},CSS_NUMBER_MODE:{className:"number",begin:"\\b\\d+(\\.\\d+)?(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0Line truncated
+62 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Introduction - C Macro Collections</title>
<title>Introduction - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="Introduction/introduction.html" class="active"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="chapteLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,21 +142,26 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#introduction" id="introduction">Introduction</a></h1>
<h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1>
<p align="center">
<img src="img/logo.png" alt="C Macro Collections Logo" width="300"/>
</p>
<p align="center">Header only, macro generated, generic and type-safe Collections in C.</p>
<p align="center">Easy to use, modular, header only, macro based, generic and type-safe Data Structures in C</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections"><img src="https://img.shields.io/badge/GitHub-C%20Macro%20Collections-2195F3.svg?logo=github" alt="LinkToRepo"/></a>
<a href="https://leoven.github.io/C-Macro-Collections/"><img style="color: #ffffff;" src="https://img.shields.io/badge/Read%20the%20Docs-D13636.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHN0eWxlPSIiPjxyZWN0IGlkPSJiYWNrZ3JvdW5kcmVjdCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgeD0iMCIgeT0iMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJub25lIi8%2BPHRpdGxlPmljbi9kb2MtdGV4dDwvdGl0bGU%2BPGcgY2xhc3M9ImN1cnJlbnRMYXllciIgc3R5bGU9IiI%2BPHRpdGxlPkxheWVyIDE8L3RpdGxlPjxwYXRoIGQ9Ik01IDFoNC4yNDRhMiAyIDAgMCAxIDEuNDM0LjYwNmwyLjc1NiAyLjgzNEEyIDIgMCAwIDEgMTQgNS44MzVWMTJhMyAzIDAgMCAxLTMgM0g1YTMgMyAwIDAgMS0zLTNWNGEzIDMgMCAwIDEgMy0zem0wIDJhMSAxIDAgMCAwLTEgMXY4YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjUuODM1TDkuMjQ0IDNINXptMS41IDdoM2EuNS41IDAgMSAxIDAgMWgtM2EuNS41IDAgMSAxIDAtMXptMC0yaDJhLjUuNSAwIDAgMSAwIDFoLTJhLjUuNSAwIDAgMSAwLTF6TTggMmwzIDEuOTk1TDEzIDdIOWExIDEgMCAwIDEtMS0xVjJ6IiBpZD0iYSIgY2xhc3M9IiIgZmlsbD0iI2ZmZmZmZiIgZmlsbC1vcGFjaXR5PSIxIi8%2BPC9nPjwvc3ZnPg%3D%3D" alt="LinkToDocs"/></a>
</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"/></a>
<img src="https://img.shields.io/badge/Version-v0.23.1-orange.svg" alt="Version"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/releases"><img src="https://img.shields.io/badge/Version-v0.26.0-orange.svg" alt="Version"/></a>
<a href="https://travis-ci.org/LeoVen/C-Macro-Collections"><img src="https://travis-ci.org/LeoVen/C-Macro-Collections.svg?branch=master" alt="travis-ci"/></a>
<a href="https://codecov.io/gh/LeoVen/C-Macro-Collections"><img src="https://codecov.io/gh/LeoVen/C-Macro-Collections/branch/master/graph/badge.svg" alt="codecov"/></a>
<img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/actions"><img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/></a>
</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/stargazers"><img src="https://img.shields.io/github/stars/LeoVen/C-Macro-Collections?style=flat&color=ffa000" alt="Stars"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Lines%20of%20Code-28513-007596.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Files-130-961c00.svg" alt="loc"/></a>
</p>
<p>The C Macro Collections Library is a compilation of macros that can be used to generate common data structures for any desired type. These data structures are <a href="https://en.wikipedia.org/wiki/Type_safety">type safe</a> and are powered with many features (see Features section).</p>
<p>The documentation is currently being written in hopes that in the future it can be used to help you get to know better this amazing C library.</p>
@@ -171,13 +170,10 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="next" href="Introduction/why_this_library.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -185,45 +181,33 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="Introduction/why_this_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="Introduction/why_this_library.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+311 -321
View File
File diff suppressed because it is too large. Load diff
+56 -79
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>sac - C Macro Collections</title>
<title>sac - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html" class="active"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html" class="active"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,9 +142,9 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#sac" id="sac">SAC</a></h1>
<h1 id="sac"><a class="header" href="#sac">SAC</a></h1>
<p>The Statically Allocated Collections. These collections have a fixed size. Its size is one of the parameters during macro expansion, producing a C array.</p>
<h2><a class="header" href="#cmc-vs-sac" id="cmc-vs-sac">CMC vs. SAC</a></h2>
<h2 id="cmc-vs-sac"><a class="header" href="#cmc-vs-sac">CMC vs. SAC</a></h2>
<p>The <code>cmc</code> collections hold their data either with nodes or a buffer that can be reallocated. The <code>sac</code> collections only have an array with fixed size and don't perform any allocation on the heap.</p>
<pre><code class="language-c">// A CMC List
struct List
@@ -171,17 +165,13 @@ struct List
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../dev/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../utl/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -189,49 +179,36 @@ struct List
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../dev/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../dev/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../utl/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../utl/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+8 -2
View File
@@ -145,6 +145,11 @@ window.search = window.search || {};
url.push("");
}
// encodeURIComponent escapes all chars that could allow an XSS except
// for '. Due to that we also manually replace ' with its url-encoded
// representation (%27).
var searchterms = encodeURIComponent(searchterms.join(" ")).replace(/\'/g, "%27");
return '<a href="' + path_to_root + url[0] + '?' + URL_MARK_PARAM + '=' + searchterms + '#' + url[1]
+ '" aria-details="teaser_' + teaser_count + '">' + result.doc.breadcrumbs + '</a>'
+ '<span class="teaser" id="teaser_' + teaser_count + '" aria-label="Search Result Teaser">'
@@ -291,7 +296,7 @@ window.search = window.search || {};
}
if (url.params.hasOwnProperty(URL_MARK_PARAM)) {
var words = url.params[URL_MARK_PARAM].split(' ');
var words = decodeURIComponent(url.params[URL_MARK_PARAM]).split(' ');
marker.mark(words, {
exclude: mark_exclude
});
@@ -311,7 +316,7 @@ window.search = window.search || {};
// Eventhandler for keyevents on `document`
function globalKeyHandler(e) {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea') { return; }
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea' || e.target.type === 'text') { return; }
if (e.keyCode === ESCAPE_KEYCODE) {
e.preventDefault();
@@ -422,6 +427,7 @@ window.search = window.search || {};
delete url.params[URL_MARK_PARAM];
url.hash = "";
} else {
delete url.params[URL_MARK_PARAM];
delete url.params[URL_SEARCH_PARAM];
}
// A new search will also add a new history item, so the user can go back
+1 -1
View File
@@ -1 +1 @@
Object.assign(window.search, {"doc_urls":["Introduction/introduction.html#introduction","Introduction/why_this_library.html#why-this-library","Introduction/how_to_install.html#how-to-install","Introduction/library_structure.html#library-structure","Introduction/library_structure.html#cmc","Introduction/library_structure.html#dev","Introduction/library_structure.html#sac","Introduction/library_structure.html#utl","Introduction/library_structure.html#macro_collectionsh","Introduction/understanding_the_library.html#understanding-the-library","Introduction/understanding_the_library.html#sname","Introduction/understanding_the_library.html#pfx","Introduction/understanding_the_library.html#k","Introduction/understanding_the_library.html#v","Introduction/understanding_the_library.html#summarizing","Introduction/how_to_use_the_library.html#how-to-use-the-library","Overview/index.html#overview","Overview/collections_overview.html#collections-overview","Overview/features_overview.html#features-overview","Overview/files_overview.html#files-overview","cor/index.html#cor","cor/callbacks/index.html#callbacks","cor/callbacks/index.html#cmc_callbacks","cor/callbacks/index.html#example","cor/custom_allocation/index.html#custom-allocation","cor/custom_allocation/index.html#cmc_alloc_node","cor/custom_allocation/index.html#cmc_alloc_node_default","cor/custom_allocation/index.html#example","cor/error_codes/index.html#error-codes","cor/error_codes/index.html#cmc_flags","cor/error_codes/index.html#cmc_flags_to_str","cor/error_codes/index.html#example","cor/functions_table/index.html#functions-table","cor/functions_table/index.html#cmp","cor/functions_table/index.html#cpy","cor/functions_table/index.html#str","cor/functions_table/index.html#free","cor/functions_table/index.html#hash","cor/functions_table/index.html#pri","cor/iterators/index.html#iterators","cmc/index.html#cmc","cmc/index.html#quick-example","cmc/bitset.h/index.html#bitseth","cmc/bitset.h/index.html#bitset-implementation","cmc/bitset.h/index.html#bitset-generation-macros","cmc/bitset.h/index.html#bitset-structures","cmc/bitset.h/index.html#struct-sname","cmc/bitset.h/index.html#struct-sname_iter","cmc/bitset.h/index.html#cmc_bitset_word","cmc/bitset.h/index.html#callbacks","cmc/bitset.h/index.html#functions-table","cmc/deque.h/index.html#dequeh","cmc/deque.h/index.html#deque-implementation","cmc/deque.h/index.html#deque-generation-macros","cmc/deque.h/index.html#deque-structures","cmc/deque.h/index.html#struct-sname","cmc/deque.h/index.html#struct-sname_fval","cmc/deque.h/index.html#struct-sname_iter","cmc/deque.h/index.html#callbacks","cmc/deque.h/index.html#functions-table","cmc/deque.h/functions.html#index","cmc/deque.h/functions.html#_new","cmc/deque.h/functions.html#_new_custom","dev/index.html#dev","sac/index.html#sac","sac/index.html#cmc-vs-sac","utl/index.html#utl","utl/index.html#contents","utl/assert.h/index.html#asserth","utl/assert.h/index.html#printed-messages","utl/assert.h/index.html#cmc_assert_state","utl/assert.h/index.html#dtype","utl/assert.h/overview.html#overview","utl/assert.h/overview.html#single-value-assertion-macros","utl/assert.h/overview.html#array-assertion-macros","utl/assert.h/valued_assertions.html#valued-assertion-macros","utl/assert.h/valued_assertions.html#contents","utl/assert.h/valued_assertions.html#cmc_assert","utl/assert.h/valued_assertions.html#cmc_assert_equals","utl/assert.h/valued_assertions.html#cmc_assert_not_equals","utl/assert.h/valued_assertions.html#cmc_assert_greater","utl/assert.h/valued_assertions.html#cmc_assert_greater_equals","utl/assert.h/valued_assertions.html#cmc_assert_lesser","utl/assert.h/valued_assertions.html#cmc_assert_lesser_equals","utl/assert.h/valued_assertions.html#cmc_assert_in_range","utl/assert.h/valued_assertions.html#cmc_assert_not_in_range","utl/assert.h/generic_assertions.html#generic-assertion-macros","utl/assert.h/generic_assertions.html#contents","utl/assert.h/generic_assertions.html#cmc_assert_array_equals_any","utl/assert.h/generic_assertions.html#cmc_assert_array_within_any","utl/assert.h/generic_assertions.html#cmc_assert_array_outside_any","utl/assert.h/generic_assertions.html#cmc_assert_array_sorted_any","utl/foreach.h/index.html#foreachh","utl/foreach.h/index.html#cmc_foreach","utl/foreach.h/index.html#cmc_foreach_rev","utl/foreach.h/index.html#example","utl/futils.h/index.html#futilsh","utl/log.h/index.html#logh","utl/log.h/index.html#cmc_log_type","utl/log.h/index.html#cmc_log_color","utl/log.h/log_functions.html#log-functions","utl/log.h/log_functions.html#cmc_log_trace","utl/log.h/log_functions.html#cmc_log_debug","utl/log.h/log_functions.html#cmc_log_info","utl/log.h/log_functions.html#cmc_log_warn","utl/log.h/log_functions.html#cmc_log_error","utl/log.h/log_functions.html#cmc_log_fatal","utl/log.h/configuration.html#configuration","utl/log.h/configuration.html#cmc_log_config","utl/log.h/configuration.html#log-level","utl/log.h/meanings.html#meanings","utl/test.h/index.htmlLine truncated
Object.assign(window.search, {"doc_urls":["Introduction/introduction.html#introduction","Introduction/why_this_library.html#why-this-library","Introduction/how_to_install.html#how-to-install","Introduction/library_structure.html#library-structure","Introduction/library_structure.html#cmc","Introduction/library_structure.html#dev","Introduction/library_structure.html#sac","Introduction/library_structure.html#utl","Introduction/library_structure.html#macro_collectionsh","Introduction/understanding_the_library.html#understanding-the-library","Introduction/understanding_the_library.html#sname","Introduction/understanding_the_library.html#pfx","Introduction/understanding_the_library.html#k","Introduction/understanding_the_library.html#v","Introduction/understanding_the_library.html#summarizing","Introduction/how_to_use_the_library.html#how-to-use-the-library","Overview/index.html#overview","Overview/collections_overview.html#collections-overview","Overview/features_overview.html#features-overview","Overview/files_overview.html#files-overview","cor/index.html#cor","cor/callbacks/index.html#callbacks","cor/callbacks/index.html#cmc_callbacks","cor/callbacks/index.html#example","cor/custom_allocation/index.html#custom-allocation","cor/custom_allocation/index.html#cmc_alloc_node","cor/custom_allocation/index.html#cmc_alloc_node_default","cor/custom_allocation/index.html#example","cor/error_codes/index.html#error-codes","cor/error_codes/index.html#cmc_flags","cor/error_codes/index.html#cmc_flags_to_str","cor/error_codes/index.html#example","cor/functions_table/index.html#functions-table","cor/functions_table/index.html#cmp","cor/functions_table/index.html#cpy","cor/functions_table/index.html#str","cor/functions_table/index.html#free","cor/functions_table/index.html#hash","cor/functions_table/index.html#pri","cor/iterators/index.html#iterators","cmc/index.html#cmc","cmc/index.html#quick-example","cmc/bitset.h/index.html#bitseth","cmc/bitset.h/index.html#bitset-implementation","cmc/bitset.h/index.html#bitset-generation-macros","cmc/bitset.h/index.html#bitset-structures","cmc/bitset.h/index.html#struct-sname","cmc/bitset.h/index.html#struct-sname_iter","cmc/bitset.h/index.html#cmc_bitset_word","cmc/bitset.h/index.html#callbacks","cmc/bitset.h/index.html#functions-table","cmc/deque.h/index.html#dequeh","cmc/deque.h/index.html#deque-implementation","cmc/deque.h/index.html#deque-generation-macros","cmc/deque.h/index.html#deque-structures","cmc/deque.h/index.html#struct-sname","cmc/deque.h/index.html#struct-sname_fval","cmc/deque.h/index.html#struct-sname_iter","cmc/deque.h/index.html#callbacks","cmc/deque.h/index.html#functions-table","cmc/deque.h/functions.html#index","cmc/deque.h/functions.html#_new","cmc/deque.h/functions.html#_new_custom","dev/index.html#dev","sac/index.html#sac","sac/index.html#cmc-vs-sac","utl/index.html#utl","utl/index.html#contents","utl/assert.h/index.html#asserth","utl/assert.h/index.html#printed-messages","utl/assert.h/index.html#cmc_assert_state","utl/assert.h/index.html#dtype","utl/assert.h/overview.html#overview","utl/assert.h/overview.html#single-value-assertion-macros","utl/assert.h/overview.html#array-assertion-macros","utl/assert.h/valued_assertions.html#valued-assertion-macros","utl/assert.h/valued_assertions.html#contents","utl/assert.h/valued_assertions.html#cmc_assert","utl/assert.h/valued_assertions.html#cmc_assert_equals","utl/assert.h/valued_assertions.html#cmc_assert_not_equals","utl/assert.h/valued_assertions.html#cmc_assert_greater","utl/assert.h/valued_assertions.html#cmc_assert_greater_equals","utl/assert.h/valued_assertions.html#cmc_assert_lesser","utl/assert.h/valued_assertions.html#cmc_assert_lesser_equals","utl/assert.h/valued_assertions.html#cmc_assert_in_range","utl/assert.h/valued_assertions.html#cmc_assert_not_in_range","utl/assert.h/generic_assertions.html#generic-assertion-macros","utl/assert.h/generic_assertions.html#contents","utl/assert.h/generic_assertions.html#cmc_assert_array_equals_any","utl/assert.h/generic_assertions.html#cmc_assert_array_within_any","utl/assert.h/generic_assertions.html#cmc_assert_array_outside_any","utl/assert.h/generic_assertions.html#cmc_assert_array_sorted_any","utl/foreach.h/index.html#foreachh","utl/foreach.h/index.html#cmc_foreach","utl/foreach.h/index.html#cmc_foreach_rev","utl/foreach.h/index.html#example","utl/futils.h/index.html#futilsh","utl/log.h/index.html#logh","utl/log.h/index.html#cmc_log_type","utl/log.h/index.html#cmc_log_color","utl/log.h/log_functions.html#log-functions","utl/log.h/log_functions.html#cmc_log_trace","utl/log.h/log_functions.html#cmc_log_debug","utl/log.h/log_functions.html#cmc_log_info","utl/log.h/log_functions.html#cmc_log_warn","utl/log.h/log_functions.html#cmc_log_error","utl/log.h/log_functions.html#cmc_log_fatal","utl/log.h/configuration.html#configuration","utl/log.h/configuration.html#cmc_log_config","utl/log.h/configuration.html#log-level","utl/log.h/meanings.html#meanings","utl/test.h/index.htmlLine truncated
+1 -1
View File
@@ -1 +1 @@
{"doc_urls":["Introduction/introduction.html#introduction","Introduction/why_this_library.html#why-this-library","Introduction/how_to_install.html#how-to-install","Introduction/library_structure.html#library-structure","Introduction/library_structure.html#cmc","Introduction/library_structure.html#dev","Introduction/library_structure.html#sac","Introduction/library_structure.html#utl","Introduction/library_structure.html#macro_collectionsh","Introduction/understanding_the_library.html#understanding-the-library","Introduction/understanding_the_library.html#sname","Introduction/understanding_the_library.html#pfx","Introduction/understanding_the_library.html#k","Introduction/understanding_the_library.html#v","Introduction/understanding_the_library.html#summarizing","Introduction/how_to_use_the_library.html#how-to-use-the-library","Overview/index.html#overview","Overview/collections_overview.html#collections-overview","Overview/features_overview.html#features-overview","Overview/files_overview.html#files-overview","cor/index.html#cor","cor/callbacks/index.html#callbacks","cor/callbacks/index.html#cmc_callbacks","cor/callbacks/index.html#example","cor/custom_allocation/index.html#custom-allocation","cor/custom_allocation/index.html#cmc_alloc_node","cor/custom_allocation/index.html#cmc_alloc_node_default","cor/custom_allocation/index.html#example","cor/error_codes/index.html#error-codes","cor/error_codes/index.html#cmc_flags","cor/error_codes/index.html#cmc_flags_to_str","cor/error_codes/index.html#example","cor/functions_table/index.html#functions-table","cor/functions_table/index.html#cmp","cor/functions_table/index.html#cpy","cor/functions_table/index.html#str","cor/functions_table/index.html#free","cor/functions_table/index.html#hash","cor/functions_table/index.html#pri","cor/iterators/index.html#iterators","cmc/index.html#cmc","cmc/index.html#quick-example","cmc/bitset.h/index.html#bitseth","cmc/bitset.h/index.html#bitset-implementation","cmc/bitset.h/index.html#bitset-generation-macros","cmc/bitset.h/index.html#bitset-structures","cmc/bitset.h/index.html#struct-sname","cmc/bitset.h/index.html#struct-sname_iter","cmc/bitset.h/index.html#cmc_bitset_word","cmc/bitset.h/index.html#callbacks","cmc/bitset.h/index.html#functions-table","cmc/deque.h/index.html#dequeh","cmc/deque.h/index.html#deque-implementation","cmc/deque.h/index.html#deque-generation-macros","cmc/deque.h/index.html#deque-structures","cmc/deque.h/index.html#struct-sname","cmc/deque.h/index.html#struct-sname_fval","cmc/deque.h/index.html#struct-sname_iter","cmc/deque.h/index.html#callbacks","cmc/deque.h/index.html#functions-table","cmc/deque.h/functions.html#index","cmc/deque.h/functions.html#_new","cmc/deque.h/functions.html#_new_custom","dev/index.html#dev","sac/index.html#sac","sac/index.html#cmc-vs-sac","utl/index.html#utl","utl/index.html#contents","utl/assert.h/index.html#asserth","utl/assert.h/index.html#printed-messages","utl/assert.h/index.html#cmc_assert_state","utl/assert.h/index.html#dtype","utl/assert.h/overview.html#overview","utl/assert.h/overview.html#single-value-assertion-macros","utl/assert.h/overview.html#array-assertion-macros","utl/assert.h/valued_assertions.html#valued-assertion-macros","utl/assert.h/valued_assertions.html#contents","utl/assert.h/valued_assertions.html#cmc_assert","utl/assert.h/valued_assertions.html#cmc_assert_equals","utl/assert.h/valued_assertions.html#cmc_assert_not_equals","utl/assert.h/valued_assertions.html#cmc_assert_greater","utl/assert.h/valued_assertions.html#cmc_assert_greater_equals","utl/assert.h/valued_assertions.html#cmc_assert_lesser","utl/assert.h/valued_assertions.html#cmc_assert_lesser_equals","utl/assert.h/valued_assertions.html#cmc_assert_in_range","utl/assert.h/valued_assertions.html#cmc_assert_not_in_range","utl/assert.h/generic_assertions.html#generic-assertion-macros","utl/assert.h/generic_assertions.html#contents","utl/assert.h/generic_assertions.html#cmc_assert_array_equals_any","utl/assert.h/generic_assertions.html#cmc_assert_array_within_any","utl/assert.h/generic_assertions.html#cmc_assert_array_outside_any","utl/assert.h/generic_assertions.html#cmc_assert_array_sorted_any","utl/foreach.h/index.html#foreachh","utl/foreach.h/index.html#cmc_foreach","utl/foreach.h/index.html#cmc_foreach_rev","utl/foreach.h/index.html#example","utl/futils.h/index.html#futilsh","utl/log.h/index.html#logh","utl/log.h/index.html#cmc_log_type","utl/log.h/index.html#cmc_log_color","utl/log.h/log_functions.html#log-functions","utl/log.h/log_functions.html#cmc_log_trace","utl/log.h/log_functions.html#cmc_log_debug","utl/log.h/log_functions.html#cmc_log_info","utl/log.h/log_functions.html#cmc_log_warn","utl/log.h/log_functions.html#cmc_log_error","utl/log.h/log_functions.html#cmc_log_fatal","utl/log.h/configuration.html#configuration","utl/log.h/configuration.html#cmc_log_config","utl/log.h/configuration.html#log-level","utl/log.h/meanings.html#meanings","utl/test.h/index.html#testh","utl/test.h/index.htmLine truncated
{"doc_urls":["Introduction/introduction.html#introduction","Introduction/why_this_library.html#why-this-library","Introduction/how_to_install.html#how-to-install","Introduction/library_structure.html#library-structure","Introduction/library_structure.html#cmc","Introduction/library_structure.html#dev","Introduction/library_structure.html#sac","Introduction/library_structure.html#utl","Introduction/library_structure.html#macro_collectionsh","Introduction/understanding_the_library.html#understanding-the-library","Introduction/understanding_the_library.html#sname","Introduction/understanding_the_library.html#pfx","Introduction/understanding_the_library.html#k","Introduction/understanding_the_library.html#v","Introduction/understanding_the_library.html#summarizing","Introduction/how_to_use_the_library.html#how-to-use-the-library","Overview/index.html#overview","Overview/collections_overview.html#collections-overview","Overview/features_overview.html#features-overview","Overview/files_overview.html#files-overview","cor/index.html#cor","cor/callbacks/index.html#callbacks","cor/callbacks/index.html#cmc_callbacks","cor/callbacks/index.html#example","cor/custom_allocation/index.html#custom-allocation","cor/custom_allocation/index.html#cmc_alloc_node","cor/custom_allocation/index.html#cmc_alloc_node_default","cor/custom_allocation/index.html#example","cor/error_codes/index.html#error-codes","cor/error_codes/index.html#cmc_flags","cor/error_codes/index.html#cmc_flags_to_str","cor/error_codes/index.html#example","cor/functions_table/index.html#functions-table","cor/functions_table/index.html#cmp","cor/functions_table/index.html#cpy","cor/functions_table/index.html#str","cor/functions_table/index.html#free","cor/functions_table/index.html#hash","cor/functions_table/index.html#pri","cor/iterators/index.html#iterators","cmc/index.html#cmc","cmc/index.html#quick-example","cmc/bitset.h/index.html#bitseth","cmc/bitset.h/index.html#bitset-implementation","cmc/bitset.h/index.html#bitset-generation-macros","cmc/bitset.h/index.html#bitset-structures","cmc/bitset.h/index.html#struct-sname","cmc/bitset.h/index.html#struct-sname_iter","cmc/bitset.h/index.html#cmc_bitset_word","cmc/bitset.h/index.html#callbacks","cmc/bitset.h/index.html#functions-table","cmc/deque.h/index.html#dequeh","cmc/deque.h/index.html#deque-implementation","cmc/deque.h/index.html#deque-generation-macros","cmc/deque.h/index.html#deque-structures","cmc/deque.h/index.html#struct-sname","cmc/deque.h/index.html#struct-sname_fval","cmc/deque.h/index.html#struct-sname_iter","cmc/deque.h/index.html#callbacks","cmc/deque.h/index.html#functions-table","cmc/deque.h/functions.html#index","cmc/deque.h/functions.html#_new","cmc/deque.h/functions.html#_new_custom","dev/index.html#dev","sac/index.html#sac","sac/index.html#cmc-vs-sac","utl/index.html#utl","utl/index.html#contents","utl/assert.h/index.html#asserth","utl/assert.h/index.html#printed-messages","utl/assert.h/index.html#cmc_assert_state","utl/assert.h/index.html#dtype","utl/assert.h/overview.html#overview","utl/assert.h/overview.html#single-value-assertion-macros","utl/assert.h/overview.html#array-assertion-macros","utl/assert.h/valued_assertions.html#valued-assertion-macros","utl/assert.h/valued_assertions.html#contents","utl/assert.h/valued_assertions.html#cmc_assert","utl/assert.h/valued_assertions.html#cmc_assert_equals","utl/assert.h/valued_assertions.html#cmc_assert_not_equals","utl/assert.h/valued_assertions.html#cmc_assert_greater","utl/assert.h/valued_assertions.html#cmc_assert_greater_equals","utl/assert.h/valued_assertions.html#cmc_assert_lesser","utl/assert.h/valued_assertions.html#cmc_assert_lesser_equals","utl/assert.h/valued_assertions.html#cmc_assert_in_range","utl/assert.h/valued_assertions.html#cmc_assert_not_in_range","utl/assert.h/generic_assertions.html#generic-assertion-macros","utl/assert.h/generic_assertions.html#contents","utl/assert.h/generic_assertions.html#cmc_assert_array_equals_any","utl/assert.h/generic_assertions.html#cmc_assert_array_within_any","utl/assert.h/generic_assertions.html#cmc_assert_array_outside_any","utl/assert.h/generic_assertions.html#cmc_assert_array_sorted_any","utl/foreach.h/index.html#foreachh","utl/foreach.h/index.html#cmc_foreach","utl/foreach.h/index.html#cmc_foreach_rev","utl/foreach.h/index.html#example","utl/futils.h/index.html#futilsh","utl/log.h/index.html#logh","utl/log.h/index.html#cmc_log_type","utl/log.h/index.html#cmc_log_color","utl/log.h/log_functions.html#log-functions","utl/log.h/log_functions.html#cmc_log_trace","utl/log.h/log_functions.html#cmc_log_debug","utl/log.h/log_functions.html#cmc_log_info","utl/log.h/log_functions.html#cmc_log_warn","utl/log.h/log_functions.html#cmc_log_error","utl/log.h/log_functions.html#cmc_log_fatal","utl/log.h/configuration.html#configuration","utl/log.h/configuration.html#cmc_log_config","utl/log.h/configuration.html#log-level","utl/log.h/meanings.html#meanings","utl/test.h/index.html#testh","utl/test.h/index.htmLine truncated
-2
View File
@@ -81,8 +81,6 @@
overflow-x: auto;
background: #1d1f21;
color: #c5c8c6;
padding: 0.5em;
-webkit-text-size-adjust: none;
}
.coffeescript .javascript,
+60 -83
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Generic Assertions - C Macro Collections</title>
<title>Generic Assertions - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html" class="active"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html" class="active"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,15 +142,15 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#generic-assertion-macros" id="generic-assertion-macros">Generic Assertion Macros</a></h1>
<h2><a class="header" href="#contents" id="contents">Contents</a></h2>
<h1 id="generic-assertion-macros"><a class="header" href="#generic-assertion-macros">Generic Assertion Macros</a></h1>
<h2 id="contents"><a class="header" href="#contents">Contents</a></h2>
<ul>
<li><a href="#cmc_assert_array_equals_any">cmc_assert_array_equals_any</a></li>
<li><a href="#cmc_assert_array_within_any">cmc_assert_array_within_any</a></li>
<li><a href="#cmc_assert_array_outside_any">cmc_assert_array_outside_any</a></li>
<li><a href="#cmc_assert_array_sorted_any">cmc_assert_array_sorted_any</a></li>
</ul>
<h2><a class="header" href="#cmc_assert_array_equals_any" id="cmc_assert_array_equals_any">cmc_assert_array_equals_any</a></h2>
<h2 id="cmc_assert_array_equals_any"><a class="header" href="#cmc_assert_array_equals_any">cmc_assert_array_equals_any</a></h2>
<p>Assert that two arrays are equal element by element. <code>from_index</code> and <code>to_index</code> are both inclusive.</p>
<pre><code class="language-c">#define cmc_assert_array_equals_any(dtype, array1, array2, comparator, \
from_index, to_index)
@@ -169,7 +163,7 @@
<li><code>from_index</code> - First index from both arrays to compare (inclusive)</li>
<li><code>to_index</code> - Last index from both arrays to compare (inclusive)</li>
</ul>
<h2><a class="header" href="#cmc_assert_array_within_any" id="cmc_assert_array_within_any">cmc_assert_array_within_any</a></h2>
<h2 id="cmc_assert_array_within_any"><a class="header" href="#cmc_assert_array_within_any">cmc_assert_array_within_any</a></h2>
<p>Assert that each element in the array are within a certain boundary. Both ends are inclusive.</p>
<pre><code class="language-c">#define cmc_assert_array_within_any(dtype, array, comparator, lower_bound, \
upper_bound, from_index, to_index)
@@ -183,7 +177,7 @@
<li><code>from_index</code> - First index from the array to compare (inclusive)</li>
<li><code>to_index</code> - Last index from the array to compare (inclusive)</li>
</ul>
<h2><a class="header" href="#cmc_assert_array_outside_any" id="cmc_assert_array_outside_any">cmc_assert_array_outside_any</a></h2>
<h2 id="cmc_assert_array_outside_any"><a class="header" href="#cmc_assert_array_outside_any">cmc_assert_array_outside_any</a></h2>
<p>Assert that each element in the array are outside of a certain boundary. Both ends are inclusive.</p>
<pre><code class="language-c">#define cmc_assert_array_outside_any(dtype, array, comparator, lower_bound, \
upper_bound, from_index, to_index)
@@ -197,7 +191,7 @@
<li><code>from_index</code> - First index from the array to compare (inclusive)</li>
<li><code>to_index</code> - Last index from the array to compare (inclusive)</li>
</ul>
<h2><a class="header" href="#cmc_assert_array_sorted_any" id="cmc_assert_array_sorted_any">cmc_assert_array_sorted_any</a></h2>
<h2 id="cmc_assert_array_sorted_any"><a class="header" href="#cmc_assert_array_sorted_any">cmc_assert_array_sorted_any</a></h2>
<p>Asserts that an array is sorted.</p>
<pre><code class="language-c">#define cmc_assert_array_sorted_any(dtype, array, comparator, from_index, \
to_index)
@@ -214,17 +208,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/assert.h/valued_assertions.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/foreach.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -232,49 +222,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/assert.h/valued_assertions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/assert.h/valued_assertions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/foreach.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/foreach.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+58 -81
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>assert.h - C Macro Collections</title>
<title>assert.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html" class="active"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html" class="active"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,14 +142,14 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#asserth" id="asserth">assert.h</a></h1>
<h1 id="asserth"><a class="header" href="#asserth">assert.h</a></h1>
<p>Definition of many typed non-abortive assertions. Every assertion that fails will print a message to <code>stderr</code> but will not abort the program execution. The macro parameters are first assigned to a temporary variable of the specified <code>dtype</code> in order to generate warnings from the compiler in case of type mismatch.</p>
<p>The advantage of these typed macros is that when an assertion fails, it is possible to print to <code>stderr</code> the actual value that was passed to the function and check the expected result(s) all in one message.</p>
<p>There are assertions that work with <a href="valued_assertions.html">predefined values</a> and others that work with <a href="generic_assertions.html">generic values</a>. Valued assertions work with a selected list of <code>dtype</code> (see further below), while the generic assertions work with any data type.</p>
<p>The macro parameters can be an <em>lvalue</em> or an <em>rvalue</em> because the parameters will be first assigned to local variables of the selected data type. Then, these local variables will be tested for whichever test that needs to be checked.</p>
<p>Assigning the macro parameter to a local variable can be useful. These local variables will be of type <code>dtype</code> and if the parameters don't match that type a warning will pop up.</p>
<p>Ever assertion is inside a block of <code>do { } while (0)</code>.</p>
<h2><a class="header" href="#printed-messages" id="printed-messages">Printed Messages</a></h2>
<h2 id="printed-messages"><a class="header" href="#printed-messages">Printed Messages</a></h2>
<p>Whenever an assertion fails, a message will be printed to <code>stderr</code>. The message will look something like this:</p>
<pre><code>Assertion Failed at FILE:FUNCTION:LINE for { ACTUAL }: DETAILS
</code></pre>
@@ -177,12 +171,12 @@ int main(void)
</code></pre>
<p>This will print the following message:</p>
<p><code>Assertion Failed at main.c:is_one_hundred:5 for { variable }: Expected: 100 Actual: 9</code></p>
<h2><a class="header" href="#cmc_assert_state" id="cmc_assert_state">cmc_assert_state</a></h2>
<h2 id="cmc_assert_state"><a class="header" href="#cmc_assert_state">cmc_assert_state</a></h2>
<p>This is a global variable that can be used to test if all assertions passed. If any assertion fails, this variable will be set to <code>false</code>. If an assertion passes this variable will <strong>not</strong> be set back to <code>true</code>. If you wish to, you can set the state back to <code>true</code> manually.</p>
<pre><code class="language-c">static bool cmc_assert_state = true;
</code></pre>
<p>This variable is used in <a href="../test.h/index.html">test.h</a> utility to automatically pass or fail a unit test. Once the unit test finishes, this variable is set back to <code>true</code> so that another unit test may follow.</p>
<h2><a class="header" href="#dtype" id="dtype">dtype</a></h2>
<h2 id="dtype"><a class="header" href="#dtype">dtype</a></h2>
<p>These are the data types supported by the Valued Assertion macros:</p>
<ul>
<li><code>int8_t</code></li>
@@ -211,17 +205,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/assert.h/overview.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -229,49 +219,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/assert.h/overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/assert.h/overview.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+57 -80
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Overview - C Macro Collections</title>
<title>Overview - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html" class="active"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html" class="active"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,8 +142,8 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#overview" id="overview">Overview</a></h1>
<h2><a class="header" href="#single-value-assertion-macros" id="single-value-assertion-macros">Single Value Assertion Macros</a></h2>
<h1 id="overview"><a class="header" href="#overview">Overview</a></h1>
<h2 id="single-value-assertion-macros"><a class="header" href="#single-value-assertion-macros">Single Value Assertion Macros</a></h2>
<ul>
<li><strong>cmc_assert</strong> - Asserts that an expression evaluates to true;</li>
<li><strong>cmc_assert_equals</strong> - Asserts that a value from type <code>dtype</code> equals another;</li>
@@ -161,7 +155,7 @@
<li><strong>cmc_assert_in_range</strong> - Asserts that a value from type <code>dtpype</code> is within a certain range;</li>
<li><strong>cmc_assert_not_in_range</strong> - Asserts that a value from type <code>dtpype</code> is outside of a certain range.</li>
</ul>
<h2><a class="header" href="#array-assertion-macros" id="array-assertion-macros">Array Assertion Macros</a></h2>
<h2 id="array-assertion-macros"><a class="header" href="#array-assertion-macros">Array Assertion Macros</a></h2>
<ul>
<li><strong>cmc_assert_array_equals_any</strong> - Assert that two arrays are equal element by element;</li>
<li><strong>cmc_assert_array_within_any</strong> - Assert that each element in the array are within a bounds;</li>
@@ -173,17 +167,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/assert.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/assert.h/valued_assertions.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -191,49 +181,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/assert.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/assert.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/assert.h/valued_assertions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/assert.h/valued_assertions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+65 -88
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Valued Assertions - C Macro Collections</title>
<title>Valued Assertions - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html" class="active"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html" class="active"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,8 +142,8 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#valued-assertion-macros" id="valued-assertion-macros">Valued Assertion Macros</a></h1>
<h2><a class="header" href="#contents" id="contents">Contents</a></h2>
<h1 id="valued-assertion-macros"><a class="header" href="#valued-assertion-macros">Valued Assertion Macros</a></h1>
<h2 id="contents"><a class="header" href="#contents">Contents</a></h2>
<ul>
<li><a href="#cmc_assert">cmc_assert</a></li>
<li><a href="#cmc_assert_equals">cmc_assert_equals</a></li>
@@ -161,7 +155,7 @@
<li><a href="#cmc_assert_in_range">cmc_assert_in_range</a></li>
<li><a href="#cmc_assert_not_in_range">cmc_assert_not_in_range</a></li>
</ul>
<h2><a class="header" href="#cmc_assert" id="cmc_assert">cmc_assert</a></h2>
<h2 id="cmc_assert"><a class="header" href="#cmc_assert">cmc_assert</a></h2>
<p>Asserts that an <code>expression</code> evaluates to <code>true</code>.</p>
<pre><code class="language-c">#define cmc_assert(expression)
</code></pre>
@@ -169,7 +163,7 @@
<ul>
<li><code>expression</code> - An expression that needs to be evaluated to true.</li>
</ul>
<h2><a class="header" href="#cmc_assert_equals" id="cmc_assert_equals">cmc_assert_equals</a></h2>
<h2 id="cmc_assert_equals"><a class="header" href="#cmc_assert_equals">cmc_assert_equals</a></h2>
<p>Asserts that a value equals another expected value.</p>
<pre><code class="language-c">#define cmc_assert_equals(dtype, expected, actual)
</code></pre>
@@ -179,7 +173,7 @@
<li><code>expected</code> - The expected value for this assertion</li>
<li><code>actual</code> - A variant that is checked against the expected value</li>
</ul>
<h2><a class="header" href="#cmc_assert_not_equals" id="cmc_assert_not_equals">cmc_assert_not_equals</a></h2>
<h2 id="cmc_assert_not_equals"><a class="header" href="#cmc_assert_not_equals">cmc_assert_not_equals</a></h2>
<p>Asserts that a value does not equal another.</p>
<pre><code class="language-c">#define cmc_assert_not_equals(dtype, not_expected, actual)
</code></pre>
@@ -189,7 +183,7 @@
<li><code>not_expected</code> - The value that is not expected for this assertion</li>
<li><code>actual</code> - A variant that is checked against the not expected value</li>
</ul>
<h2><a class="header" href="#cmc_assert_greater" id="cmc_assert_greater">cmc_assert_greater</a></h2>
<h2 id="cmc_assert_greater"><a class="header" href="#cmc_assert_greater">cmc_assert_greater</a></h2>
<p>Asserts that a value is above a certain lower boundary.</p>
<pre><code class="language-c">#define cmc_assert_greater(dtype, boundary, actual)
</code></pre>
@@ -198,7 +192,7 @@
<li><code>boundary</code> - The expected lowest possible value (excluded)</li>
<li><code>actual</code> - A variant that is checked against the boundary value</li>
</ul>
<h2><a class="header" href="#cmc_assert_greater_equals" id="cmc_assert_greater_equals">cmc_assert_greater_equals</a></h2>
<h2 id="cmc_assert_greater_equals"><a class="header" href="#cmc_assert_greater_equals">cmc_assert_greater_equals</a></h2>
<p>Asserts that a value is above a certain lower boundary or equal to it.</p>
<pre><code class="language-c">#define cmc_assert_greater_equals(dtype, boundary, actual)
</code></pre>
@@ -207,7 +201,7 @@
<li><code>boundary</code> - The expected lowest possible value (included)</li>
<li><code>actual</code> - A variant that is checked against the boundary value</li>
</ul>
<h2><a class="header" href="#cmc_assert_lesser" id="cmc_assert_lesser">cmc_assert_lesser</a></h2>
<h2 id="cmc_assert_lesser"><a class="header" href="#cmc_assert_lesser">cmc_assert_lesser</a></h2>
<p>Asserts that a value is below a certain upper boundary.</p>
<pre><code class="language-c">#define cmc_assert_lesser(dtype, boundary, actual)
</code></pre>
@@ -216,7 +210,7 @@
<li><code>boundary</code> - The expected highest possible value (excluded)</li>
<li><code>actual</code> - A variant that is checked against the boundary value</li>
</ul>
<h2><a class="header" href="#cmc_assert_lesser_equals" id="cmc_assert_lesser_equals">cmc_assert_lesser_equals</a></h2>
<h2 id="cmc_assert_lesser_equals"><a class="header" href="#cmc_assert_lesser_equals">cmc_assert_lesser_equals</a></h2>
<p>Asserts that a value is below a certain upper boundary or equal to it.</p>
<pre><code class="language-c">#define cmc_assert_lesser_equals(dtype, boundary, actual)
</code></pre>
@@ -225,7 +219,7 @@
<li><code>boundary</code> - The expected highest possible value (excluded)</li>
<li><code>actual</code> - A variant that is checked against the boundary value</li>
</ul>
<h2><a class="header" href="#cmc_assert_in_range" id="cmc_assert_in_range">cmc_assert_in_range</a></h2>
<h2 id="cmc_assert_in_range"><a class="header" href="#cmc_assert_in_range">cmc_assert_in_range</a></h2>
<p>Asserts that a value is within a certain range. Range is inclusive on both ends.</p>
<pre><code class="language-c">#define cmc_assert_in_range(dtype, lower_bound, upper_bound, actual)
</code></pre>
@@ -235,7 +229,7 @@
<li><code>upper_bound</code> - Highest value of the expected range</li>
<li><code>actual</code> - A variant that is checked against lower and upper boundaries value</li>
</ul>
<h2><a class="header" href="#cmc_assert_not_in_range" id="cmc_assert_not_in_range">cmc_assert_not_in_range</a></h2>
<h2 id="cmc_assert_not_in_range"><a class="header" href="#cmc_assert_not_in_range">cmc_assert_not_in_range</a></h2>
<p>Asserts that a value is not within a certain range. Range is inclusive on both ends.</p>
<pre><code class="language-c">#define cmc_assert_not_in_range(dtype, lower_bound, upper_bound, actual)
</code></pre>
@@ -250,17 +244,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/assert.h/overview.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/assert.h/generic_assertions.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -268,49 +258,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/assert.h/overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/assert.h/overview.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/assert.h/generic_assertions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/assert.h/generic_assertions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+58 -81
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>foreach.h - C Macro Collections</title>
<title>foreach.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html" class="active"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html" class="active"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,13 +142,13 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#foreachh" id="foreachh">foreach.h</a></h1>
<h1 id="foreachh"><a class="header" href="#foreachh">foreach.h</a></h1>
<p>For-Each macros. Since doing a for loop with iterators can be a lot to write, these macros solve that problem. There are two of them:</p>
<ul>
<li><code>CMC_FOREACH</code> - Goes from the beginning of a Collection to the end</li>
<li><code>CMC_FOREAC_REV</code> - Goes from the end of a Collection to the beginning</li>
</ul>
<h2><a class="header" href="#cmc_foreach" id="cmc_foreach">CMC_FOREACH</a></h2>
<h2 id="cmc_foreach"><a class="header" href="#cmc_foreach">CMC_FOREACH</a></h2>
<pre><code class="language-c">#define CMC_FOREACH(PFX, SNAME, ITERNAME, TARGET)
</code></pre>
<ul>
@@ -163,7 +157,7 @@
<li><code>ITERNAME</code> - Iterator variable name</li>
<li><code>TARGET</code> - Target collection variable name</li>
</ul>
<h2><a class="header" href="#cmc_foreach_rev" id="cmc_foreach_rev">CMC_FOREACH_REV</a></h2>
<h2 id="cmc_foreach_rev"><a class="header" href="#cmc_foreach_rev">CMC_FOREACH_REV</a></h2>
<pre><code class="language-c">#define CMC_FOREACH_REV(PFX, SNAME, ITERNAME, TARGET)
</code></pre>
<ul>
@@ -172,7 +166,7 @@
<li><code>ITERNAME</code> - Iterator variable name</li>
<li><code>TARGET</code> - Target collection variable name</li>
</ul>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &quot;cmc/list.h&quot;
#include &quot;utl/foreach.h&quot;
@@ -206,17 +200,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/assert.h/generic_assertions.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/futils.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -224,49 +214,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/assert.h/generic_assertions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/assert.h/generic_assertions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/futils.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/futils.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+67 -90
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>futils.h - C Macro Collections</title>
<title>futils.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html" class="active"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html" class="active"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,10 +142,10 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#futilsh" id="futilsh">futils.h</a></h1>
<h1 id="futilsh"><a class="header" href="#futilsh">futils.h</a></h1>
<p>Contains common functions that can be used by Functions Table, instead of writing another one every time.</p>
<p>A quick list of functions present in this file:</p>
<table><thead><tr><th>cmp</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>cmp</th></tr></thead><tbody>
<tr><td><code>static inline int cmc_i64_cmp(int64_t x1, int64_t x2);</code></td></tr>
<tr><td><code>static inline int cmc_i32_cmp(int32_t x1, int32_t x2);</code></td></tr>
<tr><td><code>static inline int cmc_i16_cmp(int16_t x1, int16_t x2);</code></td></tr>
@@ -167,14 +161,14 @@
<tr><td><code>static inline int cmc_double_cmp(double x1, double x2);</code></td></tr>
<tr><td><code>static inline int cmc_str_cmp(char *ch1, char *ch2);</code></td></tr>
</tbody></table>
</div><br>
<br>
<br>
<table><thead><tr><th>cpy</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>cpy</th></tr></thead><tbody>
<tr><td><code>static inline char *cmc_str_cpy(char *str);</code></td></tr>
</tbody></table>
</div><br>
<br>
<br>
<table><thead><tr><th>str</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>str</th></tr></thead><tbody>
<tr><td><code>static inline bool cmc_i8_str(FILE *file, int8_t element);</code></td></tr>
<tr><td><code>static inline bool cmc_i16_str(FILE *file, int16_t element);</code></td></tr>
<tr><td><code>static inline bool cmc_i32_str(FILE *file, int32_t element);</code></td></tr>
@@ -190,13 +184,13 @@
<tr><td><code>static inline bool cmc_double_str(FILE *file, double element);</code></td></tr>
<tr><td><code>static inline bool cmc_str_str(FILE *file, char *element);</code></td></tr>
</tbody></table>
</div><br>
<br>
<br>
<table><thead><tr><th>free</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>free</th></tr></thead><tbody>
</tbody></table>
</div><br>
<br>
<br>
<table><thead><tr><th>hash</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>hash</th></tr></thead><tbody>
<tr><td><code>static inline size_t cmc_i64_hash(int64_t e);</code></td></tr>
<tr><td><code>static inline size_t cmc_i32_hash(int32_t e);</code></td></tr>
<tr><td><code>static inline size_t cmc_i16_hash(int16_t e);</code></td></tr>
@@ -218,26 +212,22 @@
<tr><td><code>static inline size_t cmc_i64_hash_mix(int64_t element);</code></td></tr>
<tr><td><code>static inline size_t cmc_u64_hash_mix(uint64_t element);</code></td></tr>
</tbody></table>
</div><br>
<br>
<br>
<table><thead><tr><th>pri</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>pri</th></tr></thead><tbody>
</tbody></table>
</div>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/foreach.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/log.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -245,49 +235,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/foreach.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/foreach.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/log.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/log.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+56 -79
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>utl - C Macro Collections</title>
<title>utl - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../favicon.svg">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../css/variables.css">
<link rel="stylesheet" href="../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../utl/index.html" class="active"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../utl/index.html" class="active"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="chapter-item expanded "><a href="../utlLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,9 +142,9 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#utl" id="utl">UTL</a></h1>
<h1 id="utl"><a class="header" href="#utl">UTL</a></h1>
<p>Inside the <code>./utl/</code> folder there are many utility functions and macros that can be extensively used with the C Macro Collections library. Most of these utilities can be used without the main library.</p>
<h2><a class="header" href="#contents" id="contents">Contents</a></h2>
<h2 id="contents"><a class="header" href="#contents">Contents</a></h2>
<ul>
<li><a href="assert.h/index.html">assert.h</a> - Non-abortive assert macros</li>
<li><a href="foreach.h/index.html">foreach.h</a> - For Each macros</li>
@@ -164,17 +158,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../sac/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../utl/assert.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -182,49 +172,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../sac/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../sac/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../utl/assert.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../utl/assert.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../elasticlunr.min.js"></script>
<script src="../mark.min.js"></script>
<script src="../searcher.js"></script>
<script src="../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../clipboard.min.js"></script>
<script src="../highlight.js"></script>
<script src="../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+57 -80
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Configuration - C Macro Collections</title>
<title>Configuration - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html" class="active"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html" class="active"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,8 +142,8 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#configuration" id="configuration">Configuration</a></h1>
<h2><a class="header" href="#cmc_log_config" id="cmc_log_config">cmc_log_config</a></h2>
<h1 id="configuration"><a class="header" href="#configuration">Configuration</a></h1>
<h2 id="cmc_log_config"><a class="header" href="#cmc_log_config">cmc_log_config</a></h2>
<p>This is an anonymous static <code>struct</code> that can be directly modified to change logging levels, enable or disable output or change file output.</p>
<pre><code class="language-c">static struct
{
@@ -171,7 +165,7 @@
<li><code>FILE *file</code> - File for output</li>
</ul>
<p>This configuration is global to every log. The <code>FILE</code> pointer is not handled by the API and needs to be able to write to the file.</p>
<h2><a class="header" href="#log-level" id="log-level">Log Level</a></h2>
<h2 id="log-level"><a class="header" href="#log-level">Log Level</a></h2>
<p>By tuning <code>tlevel</code> and <code>flevel</code> (both accessed from <code>cmc_log_config</code>) you can filter which log messages are printed or not.</p>
<ul>
<li>If the log level is <code>0</code>, all logs are enabled</li>
@@ -214,17 +208,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/log.h/log_functions.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/log.h/meanings.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -232,49 +222,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/log.h/log_functions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/log.h/log_functions.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/log.h/meanings.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/log.h/meanings.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+57 -80
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>log.h - C Macro Collections</title>
<title>log.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html" class="active"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html" class="active"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,9 +142,9 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#logh" id="logh">log.h</a></h1>
<h1 id="logh"><a class="header" href="#logh">log.h</a></h1>
<p>Simple and customizable logging macros. Messages can have a custom logging level and a custom file output. This customization can be done via the global variable <a href="configuration.html#cmc_log_config"><code>cmc_log_config</code></a>. Logs are outputted to <code>stderr</code>.</p>
<h2><a class="header" href="#cmc_log_type" id="cmc_log_type">cmc_log_type</a></h2>
<h2 id="cmc_log_type"><a class="header" href="#cmc_log_type">cmc_log_type</a></h2>
<p>Defines the possible Log Levels. These are used to categorize log messages. The higher the number, the more severe or important that message is. Check out <a href="meanings.html">here</a></p>
<pre><code class="language-c">enum cmc_log_type
{
@@ -162,24 +156,20 @@
CMC_LOG_FATAL = 6
};
</code></pre>
<h2><a class="header" href="#cmc_log_color" id="cmc_log_color">CMC_LOG_COLOR</a></h2>
<h2 id="cmc_log_color"><a class="header" href="#cmc_log_color">CMC_LOG_COLOR</a></h2>
<p>If this macro is defined, logging will be outputted with <a href="https://en.wikipedia.org/wiki/ANSI_escape_code#Colors">ANSI color escape codes</a>. If you are logging into a file, these escape codes are not printed.</p>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/futils.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/log.h/log_functions.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -187,49 +177,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/futils.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/futils.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/log.h/log_functions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/log.h/log_functions.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+61 -84
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Log Functions - C Macro Collections</title>
<title>Log Functions - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html" class="active"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html" class="active"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,8 +142,8 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#log-functions" id="log-functions">Log Functions</a></h1>
<h2><a class="header" href="#cmc_log_trace" id="cmc_log_trace">cmc_log_trace</a></h2>
<h1 id="log-functions"><a class="header" href="#log-functions">Log Functions</a></h1>
<h2 id="cmc_log_trace"><a class="header" href="#cmc_log_trace">cmc_log_trace</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_TRACE</code>.</p>
<pre><code class="language-c">#define cmc_log_trace(fmt, ...)
</code></pre>
@@ -157,7 +151,7 @@
<li><code>fmt</code> - A string that contains a text to be written that may contain format specifiers</li>
<li><code>...</code> - Optional. Values to be formatted into the string that will be printed</li>
</ul>
<h2><a class="header" href="#cmc_log_debug" id="cmc_log_debug">cmc_log_debug</a></h2>
<h2 id="cmc_log_debug"><a class="header" href="#cmc_log_debug">cmc_log_debug</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_DEBUG</code>.</p>
<pre><code class="language-c">#define cmc_log_debug(fmt, ...)
</code></pre>
@@ -165,7 +159,7 @@
<li><code>fmt</code> - A string that contains a text to be written that may contain format specifiers</li>
<li><code>...</code> - Optional. Values to be formatted into the string that will be printed</li>
</ul>
<h2><a class="header" href="#cmc_log_info" id="cmc_log_info">cmc_log_info</a></h2>
<h2 id="cmc_log_info"><a class="header" href="#cmc_log_info">cmc_log_info</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_INFO</code>.</p>
<pre><code class="language-c">#define cmc_log_info(fmt, ...)
</code></pre>
@@ -173,7 +167,7 @@
<li><code>fmt</code> - A string that contains a text to be written that may contain format specifiers</li>
<li><code>...</code> - Optional. Values to be formatted into the string that will be printed</li>
</ul>
<h2><a class="header" href="#cmc_log_warn" id="cmc_log_warn">cmc_log_warn</a></h2>
<h2 id="cmc_log_warn"><a class="header" href="#cmc_log_warn">cmc_log_warn</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_WARN</code>.</p>
<pre><code class="language-c">#define cmc_log_warn(fmt, ...)
</code></pre>
@@ -181,7 +175,7 @@
<li><code>fmt</code> - A string that contains a text to be written that may contain format specifiers</li>
<li><code>...</code> - Optional. Values to be formatted into the string that will be printed</li>
</ul>
<h2><a class="header" href="#cmc_log_error" id="cmc_log_error">cmc_log_error</a></h2>
<h2 id="cmc_log_error"><a class="header" href="#cmc_log_error">cmc_log_error</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_ERROR</code>.</p>
<pre><code class="language-c">#define cmc_log_error(fmt, ...)
</code></pre>
@@ -189,7 +183,7 @@
<li><code>fmt</code> - A string that contains a text to be written that may contain format specifiers</li>
<li><code>...</code> - Optional. Values to be formatted into the string that will be printed</li>
</ul>
<h2><a class="header" href="#cmc_log_fatal" id="cmc_log_fatal">cmc_log_fatal</a></h2>
<h2 id="cmc_log_fatal"><a class="header" href="#cmc_log_fatal">cmc_log_fatal</a></h2>
<p>Defines a message with a Log Level of <code>CMC_LOG_FATAL</code>.</p>
<pre><code class="language-c">#define cmc_log_fatal(fmt, ...)
</code></pre>
@@ -202,17 +196,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/log.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/log.h/configuration.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -220,49 +210,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/log.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/log.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/log.h/configuration.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/log.h/configuration.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+55 -78
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Meanings - C Macro Collections</title>
<title>Meanings - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html" class="active"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html" class="active"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#meanings" id="meanings">Meanings</a></h1>
<h1 id="meanings"><a class="header" href="#meanings">Meanings</a></h1>
<p>What does each Log Level means? It depends on the application. In here you will read more about how the C Macro Collections library uses each of these Log Levels, but this does not mean you should use them like described.</p>
<ul>
<li><strong>TRACE</strong> - Trace is used to describe the inner workings of a function or an algorithm. These messages can be used extensively, meaning that their content is probably not very useful, even for debugging.</li>
@@ -163,17 +157,13 @@
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/log.h/configuration.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/test.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -181,49 +171,36 @@
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/log.h/configuration.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/log.h/configuration.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/test.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/test.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+61 -84
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>test.h - C Macro Collections</title>
<title>test.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html" class="active"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html" class="active"><strLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,7 +142,7 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#testh" id="testh">test.h</a></h1>
<h1 id="testh"><a class="header" href="#testh">test.h</a></h1>
<p>A simple <a href="https://en.wikipedia.org/wiki/Unit_testing">Unit Test</a> utility used by the C Macro Collections Library. It has two main components: a Unit and a Test.</p>
<p>This utility uses two other libraries defined in the C Macro Collections library:</p>
<ul>
@@ -157,7 +151,7 @@
</ul>
<p>When a test is created inside a unit, it will first set the global variable <a href="../assert.h/index.html#cmc_assert_state"><code>cmc_assert_state</code></a> to <code>true</code>. Then, inside the test you can use the assertions provided by the <code>assert.h</code> library to pass or fail a unit test automatically. By the end of a test the variable will be checked. If <code>false</code> it means that a certain assertion failed.</p>
<p>The runtime of each Unit Test is calculated using the <code>timer.h</code> library.</p>
<h2><a class="header" href="#cmc_create_unit" id="cmc_create_unit">CMC_CREATE_UNIT</a></h2>
<h2 id="cmc_create_unit"><a class="header" href="#cmc_create_unit">CMC_CREATE_UNIT</a></h2>
<p>Creates a Unit that can contain tests.</p>
<pre><code class="language-c">#define CMC_CREATE_UNIT(UNAME, VERBOSE, BODY)
</code></pre>
@@ -166,7 +160,7 @@
<li><code>VERBOSE</code> - Either <code>true</code> or <code>false</code>. If <code>true</code>, prints every message of <code>PASSED</code> or <code>FAILED</code> from each test</li>
<li><code>BODY</code> - A block of code containing tests</li>
</ul>
<h2><a class="header" href="#cmc_create_test" id="cmc_create_test">CMC_CREATE_TEST</a></h2>
<h2 id="cmc_create_test"><a class="header" href="#cmc_create_test">CMC_CREATE_TEST</a></h2>
<p>Creates a test within a unit. This macro can only be used inside the <code>BODY</code> of a <code>CMC_CREATE_UNIT</code> since it uses local variables allocated by the latter.</p>
<pre><code class="language-c">#define CMC_CREATE_TEST(TNAME, BODY)
</code></pre>
@@ -175,11 +169,11 @@
<li><code>BODY</code> - A block of code containing the test itself</li>
</ul>
<p>Inside a test you can use the assertions from <code>assert.h</code> to automatically pass or fail a test.</p>
<h2><a class="header" href="#cmc_test_abort" id="cmc_test_abort">CMC_TEST_ABORT</a></h2>
<h2 id="cmc_test_abort"><a class="header" href="#cmc_test_abort">CMC_TEST_ABORT</a></h2>
<p>Aborts a unit test. This will jump to a <code>goto</code> located at the end of the Unit Test. Must be called inside a <code>CMC_CREATE_TEST</code>.</p>
<pre><code class="language-c">#define CMC_TEST_ABORT()
</code></pre>
<h2><a class="header" href="#cmc_test_info" id="cmc_test_info">cmc_test_info</a></h2>
<h2 id="cmc_test_info"><a class="header" href="#cmc_test_info">cmc_test_info</a></h2>
<p>Contains information about a Unit Test. Used internally.</p>
<pre><code class="language-c">struct cmc_test_info
{
@@ -201,9 +195,9 @@
<li><code>bool aborted</code> - If the unit test was aborted</li>
<li><code>bool verbose</code> - Information about each test is displayed</li>
</ul>
<h2><a class="header" href="#cmc_test_color" id="cmc_test_color">CMC_TEST_COLOR</a></h2>
<h2 id="cmc_test_color"><a class="header" href="#cmc_test_color">CMC_TEST_COLOR</a></h2>
<p>Define this macro if you wish to have color output from the messages printed by each test. Note that a Unit Test need to have <code>VERBOSE</code> equal to <code>true</code>.</p>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &quot;utl/test.h&quot;
CMC_CREATE_UNIT(check_math, true, {
@@ -249,17 +243,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/log.h/meanings.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../utl/timer.h/index.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -267,49 +257,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/log.h/meanings.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/log.h/meanings.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../utl/timer.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../utl/timer.h/index.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+59 -82
View File
@@ -3,14 +3,16 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>timer.h - C Macro Collections</title>
<title>timer.h - CMC Docs</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
<link rel="icon" href="../../favicon.svg">
<link rel="shortcut icon" href="../../favicon.png">
<link rel="stylesheet" href="../../css/variables.css">
<link rel="stylesheet" href="../../css/general.css">
@@ -19,8 +21,7 @@
<!-- Fonts -->
<link rel="stylesheet" href="../../FontAwesome/css/font-awesome.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../../fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="../../highlight.css">
@@ -28,19 +29,18 @@
<link rel="stylesheet" href="../../ayu-highlight.css">
<!-- Custom theme stylesheets -->
</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "../../";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "light" : "light";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
@@ -56,7 +56,7 @@
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
@@ -68,7 +68,7 @@
</script>
<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
if (document.body.clientWidth >= 1080) {
@@ -80,8 +80,8 @@
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div id="sidebar-scrollbox" class="sidebar-scrollbox">
<ol class="chapter"><li class="expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="expanded "><a href="../../utl/test.h/index.html"><strong aria-hidden="true">7.5.</strong> test.h</a></li><li class="expanded "><a href="../../utl/timer.h/index.html" class="active"><strong aria-hidden="true">7.6.</strong> timer.h</a></li></ol></li><li class="expanded "><a href="../../Examples/examples.html"><strong aria-hidden="true">8.</strong> Examples</a></li></ol>
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded "><a href="../../Introduction/introduction.html"><strong aria-hidden="true">1.</strong> Introduction</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Introduction/why_this_library.html"><strong aria-hidden="true">1.1.</strong> Why this library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_install.html"><strong aria-hidden="true">1.2.</strong> How to install</a></li><li class="chapter-item expanded "><a href="../../Introduction/library_structure.html"><strong aria-hidden="true">1.3.</strong> Library structure</a></li><li class="chapter-item expanded "><a href="../../Introduction/understanding_the_library.html"><strong aria-hidden="true">1.4.</strong> Understanding the library</a></li><li class="chapter-item expanded "><a href="../../Introduction/how_to_use_the_library.html"><strong aria-hidden="true">1.5.</strong> How to use the library</a></li></ol></li><li class="chapter-item expanded "><a href="../../Overview/index.html"><strong aria-hidden="true">2.</strong> Overview</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../Overview/collections_overview.html"><strong aria-hidden="true">2.1.</strong> Collections Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/features_overview.html"><strong aria-hidden="true">2.2.</strong> Features Overview</a></li><li class="chapter-item expanded "><a href="../../Overview/files_overview.html"><strong aria-hidden="true">2.3.</strong> Files Overview</a></li></ol></li><li class="chapter-item expanded "><a href="../../cor/index.html"><strong aria-hidden="true">3.</strong> cor</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cor/callbacks/index.html"><strong aria-hidden="true">3.1.</strong> Callbacks</a></li><li class="chapter-item expanded "><a href="../../cor/custom_allocation/index.html"><strong aria-hidden="true">3.2.</strong> Custom allocation</a></li><li class="chapter-item expanded "><a href="../../cor/error_codes/index.html"><strong aria-hidden="true">3.3.</strong> Error Codes</a></li><li class="chapter-item expanded "><a href="../../cor/functions_table/index.html"><strong aria-hidden="true">3.4.</strong> Functions Table</a></li><li class="chapter-item expanded "><a href="../../cor/iterators/index.html"><strong aria-hidden="true">3.5.</strong> Iterators</a></li></ol></li><li class="chapter-item expanded "><a href="../../cmc/index.html"><strong aria-hidden="true">4.</strong> cmc</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/bitset.h/index.html"><strong aria-hidden="true">4.1.</strong> bitset.h</a></li><li class="chapter-item expanded "><a href="../../cmc/deque.h/index.html"><strong aria-hidden="true">4.2.</strong> deque.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../cmc/deque.h/functions.html"><strong aria-hidden="true">4.2.1.</strong> Functions.h</a></li></ol></li></ol></li><li class="chapter-item expanded "><a href="../../dev/index.html"><strong aria-hidden="true">5.</strong> dev</a></li><li class="chapter-item expanded "><a href="../../sac/index.html"><strong aria-hidden="true">6.</strong> sac</a></li><li class="chapter-item expanded "><a href="../../utl/index.html"><strong aria-hidden="true">7.</strong> utl</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/index.html"><strong aria-hidden="true">7.1.</strong> assert.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/assert.h/overview.html"><strong aria-hidden="true">7.1.1.</strong> Overview</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/valued_assertions.html"><strong aria-hidden="true">7.1.2.</strong> Valued Assertions</a></li><li class="chapter-item expanded "><a href="../../utl/assert.h/generic_assertions.html"><strong aria-hidden="true">7.1.3.</strong> Generic Assertions</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/foreach.h/index.html"><strong aria-hidden="true">7.2.</strong> foreach.h</a></li><li class="chapter-item expanded "><a href="../../utl/futils.h/index.html"><strong aria-hidden="true">7.3.</strong> futils.h</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/index.html"><strong aria-hidden="true">7.4.</strong> log.h</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="../../utl/log.h/log_functions.html"><strong aria-hidden="true">7.4.1.</strong> Log Functions</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/configuration.html"><strong aria-hidden="true">7.4.2.</strong> Configuration</a></li><li class="chapter-item expanded "><a href="../../utl/log.h/meanings.html"><strong aria-hidden="true">7.4.3.</strong> Meanings</a></li></ol></li><li class="chapter-item expanded "><a href="../../utl/test.h/index.html"><strong aria-hiddenLine truncated
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>
@@ -89,45 +89,40 @@
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar" class="menu-bar">
<div id="menu-bar-sticky-container">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</button>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">C Macro Collections</h1>
<h1 class="menu-title">CMC Docs</h1>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
<div class="right-buttons">
<a href="../../print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" name="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
@@ -135,10 +130,9 @@
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
@@ -148,9 +142,9 @@
<div id="content" class="content">
<main>
<h1><a class="header" href="#timerh" id="timerh">timer.h</a></h1>
<h1 id="timerh"><a class="header" href="#timerh">timer.h</a></h1>
<p>A very simple library that encapsulates <code>clock()</code> from <code>&lt;time.h&gt;</code>, making life easier.</p>
<h2><a class="header" href="#cmc_timer" id="cmc_timer">cmc_timer</a></h2>
<h2 id="cmc_timer"><a class="header" href="#cmc_timer">cmc_timer</a></h2>
<pre><code class="language-c">struct cmc_timer
{
clock_t start;
@@ -163,21 +157,21 @@
<li><code>clock_t stop</code> - End of timing</li>
<li><code>double result</code> - Result in milliseconds</li>
</ul>
<h2><a class="header" href="#cmc_timer_start" id="cmc_timer_start">cmc_timer_start</a></h2>
<h2 id="cmc_timer_start"><a class="header" href="#cmc_timer_start">cmc_timer_start</a></h2>
<p>Starts the timer by setting <code>start</code> with <code>clock()</code>.</p>
<pre><code class="language-c">#define cmc_timer_start(timer)
</code></pre>
<ul>
<li><code>timer</code> - A <code>struct cmc_timer</code> variable</li>
</ul>
<h2><a class="header" href="#cmc_timer_stop" id="cmc_timer_stop">cmc_timer_stop</a></h2>
<h2 id="cmc_timer_stop"><a class="header" href="#cmc_timer_stop">cmc_timer_stop</a></h2>
<p>Sets the <code>stop</code> variable with <code>clock()</code> and calculates the <code>result</code> in milliseconds.</p>
<pre><code class="language-c">#define cmc_timer_start(timer)
</code></pre>
<ul>
<li><code>timer</code> - A <code>struct cmc_timer</code> variable</li>
</ul>
<h2><a class="header" href="#example" id="example">Example</a></h2>
<h2 id="example"><a class="header" href="#example">Example</a></h2>
<pre><code class="language-c">#include &lt;stdio.h&gt;
#include &quot;utl/timer.h&quot;
@@ -203,17 +197,13 @@ int main(void)
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="../../utl/test.h/index.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next" href="../../Examples/examples.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
@@ -221,49 +211,36 @@ int main(void)
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a href="../../utl/test.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<a rel="prev" href="../../utl/test.h/index.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a href="../../Examples/examples.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<a rel="next" href="../../Examples/examples.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script type="text/javascript">
window.playpen_copyable = true;
<script>
window.playground_copyable = true;
</script>
<script src="../../elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="../../elasticlunr.min.js"></script>
<script src="../../mark.min.js"></script>
<script src="../../searcher.js"></script>
<script src="../../clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="../../book.js" type="text/javascript" charset="utf-8"></script>
<script src="../../clipboard.min.js"></script>
<script src="../../highlight.js"></script>
<script src="../../book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>
+1 -1
View File
@@ -1 +1 @@
book
book
-32
View File
@@ -1,32 +0,0 @@
# Files Overview
An overview of the source files (all `.h`) of the C Macro Collections library.
* `./cmc` - The main C Macro Collections library
* `./bidimap.h` - A bi-directional map based on a hash table
* `./deque.h` - A double-ended queue
* `./hashmap.h` - A map based on a hash table
* `./hashset.h` - A set based on a hash table
* `./heap.h` - A binary heap based on a dynamic array
* `./intervalheap.h` - A heap that is both Min and Max based on a dynamic array
* `./linkedlist.h` - A doubly-linked list
* `./list.h` - A dynamic array
* `./multimap.h` - A map that accepts multiple keys based on a hash table
* `./multiset.h` - A multiset based on a hash table
* `./queue.h` - A FIFO based on a circular dynamic array
* `./sortedlist.h` - A sorted list based on a dynamic array
* `./stack.h` - A LIFO based on a dynamic array
* `./treemap.h` - A sorted map based on an AVL tree
* `./treeset.h` - A sorted set based on an AVL tree
* `./cor` - Core functionalities of the C Macro Collections libraries
* `./core.h` - Core functionalities of the library
* `./hashtable.h` - Common things used by hash table based collections
* `./dev` - A mirror of the main library to be used during development
* `./sac` - Statically Allocated Collections that don't use dynamic allocation
* `./utl` - Utilities
* `./assert.h` - Non-abortive assert macros
* `./foreach.h` - For Each macros
* `./futils.h` - Common functions used by Functions Table
* `./log.h` - Logging utility with levels of severity
* `./test.h` - Simple Unit Test building with macros
* `./test.h` - Timing code execution utility
+6
View File
@@ -0,0 +1,6 @@
[book]
authors = ["Leonardo Vencovsky"]
language = "en"
multilingual = false
src = "src"
title = "CMC Docs"
File renamed without changes.
@@ -4,7 +4,7 @@
<img src="img/logo.png" alt="C Macro Collections Logo" width="300"/>
</p>
<p align="center">Header only, macro generated, generic and type-safe Collections in C.</p>
<p align="center">Easy to use, modular, header only, macro based, generic and type-safe Data Structures in C</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections"><img src="https://img.shields.io/badge/GitHub-C%20Macro%20Collections-2195F3.svg?logo=github" alt="LinkToRepo"/></a>
@@ -13,10 +13,16 @@
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"/></a>
<img src="https://img.shields.io/badge/Version-v0.23.1-orange.svg" alt="Version"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/releases"><img src="https://img.shields.io/badge/Version-v0.26.0-orange.svg" alt="Version"/></a>
<a href="https://travis-ci.org/LeoVen/C-Macro-Collections"><img src="https://travis-ci.org/LeoVen/C-Macro-Collections.svg?branch=master" alt="travis-ci"/></a>
<a href="https://codecov.io/gh/LeoVen/C-Macro-Collections"><img src="https://codecov.io/gh/LeoVen/C-Macro-Collections/branch/master/graph/badge.svg" alt="codecov"/></a>
<img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/>
<a href="https://github.com/LeoVen/C-Macro-Collections/actions"><img src="https://github.com/LeoVen/C-Macro-Collections/workflows/Test%20Suit/badge.svg?branch=master" alt="test_suit"/></a>
</p>
<p align="center">
<a href="https://github.com/LeoVen/C-Macro-Collections/stargazers"><img src="https://img.shields.io/github/stars/LeoVen/C-Macro-Collections?style=flat&color=ffa000" alt="Stars"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Lines%20of%20Code-28513-007596.svg" alt="loc"/></a>
<a href="https://github.com/XAMPPRocky/tokei"><img src="https://img.shields.io/badge/Files-130-961c00.svg" alt="loc"/></a>
</p>
The C Macro Collections Library is a compilation of macros that can be used to generate common data structures for any desired type. These data structures are [type safe](https://en.wikipedia.org/wiki/Type_safety) and are powered with many features (see Features section).
@@ -0,0 +1,30 @@
# Files Overview
An overview of the source files (all `.h`) of the C Macro Collections library.
* `cmc` - The main C Macro Collections library
* `cor` - Core functionalities of the C Macro Collections libraries
* `core.h` - Core functionalities of the library
* `hashtable.h` - Common things used by hash table based collections
* `utl` - Utilities
* `assert.h` - Non-abortive assert macros
* `foreach.h` - For Each macros
* `futils.h` - Common functions used by Functions Table
* `log.h` - Logging utility with levels of severity
* `test.h` - Simple Unit Test building with macros
* `test.h` - Timing code execution utility
* `bidimap.h` - A bi-directional map based on a hash table
* `deque.h` - A double-ended queue
* `hashmap.h` - A map based on a hash table
* `hashset.h` - A set based on a hash table
* `heap.h` - A binary heap based on a dynamic array
* `intervalheap.h` - A heap that is both Min and Max based on a dynamic array
* `linkedlist.h` - A doubly-linked list
* `list.h` - A dynamic array
* `multimap.h` - A map that accepts multiple keys based on a hash table
* `multiset.h` - A multiset based on a hash table
* `queue.h` - A FIFO based on a circular dynamic array
* `sortedlist.h` - A sorted list based on a dynamic array
* `stack.h` - A LIFO based on a dynamic array
* `treemap.h` - A sorted map based on an AVL tree
* `treeset.h` - A sorted set based on an AVL tree
File renamed without changes.
File renamed without changes.
+1
View File
@@ -0,0 +1 @@
# Chapter 1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 129 files, more files were not shown because too many files have changed in this diff. Show more