Changeset fdfb24e in mainline
- Timestamp:
- 2023-10-27T17:53:21Z (14 months ago)
- Branches:
- master, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 55c5cb05
- Parents:
- 44e8541
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-27 17:38:24)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-27 17:53:21)
- Files:
-
- 5 deleted
- 15 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/arm32/meson.build
r44e8541 rfdfb24e 70 70 '../../generic/src/vprintf.c', 71 71 '../../generic/src/printf.c', 72 '../../ generic/src/str.c',72 '../../../common/str.c', 73 73 '../../generic/src/version.c', 74 74 '../../generic/src/inflate.c', -
boot/arch/arm64/meson.build
r44e8541 rfdfb24e 56 56 '../../generic/src/printf.c', 57 57 '../../generic/src/printf_core.c', 58 '../../ generic/src/str.c',58 '../../../common/str.c', 59 59 '../../generic/src/tar.c', 60 60 '../../generic/src/version.c', -
boot/arch/ia64/meson.build
r44e8541 rfdfb24e 48 48 '../../generic/src/vprintf.c', 49 49 '../../generic/src/printf.c', 50 '../../ generic/src/str.c',50 '../../../common/str.c', 51 51 '../../generic/src/version.c', 52 52 '../../generic/src/inflate.c', -
boot/arch/mips32/meson.build
r44e8541 rfdfb24e 48 48 '../../generic/src/vprintf.c', 49 49 '../../generic/src/printf.c', 50 '../../ generic/src/str.c',50 '../../../common/str.c', 51 51 '../../generic/src/version.c', 52 52 '../../generic/src/inflate.c', -
boot/arch/ppc32/meson.build
r44e8541 rfdfb24e 46 46 '../../generic/src/vprintf.c', 47 47 '../../generic/src/printf.c', 48 '../../ generic/src/str.c',48 '../../../common/str.c', 49 49 '../../generic/src/version.c', 50 50 '../../generic/src/inflate.c', -
boot/arch/riscv64/meson.build
r44e8541 rfdfb24e 42 42 '../../generic/src/vprintf.c', 43 43 '../../generic/src/printf.c', 44 '../../ generic/src/str.c',44 '../../../common/str.c', 45 45 '../../generic/src/version.c', 46 46 '../../generic/src/inflate.c', -
boot/arch/sparc64/meson.build
r44e8541 rfdfb24e 44 44 '../../generic/src/vprintf.c', 45 45 '../../generic/src/printf.c', 46 '../../ generic/src/str.c',46 '../../../common/str.c', 47 47 '../../generic/src/version.c', 48 48 '../../generic/src/inflate.c', -
boot/generic/include/assert.h
r44e8541 rfdfb24e 1 1 /* 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 2005 Martin Decky 4 * Copyright (c) 2011 Oleg Romanenko 2 * Copyright (c) 2023 Jiří Zárevúcky 5 3 * All rights reserved. 6 4 * … … 29 27 */ 30 28 31 /** @file 32 */ 29 #ifndef BOOT_ASSERT_H_ 30 #define BOOT_ASSERT_H_ 33 31 34 #ifndef BOOT_STR_H_ 35 #define BOOT_STR_H_ 32 #define assert(expr) ((void) (expr)) 36 33 37 #include <errno.h> 38 #include <stdbool.h> 39 #include <stddef.h> 40 #include <uchar.h> 41 42 /* Common Unicode characters */ 43 #define U_SPECIAL '?' 44 45 /** No size limit constant */ 46 #define STR_NO_LIMIT ((size_t) -1) 47 48 extern char32_t str_decode(const char *str, size_t *offset, size_t sz); 49 extern errno_t chr_encode(char32_t ch, char *str, size_t *offset, size_t sz); 50 51 extern size_t str_size(const char *str); 52 extern size_t str_lsize(const char *str, size_t max_len); 53 extern size_t str_length(const char *str); 54 55 extern bool ascii_check(char32_t ch); 56 extern bool chr_check(char32_t ch); 57 58 extern int str_cmp(const char *s1, const char *s2); 59 extern void str_cpy(char *dest, size_t size, const char *src); 60 61 #endif 62 63 /** @} 64 */ 34 #endif /* BOOT_ASSERT_H_ */ -
boot/generic/include/errno.h
r44e8541 rfdfb24e 39 39 #define EINVAL -14 /* Invalid value. */ 40 40 #define EOVERFLOW -16 /* The result does not fit its size. */ 41 #define EIO -17 41 42 42 43 typedef int errno_t; -
common/include/str.h
r44e8541 rfdfb24e 45 45 #include <mem.h> 46 46 #include <_bits/decls.h> 47 #include <_bits/uchar.h> 47 48 48 49 #ifndef __cplusplus … … 50 51 /* Common Unicode characters */ 51 52 #define U_SPECIAL '?' 53 54 #define U_LEFT_ARROW 0x2190 55 #define U_UP_ARROW 0x2191 56 #define U_RIGHT_ARROW 0x2192 57 #define U_DOWN_ARROW 0x2193 58 59 #define U_PAGE_UP 0x21de 60 #define U_PAGE_DOWN 0x21df 61 62 #define U_HOME_ARROW 0x21f1 63 #define U_END_ARROW 0x21f2 64 65 #define U_NULL 0x2400 66 #define U_ESCAPE 0x241b 67 #define U_DELETE 0x2421 68 69 #define U_CURSOR 0x2588 52 70 53 71 /** No size limit constant */ -
common/str_error.c
r44e8541 rfdfb24e 28 28 */ 29 29 30 #include <str_error.h> 31 30 32 #include <errno.h> 31 #include <str.h> 33 #include <stddef.h> 34 32 35 33 36 /* … … 64 67 /* 65 68 * Just a dumb linear search. 66 * There too few entries to warrant anything smarter.69 * There are too few entries to warrant anything smarter. 67 70 */ 68 71 … … 86 89 } 87 90 88 return "(unknown)";91 return NULL; 89 92 } 90 93 … … 97 100 } 98 101 99 return "Unknown error code";102 return NULL; 100 103 } -
common/strtol.c
r44e8541 rfdfb24e 269 269 long strtol(const char *nptr, char **endptr, int base) 270 270 { 271 #if !__STDC_HOSTED__ 272 errno_t errno; 273 #endif 274 271 275 return _strtosigned(nptr, endptr, base, LONG_MIN, LONG_MAX, &errno, false); 272 276 } … … 287 291 unsigned long strtoul(const char *nptr, char **endptr, int base) 288 292 { 293 #if !__STDC_HOSTED__ 294 errno_t errno; 295 #endif 296 289 297 return _strtounsigned(nptr, endptr, base, ULONG_MAX, &errno, false); 290 298 } … … 292 300 long long strtoll(const char *nptr, char **endptr, int base) 293 301 { 302 #if !__STDC_HOSTED__ 303 errno_t errno; 304 #endif 305 294 306 return _strtosigned(nptr, endptr, base, LLONG_MIN, LLONG_MAX, &errno, false); 295 307 } … … 297 309 unsigned long long strtoull(const char *nptr, char **endptr, int base) 298 310 { 311 #if !__STDC_HOSTED__ 312 errno_t errno; 313 #endif 314 299 315 return _strtounsigned(nptr, endptr, base, ULLONG_MAX, &errno, false); 300 316 } … … 302 318 intmax_t strtoimax(const char *nptr, char **endptr, int base) 303 319 { 320 #if !__STDC_HOSTED__ 321 errno_t errno; 322 #endif 323 304 324 return _strtosigned(nptr, endptr, base, INTMAX_MIN, INTMAX_MAX, &errno, false); 305 325 } … … 307 327 uintmax_t strtoumax(const char *nptr, char **endptr, int base) 308 328 { 329 #if !__STDC_HOSTED__ 330 errno_t errno; 331 #endif 332 309 333 return _strtounsigned(nptr, endptr, base, UINTMAX_MAX, &errno, false); 310 334 } -
kernel/generic/meson.build
r44e8541 rfdfb24e 36 36 37 37 generic_src += files( 38 'common/stdc/calloc.c', 39 'common/stdc/ctype.c', 38 40 'common/stdc/mem.c', 41 'common/str.c', 42 'common/str_error.c', 43 'common/strtol.c', 39 44 40 45 'src/adt/bitmap.c', … … 77 82 'src/lib/ra.c', 78 83 'src/lib/rd.c', 79 'src/lib/str.c',80 'src/lib/strtol.c',81 'src/lib/str_error.c',82 84 'src/lib/ubsan.c', 83 85 'src/log/log.c', -
kernel/generic/src/console/kconsole.c
r44e8541 rfdfb24e 599 599 /* It's a number - convert it */ 600 600 uint64_t value; 601 c har *end;601 const char *end; 602 602 errno_t rc = str_uint64_t(text, &end, 0, false, &value); 603 603 if (end != text + len) -
kernel/generic/src/main/kinit.c
r44e8541 rfdfb24e 69 69 #include <ipc/ipc.h> 70 70 #include <str.h> 71 #include <str_error.h> 71 72 #include <sysinfo/stats.h> 72 73 #include <sysinfo/sysinfo.h> -
kernel/generic/src/mm/backend_user.c
r44e8541 rfdfb24e 50 50 #include <log.h> 51 51 #include <str.h> 52 #include <str_error.h> 52 53 53 54 static bool user_create(as_area_t *); -
kernel/generic/src/proc/program.c
r44e8541 rfdfb24e 49 49 #include <lib/elf_load.h> 50 50 #include <str.h> 51 #include <str_error.h> 51 52 #include <log.h> 52 53 #include <syscall/copy.h> -
uspace/lib/c/meson.build
r44e8541 rfdfb24e 61 61 62 62 src += files( 63 'common/stdc/ctype.c', 63 64 'common/stdc/mem.c', 64 65 'common/stdc/bsearch.c', 65 66 'common/stdc/qsort.c', 66 67 'common/stdc/calloc.c', 68 'common/str.c', 69 'common/str_error.c', 70 'common/strtol.c', 67 71 68 72 'generic/libc.c', … … 75 79 'generic/context.c', 76 80 'generic/corecfg.c', 77 'generic/ctype.c',78 81 'generic/device/clock_dev.c', 79 82 'generic/device/hw_res.c', … … 91 94 'generic/ipc_test.c', 92 95 'generic/loc.c', 93 'generic/str.c',94 96 'generic/string.c', 95 'generic/str_error.c',96 'generic/strtol.c',97 97 'generic/l18n/langs.c', 98 98 'generic/pcb.c', -
uspace/lib/posix/include/posix/ctype.h
r44e8541 rfdfb24e 37 37 #define POSIX_CTYPE_H_ 38 38 39 #include < libc/ctype.h>39 #include <common/ctype.h> 40 40 41 41 __C_DECLS_BEGIN;
Note:
See TracChangeset
for help on using the changeset viewer.