Initial commit.

This commit is contained in:
utkumaden@hotmail.com 2024-03-19 21:38:32 +03:00
commit 11bb72a464
9 changed files with 228 additions and 0 deletions

3
README.md Normal file

@ -0,0 +1,3 @@
Quik.Common
============
Common files for QUIK source code repositories.

79
assets/quik.svg Normal file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="46.12664pt"
height="18.818359pt"
viewBox="0 0 16.272453 6.6386992"
version="1.1"
id="svg5"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="quik.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:document-units="mm"
showgrid="false"
fit-margin-top="2"
fit-margin-left="2"
fit-margin-right="2"
fit-margin-bottom="2"
inkscape:zoom="8.2344211"
inkscape:cx="30.846127"
inkscape:cy="13.965766"
inkscape:window-width="1920"
inkscape:window-height="1015"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
lock-margins="true"
units="pt" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-29.294981,-112.71488)">
<g
id="g25273">
<text
xml:space="preserve"
style="font-size:6.35px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="29.445532"
y="118.04341"
id="text2725"><tspan
sodipodi:role="line"
id="tspan2723"
style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Arial;-inkscape-font-specification:'Arial Bold Italic';stroke-width:0.264583"
x="29.445532"
y="118.04341">Q</tspan></text>
<text
xml:space="preserve"
style="font-style:italic;font-weight:bold;font-size:5.99722px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold Italic';stroke-width:0.264583"
x="34.059269"
y="117.71337"
id="text16833"><tspan
sodipodi:role="line"
id="tspan16831"
style="font-size:5.99722px;stroke-width:0.264583"
x="34.059269"
y="117.71337">UIK</tspan></text>
<path
style="fill:none;stroke:#000000;stroke-width:0.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 34.395642,118.32379 H 44.759014"
id="path20974"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

99
assets/quik_ico.svg Normal file

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="32"
height="32"
viewBox="0 0 32 32"
version="1.1"
id="svg5"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="quik_ico.svg"
inkscape:export-filename="quik_ico_16.png"
inkscape:export-xdpi="48"
inkscape:export-ydpi="48"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="5.9736381"
inkscape:cx="20.088261"
inkscape:cy="37.163283"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="1920"
inkscape:window-y="32"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#2b7171;fill-opacity:1;stroke-width:3.77953;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
id="rect234"
width="32"
height="32"
x="0"
y="0"
rx="4" />
<g
id="g7146"
transform="matrix(0.7997283,0,0,0.7997283,3.2043471,3.2043471)">
<rect
style="fill:#ececec;fill-opacity:1;stroke:#b3b3b3;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stop-color:#000000"
id="rect3812"
width="26.564432"
height="26.564432"
x="2.7177837"
y="2.7177837" />
<rect
style="fill:#0055e0;fill-opacity:1;stroke:#b3b3b3;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stop-color:#000000"
id="rect4126"
width="26.564432"
height="3.411391"
x="2.7177837"
y="2.7177837" />
<rect
style="fill:#f9f9f9;fill-opacity:1;stroke:#b3b3b3;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stop-color:#000000;font-variation-settings:normal;opacity:1;vector-effect:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;-inkscape-stroke:none;stop-opacity:1"
id="rect7200"
width="6.5566258"
height="3.411391"
x="22.725592"
y="2.7177839" />
<path
style="fill:none;stroke:#fefefe;stroke-width:1.25042;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 4.582004,4.4234793 h 9.179619"
id="path7392" />
<path
style="fill:none;stroke:#999999;stroke-width:1.25042;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 24.672729,4.4234794 h 2.662352"
id="path7394"
sodipodi:nodetypes="cc" />
</g>
<text
xml:space="preserve"
style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:18px;line-height:1.25;font-family:Arial;-inkscape-font-specification:'Arial Bold Italic';fill:#0055e0;fill-opacity:1"
x="15.160645"
y="23.162577"
id="text6366"><tspan
sodipodi:role="line"
id="tspan6364"
x="15.160645"
y="23.162577"
style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:Arial;-inkscape-font-specification:'Arial Bold Italic';text-align:center;text-anchor:middle;fill:#0055e0;fill-opacity:1">Q</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
assets/quik_ico_128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
assets/quik_ico_16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

BIN
assets/quik_ico_256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
assets/quik_ico_32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
assets/quik_ico_64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

47
include/quik_common.h Normal file

@ -0,0 +1,47 @@
#ifndef _QUIK_COMMON_H_
#define _QUIK_COMMON_H_
#include "stdlib.h"
#if __GNUC__ || __MSC_VER
#define __QUIK_FUNCTION__ __FUNCTION__
#define QEXTERN extern
#else
#define __QUIK_FUNCTION__ NULL
#endif
/**
* @brief Callback for failed assert function for QUIK redist libraries.
* @param[in] expr The expression that failed.
* @param[in] file The failing file (if available)
* @param[in] line The failing line number (if available)
* @param[in] func The failing function (if available)
*/
typedef void (*quik_failed_assert_cb_t)(const char *expr, const char *file, int line, const char* func);
#define DECLARE_ASSERT_CB(NAME) \
QEXTERN quik_failed_assert_cb_t NAME##_failed_assert
#define DECLARE_ASSERT_STORE(NAME) \
QEXTERN void NAME##_failed_assert_store(quik_failed_assert_cb_t cb)
#define DEFINE_ASSERT_CB(NAME) \
quik_failed_assert_cb_t NAME##_failed_assert
#define DEFINE_ASSERT_STORE(NAME) \
void NAME##_failed_assert_store(quik_failed_assert_cb_t cb) { \
NAME##_failed_assert = cb != NULL ? cb : quik_default_assert; \
}
#define QUIK_DECLARE_LIB(NAME) \
DECLARE_ASSERT_CB(NAME); \
DECLARE_ASSERT_STORE(NAME);
#define QUIK_DEFINE_LIB(NAME) \
DEFINE_ASSERT_CB(NAME); \
DEFINE_ASSERT_STORE(NAME);
inline static void quik_default_assert(const char *expr, const char *file, int line, const char *function)
{
abort();
}
#endif