Update docs

This commit is contained in:
Sergey Lyubka 2022-06-08 11:01:30 +01:00
parent 9f8424e93f
commit 94ea973fb5
3 changed files with 118 additions and 3 deletions

View File

@ -2383,8 +2383,6 @@ Parameters:
Return value: `true` if entry is found, `false` otherwise
<img src="images/mg_commalist.png" alt="Function mg_commalist()" />
Usage example:
```c
@ -2394,6 +2392,8 @@ while (mg_commalist(&s, &k, &v)) // This loop output:
(int) k.len, k.ptr, (int) v.len, v.ptr); // [b] set to [777]
```
<img src="images/mg_commalist.svg" alt="Function mg_commalist()" />
### mg\_hex()
```c

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@ -1 +1,116 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 554.6 417.3"><defs><style>.cls-1{fill:#576174;}.cls-2,.cls-4,.cls-7{isolation:isolate;}.cls-13,.cls-15,.cls-19,.cls-2,.cls-4,.cls-5{font-size:16.76px;}.cls-12,.cls-13,.cls-2,.cls-5{fill:#fff;}.cls-15,.cls-19,.cls-2,.cls-4,.cls-5{font-family:Courier;}.cls-3{letter-spacing:1.55em;}.cls-4,.cls-9{fill:#00983a;}.cls-10,.cls-11,.cls-18,.cls-21,.cls-6{fill:none;stroke-linecap:round;stroke-linejoin:round;}.cls-6{stroke:#00983a;}.cls-10,.cls-11,.cls-18,.cls-6{stroke-width:2.79px;}.cls-7{font-size:24px;}.cls-13,.cls-7{font-family:ProximaNova-Regular, Proxima Nova;}.cls-8{letter-spacing:-0.02em;}.cls-10{stroke:#ea5b0c;}.cls-11{stroke:#fff;}.cls-14,.cls-15,.cls-16{fill:#ea5b0c;}.cls-14{opacity:0.7;}.cls-17,.cls-19,.cls-20{fill:#45cfff;}.cls-17{opacity:0.5;}.cls-18,.cls-21{stroke:#45cfff;}</style></defs><rect class="cls-1" y="34.3" width="554.6" height="137.54" rx="8.5"/><rect class="cls-1" y="234.1" width="554.6" height="183.18" rx="9.8"/><text class="cls-2" transform="translate(16.5 65)">struct mg_iobuf {<tspan class="cls-3" x="0" y="20.1"> </tspan><tspan x="36" y="20.1">unsigned char *buf;</tspan><tspan class="cls-3" x="0" y="40.2"> </tspan><tspan x="36" y="40.2">size_t size;</tspan><tspan class="cls-3" x="0" y="60.3"> </tspan><tspan x="36" y="60.3">size_t len; </tspan></text><text class="cls-4" transform="translate(267.7 88)">// Pointer to stored data</text><text class="cls-4" transform="translate(267.7 107)">// Total size available</text><text class="cls-4" transform="translate(267.7 126.6)">// Current number of bytes</text><text class="cls-5" transform="translate(18.6 143.5)">}; </text><path class="cls-6" d="M366.5,225.6" transform="translate(-19.4 -8.3)"/><text class="cls-7" transform="translate(11.3 20)">SOURCE CODE</text><text class="cls-7" transform="translate(11.3 217.9)">MEMO<tspan class="cls-8" x="70.8" y="0">R</tspan><tspan x="85.1" y="0">Y</tspan></text><rect class="cls-9" x="63.9" y="317" width="438.2" height="5.71"/><line class="cls-6" x1="100.4" y1="334.7" x2="100.4" y2="305.1"/><line class="cls-6" x1="255.5" y1="305.1" x2="255.5" y2="334.7"/><path class="cls-10" d="M274.9,256.1" transform="translate(-19.4 -8.3)"/><line class="cls-6" x1="464.8" y1="305.1" x2="464.8" y2="334.7"/><line class="cls-11" x1="101" y1="374.5" x2="101" y2="347.8"/><polygon class="cls-12" points="95.9 348.5 106.1 348.5 101 343.4 95.9 348.5"/><text class="cls-13" transform="translate(88 395.5)">buf</text><line class="cls-11" x1="255.2" y1="374.5" x2="255.2" y2="347.8"/><polygon class="cls-12" points="250.1 348.5 260.3 348.5 255.2 343.4 250.1 348.5"/><text class="cls-13" transform="translate(246.2 395.5)">len</text><line class="cls-11" x1="465.5" y1="374.5" x2="465.5" y2="347.8"/><polygon class="cls-12" points="460.4 348.5 470.6 348.5 465.5 343.4 460.4 348.5"/><text class="cls-13" transform="translate(453.4 395.5)">size</text><rect class="cls-14" x="100.7" y="282.7" width="155.4" height="10.41"/><line class="cls-10" x1="100.4" y1="293.5" x2="100.4" y2="263.9"/><text class="cls-15" transform="translate(157.1 273.9)">data</text><line class="cls-10" x1="143.3" y1="269.3" x2="116.6" y2="269.3"/><polygon class="cls-16" points="117.3 274.4 117.3 264.2 112.2 269.3 117.3 274.4"/><line class="cls-10" x1="211.2" y1="269.9" x2="237.9" y2="269.9"/><polygon class="cls-16" points="237.2 264.9 237.2 275 242.3 269.9 237.2 264.9"/><rect class="cls-17" x="255.8" y="282.7" width="208.3" height="10.41"/><line class="cls-18" x1="464.9" y1="293.5" x2="464.9" y2="263.9"/><text class="cls-19" transform="translate(310.2 273.9)">free space</text><line class="cls-18" x1="301.4" y1="269.9" x2="274.7" y2="269.9"/><polygon class="cls-20" points="275.4 275 275.4 264.9 270.3 269.9 275.4 275"/><line class="cls-18" x1="422.3" y1="269.9" x2="449" y2="269.9"/><polygon class="cls-20" points="448.3 264.9 448.3 275 453.4 269.9 448.3 264.9"/><path class="cls-21" d="M275.9,253.5" transform="translate(-19.4 -8.3)"/><path class="cls-21" d="M275.9,284.8" transform="translate(-19.4 -8.3)"/><path class="cls-20" d="M276.3,301.8V272.2a1.4,1.4,0,0,0-1.4-1.4h0v32.4h0A1.4,1.4,0,0,0,276.3,301.8Z" transform="translate(-19.4 -8.3)"/><path class="cls-16" d="M273.6,301.8V272.2a1.4,1.4,0,0,1,1.4-1.4h0v32.4h0A1.4,1.4,0,0,1,273.6,301.8Z" transform="translate(-19.4 -8.3)"/></svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 379 196.3" style="enable-background:new 0 0 379 196.3;" xml:space="preserve">
<style type="text/css">
.st0{font-family:'ProximaNova-Regular';}
.st1{font-size:24px;}
.st2{opacity:0.2;fill:#00983A;}
.st3{fill:none;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st4{fill:#00983A;}
.st5{fill:#F2F3F3;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st6{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st7{font-family:'Courier';}
.st8{font-size:16.7604px;}
.st9{fill:none;stroke:#00983A;stroke-linecap:round;stroke-linejoin:round;}
.st10{fill:#576174;}
.st11{fill:#7A8387;}
.st12{fill:none;stroke:#576174;stroke-linecap:round;stroke-linejoin:round;}
.st13{fill:none;stroke:#7A8387;stroke-linecap:round;stroke-linejoin:round;}
</style>
<text transform="matrix(1 0 0 1 20.618 32.4549)" class="st0 st1">Memory</text>
<polyline class="st2" points="323.1,115.4 183.4,115.4 183.4,90.7 323.1,90.7 "/>
<g>
<g>
<g>
<polyline class="st3" points="357.5,115.4 182.5,115.4 182.5,90.7 357.5,90.7 "/>
<polyline class="st4" points="182.7,115.1 22.5,115.1 22.5,91.3 182.7,91.3 "/>
<line class="st5" x1="22.5" y1="69.2" x2="22.5" y2="130.4"/>
<line class="st5" x1="183.3" y1="69.2" x2="183.3" y2="130.4"/>
<line class="st5" x1="323.8" y1="69.2" x2="323.8" y2="130.4"/>
<path class="st5" d="M357.5,115.4"/>
<path class="st6" d="M53.5,114.6"/>
<path class="st6" d="M53.5,90.9"/>
<path class="st6" d="M22.5,90.7l160.8,0v24.9l-160.8-0.2C22.5,115.4,22.7,90.7,22.5,90.7z"/>
<line class="st5" x1="323.7" y1="90.8" x2="323.7" y2="115.3"/>
<line class="st5" x1="291.6" y1="90.9" x2="291.6" y2="114.6"/>
<path class="st5" d="M215.5,115.6"/>
<path class="st5" d="M215.5,91.9"/>
</g>
<g>
<text transform="matrix(1 0 0 1 19.5222 173.3858)" class="st4 st7 st8">buf</text>
</g>
<g>
<g>
<line class="st9" x1="22.2" y1="158.2" x2="22.2" y2="137.2"/>
<g>
<polygon class="st4" points="19.8,137.6 24.6,137.6 22.2,135.1 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 178.1739 173.3858)" class="st4 st7 st8">len</text>
</g>
<g>
<g>
<line class="st9" x1="183.3" y1="158.2" x2="183.3" y2="137.2"/>
<g>
<polygon class="st4" points="180.9,137.6 185.7,137.6 183.3,135.1 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 319.141 173.3858)" class="st4 st7 st8">size</text>
</g>
<g>
<g>
<line class="st9" x1="323.9" y1="158.2" x2="323.9" y2="137.2"/>
<g>
<polygon class="st4" points="321.5,137.6 326.3,137.6 323.9,135.1 "/>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 80.6367 69.4458)" class="st10 st7 st8">data</text>
</g>
<g>
<text transform="matrix(1 0 0 1 203.3455 69.4458)" class="st11 st7 st8">free space</text>
</g>
<g>
<g>
<line class="st12" x1="152.5" y1="76.3" x2="33.5" y2="76.3"/>
<g>
<polygon class="st10" points="33.8,78.7 33.8,73.8 31.4,76.3 "/>
</g>
</g>
</g>
<g>
<line class="st11" x1="143.4" y1="76.3" x2="174.4" y2="76.3"/>
<g>
<line class="st12" x1="143.4" y1="76.3" x2="172.3" y2="76.3"/>
<g>
<polygon class="st10" points="172,73.8 172,78.7 174.4,76.3 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st13" x1="283.9" y1="76.3" x2="312.8" y2="76.3"/>
<g>
<polygon class="st11" points="312.5,73.8 312.5,78.7 314.9,76.3 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st13" x1="285.8" y1="76.3" x2="196.8" y2="76.3"/>
<g>
<polygon class="st11" points="197.2,78.7 197.2,73.8 194.7,76.3 "/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB