CANConfigPython 0.1.0a1__py3-none-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- canconfigpython/__init__.py +7 -0
- canconfigpython/__main__.py +3 -0
- canconfigpython/cli.py +111 -0
- canconfigpython/client.py +243 -0
- canconfigpython/commands.py +57 -0
- canconfigpython/errors.py +19 -0
- canconfigpython/resources/docs/native-source.tar.gz +0 -0
- canconfigpython/resources/docs/user-guide.en.md +274 -0
- canconfigpython/resources/docs/user-guide.zh-CN.md +265 -0
- canconfigpython/resources/skill/canconfig-python/SKILL.md +71 -0
- canconfigpython/resources/skill/canconfig-python/agents/openai.yaml +4 -0
- canconfigpython/resources/skill/canconfig-python/assets/changes.schema.json +832 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_dual_rates.json +18 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_mapping.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_115200_8n1.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_format_crc.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_gap.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_transparent_id.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_1m.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_500k.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_adaptive_single.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_return_manual.json +22 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_silent_adaptive_option.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_blacklist.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_mask.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_range.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_h_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_input_filter.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_l_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_mapping.json +46 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_routing.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.en.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.json +661 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.zh-CN.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/adaptive_mixed.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/hub_missing_ps.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/restricted_inheritance.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/short_user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/string_numeric_id.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unknown_field.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unsupported_adaptive.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/wrong_uid.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_adaptive_all.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_silent.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/references/operations.md +68 -0
- canconfigpython/resources.py +17 -0
- canconfigpython/runtime/Qt5Core.dll +0 -0
- canconfigpython/runtime/Qt5Network.dll +0 -0
- canconfigpython/runtime/Qt5SerialPort.dll +0 -0
- canconfigpython/runtime/WIICAN.dll +0 -0
- canconfigpython/runtime/canconfigconsole.exe +0 -0
- canconfigpython/runtime/libgcc_s_dw2-1.dll +0 -0
- canconfigpython/runtime/libstdc++-6.dll +0 -0
- canconfigpython/runtime/libwinpthread-1.dll +0 -0
- canconfigpython/runtime/manifest.json +19 -0
- canconfigpython/runtime.py +61 -0
- canconfigpython-0.1.0a1.dist-info/GPL-3.0.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/LICENSE +21 -0
- canconfigpython-0.1.0a1.dist-info/METADATA +197 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-LICENSE.txt +866 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.PREVIEW.COMMERCIAL.txt +626 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__LICENSE.txt +32 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__dxgi_support_data.json.txt +1164 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__load_functions_data.json.txt +1116 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__swizzle_format_data.json.txt +77 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__texture_format_data.json.txt +692 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__compiler__LICENSE.txt +22 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__murmurhash__LICENSE.txt +2 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__double-conversion__LICENSE.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__easing.cpp.txt +670 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__legal.qdoc.txt +35 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.c.txt +875 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.h.txt +66 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd_gcc.h.txt +63 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__0001-Patch-the-FreeBSD-strto-u-ll-functions-to-work-insid.patch.txt +151 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoll.c.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoull.c.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__docs__LICENSE.TXT.txt +37 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__no-copyright.txt +61 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright-year.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright.txt +14 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz-ng__COPYING.txt +36 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz__COPYING.txt +24 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__libpng__LICENSE.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.cpp.txt +265 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.h.txt +31 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.cpp.txt +247 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.h.txt +48 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__COPYING.txt +5 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__LICENCE.txt +93 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__patches__0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch.txt +86 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha-private.h.txt +28 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha.h.txt +357 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha224-256.c.txt +583 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha384-512.c.txt +1034 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha1__sha1.cpp.txt +261 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32-rvk.macros.txt +555 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32.macros.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-64.macros.txt +728 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-int-set.h.txt +6 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-interface.h.txt +46 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32-settings.h.txt +4 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32.c.txt +524 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64-settings.h.txt +7 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64.c.txt +512 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-unrolling.macros.txt +124 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.c.txt +82 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.h.txt +70 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.c.txt +266 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.h.txt +80 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__brg_endian.h.txt +142 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__xkbcommon__COPYING.txt +188 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv2.txt +292 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/RECORD +165 -0
- canconfigpython-0.1.0a1.dist-info/THIRD_PARTY_NOTICES.md +69 -0
- canconfigpython-0.1.0a1.dist-info/WHEEL +5 -0
- canconfigpython-0.1.0a1.dist-info/entry_points.txt +3 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING.RUNTIME.txt +73 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.LIB.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/linux-libc6-copyright.txt +529 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcap2-copyright.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcom-err2-copyright.txt +403 -0
- canconfigpython-0.1.0a1.dist-info/linux-libdouble-conversion3-copyright.txt +41 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgcc-s1-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libglib2.0-0t64-copyright.txt +1250 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgssapi-krb5-2-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libicu74-copyright.txt +49 -0
- canconfigpython-0.1.0a1.dist-info/linux-libk5crypto3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkeyutils1-copyright.txt +52 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5-3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5support0-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-16-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-8-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5core5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5network5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5serialport5-copyright.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/linux-libstdc++6-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libudev1-copyright.txt +287 -0
- canconfigpython-0.1.0a1.dist-info/linux-libzstd1-copyright.txt +123 -0
- canconfigpython-0.1.0a1.dist-info/linux-packages.json +102 -0
- canconfigpython-0.1.0a1.dist-info/linux-zlib1g-copyright.txt +84 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64-runtime.txt.txt +240 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64.txt.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.txt +43 -0
- canconfigpython-0.1.0a1.dist-info/qt-source-notices.json +278 -0
- canconfigpython-0.1.0a1.dist-info/top_level.txt +1 -0
- canconfigpython-0.1.0a1.dist-info/winpthreads-COPYING.txt +57 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
**
|
|
3
|
+
** Copyright (C) 2016 Intel Corporation.
|
|
4
|
+
**
|
|
5
|
+
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
** of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
** in the Software without restriction, including without limitation the rights
|
|
8
|
+
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
** copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
** furnished to do so, subject to the following conditions:
|
|
11
|
+
**
|
|
12
|
+
** The above copyright notice and this permission notice shall be included in
|
|
13
|
+
** all copies or substantial portions of the Software.
|
|
14
|
+
**
|
|
15
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
** THE SOFTWARE.
|
|
22
|
+
**
|
|
23
|
+
****************************************************************************/
|
|
24
|
+
|
|
25
|
+
#ifndef FORKFD_H
|
|
26
|
+
#define FORKFD_H
|
|
27
|
+
|
|
28
|
+
#include <fcntl.h>
|
|
29
|
+
#include <stdint.h>
|
|
30
|
+
#include <unistd.h> // to get the POSIX flags
|
|
31
|
+
|
|
32
|
+
#if _POSIX_SPAWN > 0
|
|
33
|
+
# include <spawn.h>
|
|
34
|
+
#endif
|
|
35
|
+
|
|
36
|
+
#ifdef __cplusplus
|
|
37
|
+
extern "C" {
|
|
38
|
+
#endif
|
|
39
|
+
|
|
40
|
+
#define FFD_CLOEXEC 1
|
|
41
|
+
#define FFD_NONBLOCK 2
|
|
42
|
+
|
|
43
|
+
#define FFD_CHILD_PROCESS (-2)
|
|
44
|
+
|
|
45
|
+
struct forkfd_info {
|
|
46
|
+
int32_t code;
|
|
47
|
+
int32_t status;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
int forkfd(int flags, pid_t *ppid);
|
|
51
|
+
int forkfd_wait(int ffd, forkfd_info *info, struct rusage *rusage);
|
|
52
|
+
int forkfd_close(int ffd);
|
|
53
|
+
|
|
54
|
+
#if _POSIX_SPAWN > 0
|
|
55
|
+
/* only for spawnfd: */
|
|
56
|
+
# define FFD_SPAWN_SEARCH_PATH O_RDWR
|
|
57
|
+
|
|
58
|
+
int spawnfd(int flags, pid_t *ppid, const char *path, const posix_spawn_file_actions_t *file_actions,
|
|
59
|
+
posix_spawnattr_t *attrp, char *const argv[], char *const envp[]);
|
|
60
|
+
#endif
|
|
61
|
+
|
|
62
|
+
#ifdef __cplusplus
|
|
63
|
+
}
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
#endif // FORKFD_H
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/****************************************************************************
|
|
2
|
+
**
|
|
3
|
+
** Copyright (C) 2016 Intel Corporation.
|
|
4
|
+
**
|
|
5
|
+
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
** of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
** in the Software without restriction, including without limitation the rights
|
|
8
|
+
** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
** copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
** furnished to do so, subject to the following conditions:
|
|
11
|
+
**
|
|
12
|
+
** The above copyright notice and this permission notice shall be included in
|
|
13
|
+
** all copies or substantial portions of the Software.
|
|
14
|
+
**
|
|
15
|
+
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
** THE SOFTWARE.
|
|
22
|
+
**
|
|
23
|
+
****************************************************************************/
|
|
24
|
+
|
|
25
|
+
#ifndef FFD_ATOMIC_GCC_H
|
|
26
|
+
#define FFD_ATOMIC_GCC_H
|
|
27
|
+
|
|
28
|
+
/* atomics */
|
|
29
|
+
/* we'll use the GCC 4.7 atomic builtins
|
|
30
|
+
* See http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html#_005f_005fatomic-Builtins
|
|
31
|
+
* Or in texinfo: C Extensions > __atomic Builtins
|
|
32
|
+
*/
|
|
33
|
+
typedef int ffd_atomic_int;
|
|
34
|
+
#define ffd_atomic_pointer(type) type*
|
|
35
|
+
|
|
36
|
+
#define FFD_ATOMIC_INIT(val) (val)
|
|
37
|
+
|
|
38
|
+
#define FFD_ATOMIC_RELAXED __ATOMIC_RELAXED
|
|
39
|
+
#define FFD_ATOMIC_ACQUIRE __ATOMIC_ACQUIRE
|
|
40
|
+
#define FFD_ATOMIC_RELEASE __ATOMIC_RELEASE
|
|
41
|
+
// acq_rel & cst not necessary
|
|
42
|
+
|
|
43
|
+
#if !defined(__GNUC__) || \
|
|
44
|
+
((__GNUC__ - 0) * 100 + (__GNUC_MINOR__ - 0)) < 407 || \
|
|
45
|
+
(defined(__INTEL_COMPILER) && __INTEL_COMPILER-0 < 1310) || \
|
|
46
|
+
(defined(__clang__) && ((__clang_major__-0) * 100 + (__clang_minor-0)) < 303)
|
|
47
|
+
#define ffd_atomic_load_n(ptr,order) *(ptr)
|
|
48
|
+
#define ffd_atomic_store_n(ptr,val,order) (*(ptr) = (val), (void)0)
|
|
49
|
+
#define ffd_atomic_exchange_n(ptr,val,order) __sync_lock_test_and_set(ptr, val)
|
|
50
|
+
#define ffd_atomic_compare_exchange_n(ptr,expected,desired,weak,order1,order2) \
|
|
51
|
+
__sync_bool_compare_and_swap(ptr, *(expected), desired) ? 1 : \
|
|
52
|
+
(*(expected) = *(ptr), 0)
|
|
53
|
+
#define ffd_atomic_add_fetch(ptr,val,order) __sync_add_and_fetch(ptr, val)
|
|
54
|
+
#else
|
|
55
|
+
#define ffd_atomic_load(ptr,order) __atomic_load_n(ptr, order)
|
|
56
|
+
#define ffd_atomic_store(ptr,val,order) __atomic_store_n(ptr, val, order)
|
|
57
|
+
#define ffd_atomic_exchange(ptr,val,order) __atomic_exchange_n(ptr, val, order)
|
|
58
|
+
#define ffd_atomic_compare_exchange(ptr,expected,desired,order1,order2) \
|
|
59
|
+
__atomic_compare_exchange_n(ptr, expected, desired, 1, order1, order2)
|
|
60
|
+
#define ffd_atomic_add_fetch(ptr,val,order) __atomic_add_fetch(ptr, val, order)
|
|
61
|
+
#endif
|
|
62
|
+
|
|
63
|
+
#endif
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
From 81a2d1a38becdeed2cd8b963e190aedf197e39c6 Mon Sep 17 00:00:00 2001
|
|
2
|
+
From: Thiago Macieira <thiago.macieira@intel.com>
|
|
3
|
+
Date: Thu, 2 Oct 2014 22:03:19 -0700
|
|
4
|
+
Subject: [PATCH 1/1] Patch the FreeBSD strto(u)ll functions to work inside
|
|
5
|
+
QtCore
|
|
6
|
+
|
|
7
|
+
Changes:
|
|
8
|
+
- remove the #includes and the SCCSID
|
|
9
|
+
- rename from strtoxx_l to qt_strtoxx (merging the two functions)
|
|
10
|
+
- remove __restrict
|
|
11
|
+
- remove the locale_t parameter and use ascii_isspace instead of isspace_l
|
|
12
|
+
- fix compilation with -Wcast-qual (requires C++)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
src/3rdparty/freebsd/strtoll.c | 27 ++++-----------------------
|
|
16
|
+
src/3rdparty/freebsd/strtoull.c | 27 ++++-----------------------
|
|
17
|
+
2 files changed, 8 insertions(+), 46 deletions(-)
|
|
18
|
+
|
|
19
|
+
diff --git a/src/3rdparty/freebsd/strtoll.c b/src/3rdparty/freebsd/strtoll.c
|
|
20
|
+
index 16a8196..7b4505e 100644
|
|
21
|
+
--- a/src/3rdparty/freebsd/strtoll.c
|
|
22
|
+
+++ b/src/3rdparty/freebsd/strtoll.c
|
|
23
|
+
@@ -32,18 +32,6 @@
|
|
24
|
+
* SUCH DAMAGE.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
-#if defined(LIBC_SCCS) && !defined(lint)
|
|
28
|
+
-static char sccsid[] = "@(#)strtoq.c 8.1 (Berkeley) 6/4/93";
|
|
29
|
+
-#endif /* LIBC_SCCS and not lint */
|
|
30
|
+
-#include <sys/cdefs.h>
|
|
31
|
+
-__FBSDID("$FreeBSD$");
|
|
32
|
+
-
|
|
33
|
+
-#include <limits.h>
|
|
34
|
+
-#include <errno.h>
|
|
35
|
+
-#include <ctype.h>
|
|
36
|
+
-#include <stdlib.h>
|
|
37
|
+
-#include "xlocale_private.h"
|
|
38
|
+
-
|
|
39
|
+
/*
|
|
40
|
+
* Convert a string to a long long integer.
|
|
41
|
+
*
|
|
42
|
+
@@ -51,15 +39,13 @@ __FBSDID("$FreeBSD$");
|
|
43
|
+
* alphabets and digits are each contiguous.
|
|
44
|
+
*/
|
|
45
|
+
long long
|
|
46
|
+
-strtoll_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
47
|
+
- locale_t locale)
|
|
48
|
+
+qt_strtoll(const char * nptr, char **endptr, int base)
|
|
49
|
+
{
|
|
50
|
+
const char *s;
|
|
51
|
+
unsigned long long acc;
|
|
52
|
+
char c;
|
|
53
|
+
unsigned long long cutoff;
|
|
54
|
+
int neg, any, cutlim;
|
|
55
|
+
- FIX_LOCALE(locale);
|
|
56
|
+
|
|
57
|
+
/*
|
|
58
|
+
* Skip white space and pick up leading +/- sign if any.
|
|
59
|
+
@@ -69,7 +55,7 @@ strtoll_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
60
|
+
s = nptr;
|
|
61
|
+
do {
|
|
62
|
+
c = *s++;
|
|
63
|
+
- } while (isspace_l((unsigned char)c, locale));
|
|
64
|
+
+ } while (ascii_isspace(c));
|
|
65
|
+
if (c == '-') {
|
|
66
|
+
neg = 1;
|
|
67
|
+
c = *s++;
|
|
68
|
+
@@ -141,13 +127,8 @@ strtoll_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
69
|
+
noconv:
|
|
70
|
+
errno = EINVAL;
|
|
71
|
+
} else if (neg)
|
|
72
|
+
- acc = -acc;
|
|
73
|
+
+ acc = (unsigned long long) -(long long)acc;
|
|
74
|
+
if (endptr != NULL)
|
|
75
|
+
- *endptr = (char *)(any ? s - 1 : nptr);
|
|
76
|
+
+ *endptr = const_cast<char *>(any ? s - 1 : nptr);
|
|
77
|
+
return (acc);
|
|
78
|
+
}
|
|
79
|
+
-long long
|
|
80
|
+
-strtoll(const char * __restrict nptr, char ** __restrict endptr, int base)
|
|
81
|
+
-{
|
|
82
|
+
- return strtoll_l(nptr, endptr, base, __get_locale());
|
|
83
|
+
-}
|
|
84
|
+
diff --git a/src/3rdparty/freebsd/strtoull.c b/src/3rdparty/freebsd/strtoull.c
|
|
85
|
+
index dc40e0e..1eb9257 100644
|
|
86
|
+
--- a/src/3rdparty/freebsd/strtoull.c
|
|
87
|
+
+++ b/src/3rdparty/freebsd/strtoull.c
|
|
88
|
+
@@ -32,18 +32,6 @@
|
|
89
|
+
* SUCH DAMAGE.
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
-#if defined(LIBC_SCCS) && !defined(lint)
|
|
93
|
+
-static char sccsid[] = "@(#)strtouq.c 8.1 (Berkeley) 6/4/93";
|
|
94
|
+
-#endif /* LIBC_SCCS and not lint */
|
|
95
|
+
-#include <sys/cdefs.h>
|
|
96
|
+
-__FBSDID("$FreeBSD$");
|
|
97
|
+
-
|
|
98
|
+
-#include <limits.h>
|
|
99
|
+
-#include <errno.h>
|
|
100
|
+
-#include <ctype.h>
|
|
101
|
+
-#include <stdlib.h>
|
|
102
|
+
-#include "xlocale_private.h"
|
|
103
|
+
-
|
|
104
|
+
/*
|
|
105
|
+
* Convert a string to an unsigned long long integer.
|
|
106
|
+
*
|
|
107
|
+
@@ -51,15 +39,13 @@ __FBSDID("$FreeBSD$");
|
|
108
|
+
* alphabets and digits are each contiguous.
|
|
109
|
+
*/
|
|
110
|
+
unsigned long long
|
|
111
|
+
-strtoull_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
112
|
+
- locale_t locale)
|
|
113
|
+
+qt_strtoull(const char * nptr, char **endptr, int base)
|
|
114
|
+
{
|
|
115
|
+
const char *s;
|
|
116
|
+
unsigned long long acc;
|
|
117
|
+
char c;
|
|
118
|
+
unsigned long long cutoff;
|
|
119
|
+
int neg, any, cutlim;
|
|
120
|
+
- FIX_LOCALE(locale);
|
|
121
|
+
|
|
122
|
+
/*
|
|
123
|
+
* See strtoq for comments as to the logic used.
|
|
124
|
+
@@ -67,7 +53,7 @@ strtoull_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
125
|
+
s = nptr;
|
|
126
|
+
do {
|
|
127
|
+
c = *s++;
|
|
128
|
+
- } while (isspace_l((unsigned char)c, locale));
|
|
129
|
+
+ } while (ascii_isspace(c));
|
|
130
|
+
if (c == '-') {
|
|
131
|
+
neg = 1;
|
|
132
|
+
c = *s++;
|
|
133
|
+
@@ -119,13 +105,8 @@ strtoull_l(const char * __restrict nptr, char ** __restrict endptr, int base,
|
|
134
|
+
noconv:
|
|
135
|
+
errno = EINVAL;
|
|
136
|
+
} else if (neg)
|
|
137
|
+
- acc = -acc;
|
|
138
|
+
+ acc = (unsigned long long) -(long long)acc;
|
|
139
|
+
if (endptr != NULL)
|
|
140
|
+
- *endptr = (char *)(any ? s - 1 : nptr);
|
|
141
|
+
+ *endptr = const_cast<char *>(any ? s - 1 : nptr);
|
|
142
|
+
return (acc);
|
|
143
|
+
}
|
|
144
|
+
-unsigned long long
|
|
145
|
+
-strtoull(const char * __restrict nptr, char ** __restrict endptr, int base)
|
|
146
|
+
-{
|
|
147
|
+
- return strtoull_l(nptr, endptr, base, __get_locale());
|
|
148
|
+
-}
|
|
149
|
+
--
|
|
150
|
+
2.1.4
|
|
151
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*-
|
|
2
|
+
* Copyright (c) 1992, 1993
|
|
3
|
+
* The Regents of the University of California. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2011 The FreeBSD Foundation
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Portions of this software were developed by David Chisnall
|
|
8
|
+
* under sponsorship from the FreeBSD Foundation.
|
|
9
|
+
*
|
|
10
|
+
* Redistribution and use in source and binary forms, with or without
|
|
11
|
+
* modification, are permitted provided that the following conditions
|
|
12
|
+
* are met:
|
|
13
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
14
|
+
* notice, this list of conditions and the following disclaimer.
|
|
15
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
17
|
+
* documentation and/or other materials provided with the distribution.
|
|
18
|
+
* 3. Neither the name of the University nor the names of its contributors
|
|
19
|
+
* may be used to endorse or promote products derived from this software
|
|
20
|
+
* without specific prior written permission.
|
|
21
|
+
*
|
|
22
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
23
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
24
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
25
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
26
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
27
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
28
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
29
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
30
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
31
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
32
|
+
* SUCH DAMAGE.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Convert a string to a long long integer.
|
|
37
|
+
*
|
|
38
|
+
* Assumes that the upper and lower case
|
|
39
|
+
* alphabets and digits are each contiguous.
|
|
40
|
+
*/
|
|
41
|
+
long long
|
|
42
|
+
qt_strtoll(const char * nptr, char **endptr, int base)
|
|
43
|
+
{
|
|
44
|
+
const char *s;
|
|
45
|
+
unsigned long long acc;
|
|
46
|
+
char c;
|
|
47
|
+
unsigned long long cutoff;
|
|
48
|
+
int neg, any, cutlim;
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Skip white space and pick up leading +/- sign if any.
|
|
52
|
+
* If base is 0, allow 0x for hex and 0 for octal, else
|
|
53
|
+
* assume decimal; if base is already 16, allow 0x.
|
|
54
|
+
*/
|
|
55
|
+
s = nptr;
|
|
56
|
+
do {
|
|
57
|
+
c = *s++;
|
|
58
|
+
} while (ascii_isspace(c));
|
|
59
|
+
if (c == '-') {
|
|
60
|
+
neg = 1;
|
|
61
|
+
c = *s++;
|
|
62
|
+
} else {
|
|
63
|
+
neg = 0;
|
|
64
|
+
if (c == '+')
|
|
65
|
+
c = *s++;
|
|
66
|
+
}
|
|
67
|
+
if ((base == 0 || base == 16) &&
|
|
68
|
+
c == '0' && (*s == 'x' || *s == 'X') &&
|
|
69
|
+
((s[1] >= '0' && s[1] <= '9') ||
|
|
70
|
+
(s[1] >= 'A' && s[1] <= 'F') ||
|
|
71
|
+
(s[1] >= 'a' && s[1] <= 'f'))) {
|
|
72
|
+
c = s[1];
|
|
73
|
+
s += 2;
|
|
74
|
+
base = 16;
|
|
75
|
+
}
|
|
76
|
+
if (base == 0)
|
|
77
|
+
base = c == '0' ? 8 : 10;
|
|
78
|
+
acc = any = 0;
|
|
79
|
+
if (base < 2 || base > 36)
|
|
80
|
+
goto noconv;
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
* Compute the cutoff value between legal numbers and illegal
|
|
84
|
+
* numbers. That is the largest legal value, divided by the
|
|
85
|
+
* base. An input number that is greater than this value, if
|
|
86
|
+
* followed by a legal input character, is too big. One that
|
|
87
|
+
* is equal to this value may be valid or not; the limit
|
|
88
|
+
* between valid and invalid numbers is then based on the last
|
|
89
|
+
* digit. For instance, if the range for quads is
|
|
90
|
+
* [-9223372036854775808..9223372036854775807] and the input base
|
|
91
|
+
* is 10, cutoff will be set to 922337203685477580 and cutlim to
|
|
92
|
+
* either 7 (neg==0) or 8 (neg==1), meaning that if we have
|
|
93
|
+
* accumulated a value > 922337203685477580, or equal but the
|
|
94
|
+
* next digit is > 7 (or 8), the number is too big, and we will
|
|
95
|
+
* return a range error.
|
|
96
|
+
*
|
|
97
|
+
* Set 'any' if any `digits' consumed; make it negative to indicate
|
|
98
|
+
* overflow.
|
|
99
|
+
*/
|
|
100
|
+
cutoff = neg ? (unsigned long long)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX
|
|
101
|
+
: LLONG_MAX;
|
|
102
|
+
cutlim = cutoff % base;
|
|
103
|
+
cutoff /= base;
|
|
104
|
+
for ( ; ; c = *s++) {
|
|
105
|
+
if (c >= '0' && c <= '9')
|
|
106
|
+
c -= '0';
|
|
107
|
+
else if (c >= 'A' && c <= 'Z')
|
|
108
|
+
c -= 'A' - 10;
|
|
109
|
+
else if (c >= 'a' && c <= 'z')
|
|
110
|
+
c -= 'a' - 10;
|
|
111
|
+
else
|
|
112
|
+
break;
|
|
113
|
+
if (c >= base)
|
|
114
|
+
break;
|
|
115
|
+
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
|
116
|
+
any = -1;
|
|
117
|
+
else {
|
|
118
|
+
any = 1;
|
|
119
|
+
acc *= base;
|
|
120
|
+
acc += c;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (any < 0) {
|
|
124
|
+
acc = neg ? LLONG_MIN : LLONG_MAX;
|
|
125
|
+
errno = ERANGE;
|
|
126
|
+
} else if (!any) {
|
|
127
|
+
noconv:
|
|
128
|
+
errno = EINVAL;
|
|
129
|
+
} else if (neg)
|
|
130
|
+
acc = (unsigned long long) -(long long)acc;
|
|
131
|
+
if (endptr != NULL)
|
|
132
|
+
*endptr = const_cast<char *>(any ? s - 1 : nptr);
|
|
133
|
+
return (acc);
|
|
134
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*-
|
|
2
|
+
* Copyright (c) 1992, 1993
|
|
3
|
+
* The Regents of the University of California. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2011 The FreeBSD Foundation
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
* Portions of this software were developed by David Chisnall
|
|
8
|
+
* under sponsorship from the FreeBSD Foundation.
|
|
9
|
+
*
|
|
10
|
+
* Redistribution and use in source and binary forms, with or without
|
|
11
|
+
* modification, are permitted provided that the following conditions
|
|
12
|
+
* are met:
|
|
13
|
+
* 1. Redistributions of source code must retain the above copyright
|
|
14
|
+
* notice, this list of conditions and the following disclaimer.
|
|
15
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
|
16
|
+
* notice, this list of conditions and the following disclaimer in the
|
|
17
|
+
* documentation and/or other materials provided with the distribution.
|
|
18
|
+
* 3. Neither the name of the University nor the names of its contributors
|
|
19
|
+
* may be used to endorse or promote products derived from this software
|
|
20
|
+
* without specific prior written permission.
|
|
21
|
+
*
|
|
22
|
+
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
23
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
24
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
25
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
26
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
27
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
28
|
+
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
29
|
+
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
30
|
+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
31
|
+
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
32
|
+
* SUCH DAMAGE.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/*
|
|
36
|
+
* Convert a string to an unsigned long long integer.
|
|
37
|
+
*
|
|
38
|
+
* Assumes that the upper and lower case
|
|
39
|
+
* alphabets and digits are each contiguous.
|
|
40
|
+
*/
|
|
41
|
+
unsigned long long
|
|
42
|
+
qt_strtoull(const char * nptr, char **endptr, int base)
|
|
43
|
+
{
|
|
44
|
+
const char *s;
|
|
45
|
+
unsigned long long acc;
|
|
46
|
+
char c;
|
|
47
|
+
unsigned long long cutoff;
|
|
48
|
+
int neg, any, cutlim;
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* See strtoq for comments as to the logic used.
|
|
52
|
+
*/
|
|
53
|
+
s = nptr;
|
|
54
|
+
do {
|
|
55
|
+
c = *s++;
|
|
56
|
+
} while (ascii_isspace(c));
|
|
57
|
+
if (c == '-') {
|
|
58
|
+
neg = 1;
|
|
59
|
+
c = *s++;
|
|
60
|
+
} else {
|
|
61
|
+
neg = 0;
|
|
62
|
+
if (c == '+')
|
|
63
|
+
c = *s++;
|
|
64
|
+
}
|
|
65
|
+
if ((base == 0 || base == 16) &&
|
|
66
|
+
c == '0' && (*s == 'x' || *s == 'X') &&
|
|
67
|
+
((s[1] >= '0' && s[1] <= '9') ||
|
|
68
|
+
(s[1] >= 'A' && s[1] <= 'F') ||
|
|
69
|
+
(s[1] >= 'a' && s[1] <= 'f'))) {
|
|
70
|
+
c = s[1];
|
|
71
|
+
s += 2;
|
|
72
|
+
base = 16;
|
|
73
|
+
}
|
|
74
|
+
if (base == 0)
|
|
75
|
+
base = c == '0' ? 8 : 10;
|
|
76
|
+
acc = any = 0;
|
|
77
|
+
if (base < 2 || base > 36)
|
|
78
|
+
goto noconv;
|
|
79
|
+
|
|
80
|
+
cutoff = ULLONG_MAX / base;
|
|
81
|
+
cutlim = ULLONG_MAX % base;
|
|
82
|
+
for ( ; ; c = *s++) {
|
|
83
|
+
if (c >= '0' && c <= '9')
|
|
84
|
+
c -= '0';
|
|
85
|
+
else if (c >= 'A' && c <= 'Z')
|
|
86
|
+
c -= 'A' - 10;
|
|
87
|
+
else if (c >= 'a' && c <= 'z')
|
|
88
|
+
c -= 'a' - 10;
|
|
89
|
+
else
|
|
90
|
+
break;
|
|
91
|
+
if (c >= base)
|
|
92
|
+
break;
|
|
93
|
+
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
|
|
94
|
+
any = -1;
|
|
95
|
+
else {
|
|
96
|
+
any = 1;
|
|
97
|
+
acc *= base;
|
|
98
|
+
acc += c;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
if (any < 0) {
|
|
102
|
+
acc = ULLONG_MAX;
|
|
103
|
+
errno = ERANGE;
|
|
104
|
+
} else if (!any) {
|
|
105
|
+
noconv:
|
|
106
|
+
errno = EINVAL;
|
|
107
|
+
} else if (neg)
|
|
108
|
+
acc = (unsigned long long) -(long long)acc;
|
|
109
|
+
if (endptr != NULL)
|
|
110
|
+
*endptr = const_cast<char *>(any ? s - 1 : nptr);
|
|
111
|
+
return (acc);
|
|
112
|
+
}
|
canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__docs__LICENSE.TXT.txt
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
The FreeType 2 font engine is copyrighted work and cannot be used
|
|
3
|
+
legally without a software license. In order to make this project
|
|
4
|
+
usable to a vast majority of developers, we distribute it under two
|
|
5
|
+
mutually exclusive open-source licenses.
|
|
6
|
+
|
|
7
|
+
This means that *you* must choose *one* of the two licenses described
|
|
8
|
+
below, then obey all its terms and conditions when using FreeType 2 in
|
|
9
|
+
any of your projects or products.
|
|
10
|
+
|
|
11
|
+
- The FreeType License, found in the file `FTL.TXT', which is similar
|
|
12
|
+
to the original BSD license *with* an advertising clause that forces
|
|
13
|
+
you to explicitly cite the FreeType project in your product's
|
|
14
|
+
documentation. All details are in the license file. This license
|
|
15
|
+
is suited to products which don't use the GNU General Public
|
|
16
|
+
License.
|
|
17
|
+
|
|
18
|
+
Note that this license is compatible to the GNU General Public
|
|
19
|
+
License version 3, but not version 2.
|
|
20
|
+
|
|
21
|
+
- The GNU General Public License version 2, found in `GPLv2.TXT' (any
|
|
22
|
+
later version can be used also), for programs which already use the
|
|
23
|
+
GPL. Note that the FTL is incompatible with GPLv2 due to its
|
|
24
|
+
advertisement clause.
|
|
25
|
+
|
|
26
|
+
The contributed BDF and PCF drivers come with a license similar to that
|
|
27
|
+
of the X Window System. It is compatible to the above two licenses (see
|
|
28
|
+
file src/bdf/README and src/pcf/README).
|
|
29
|
+
|
|
30
|
+
The gzip module uses the zlib license (see src/gzip/zlib.h) which too is
|
|
31
|
+
compatible to the above two licenses.
|
|
32
|
+
|
|
33
|
+
The MD5 checksum support (only used for debugging in development builds)
|
|
34
|
+
is in the public domain.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
--- end of LICENSE.TXT ---
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Files that don't get a copyright, or which are taken from elsewhere.
|
|
2
|
+
#
|
|
3
|
+
# All lines in this file are patterns, including the comment lines; this
|
|
4
|
+
# means that e.g. `FTL.TXT' matches all files that have this string in
|
|
5
|
+
# the file name (including the path relative to the current directory,
|
|
6
|
+
# always starting with `./').
|
|
7
|
+
#
|
|
8
|
+
# Don't put empty lines into this file!
|
|
9
|
+
#
|
|
10
|
+
.gitignore
|
|
11
|
+
#
|
|
12
|
+
builds/unix/pkg.m4
|
|
13
|
+
#
|
|
14
|
+
docs/FTL.TXT
|
|
15
|
+
docs/GPLv2.TXT
|
|
16
|
+
#
|
|
17
|
+
src/base/md5.c
|
|
18
|
+
src/base/md5.h
|
|
19
|
+
#
|
|
20
|
+
src/bdf/bdf.c
|
|
21
|
+
src/bdf/bdf.h
|
|
22
|
+
src/bdf/bdfdrivr.c
|
|
23
|
+
src/bdf/bdfdrivr.h
|
|
24
|
+
src/bdf/bdferror.h
|
|
25
|
+
src/bdf/bdflib.c
|
|
26
|
+
src/bdf/module.mk
|
|
27
|
+
src/bdf/README
|
|
28
|
+
src/bdf/rules.mk
|
|
29
|
+
#
|
|
30
|
+
src/pcf/module.mk
|
|
31
|
+
src/pcf/pcf.c
|
|
32
|
+
src/pcf/pcf.h
|
|
33
|
+
src/pcf/pcfdrivr.c
|
|
34
|
+
src/pcf/pcfdrivr.h
|
|
35
|
+
src/pcf/pcferror.h
|
|
36
|
+
src/pcf/pcfread.c
|
|
37
|
+
src/pcf/pcfread.h
|
|
38
|
+
src/pcf/pcfutil.c
|
|
39
|
+
src/pcf/pcfutil.h
|
|
40
|
+
src/pcf/README
|
|
41
|
+
src/pcf/rules.mk
|
|
42
|
+
#
|
|
43
|
+
src/gzip/adler32.c
|
|
44
|
+
src/gzip/infblock.c
|
|
45
|
+
src/gzip/infblock.h
|
|
46
|
+
src/gzip/infcodes.c
|
|
47
|
+
src/gzip/infcodes.h
|
|
48
|
+
src/gzip/inffixed.h
|
|
49
|
+
src/gzip/inflate.c
|
|
50
|
+
src/gzip/inftrees.c
|
|
51
|
+
src/gzip/inftrees.h
|
|
52
|
+
src/gzip/infutil.c
|
|
53
|
+
src/gzip/infutil.h
|
|
54
|
+
src/gzip/zconf.h
|
|
55
|
+
src/gzip/zlib.h
|
|
56
|
+
src/gzip/zutil.c
|
|
57
|
+
src/gzip/zutil.h
|
|
58
|
+
#
|
|
59
|
+
src/tools/ftrandom/ftrandom.c
|
|
60
|
+
#
|
|
61
|
+
# EOF
|