- Timestamp:
- 2019-02-11T22:31:04Z (7 years ago)
- Children:
- aaf9789c
- Parents:
- e3272101 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- boot
- Files:
-
- 6 edited
-
Makefile.build (modified) (1 diff)
-
Makefile.common (modified) (6 diffs)
-
generic/include/byteorder.h (modified) (1 diff)
-
generic/include/errno.h (modified) (1 diff)
-
generic/include/str.h (modified) (2 diffs)
-
generic/src/str.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
boot/Makefile.build
re3272101 rd5a89a3 103 103 104 104 %.gz: % 105 gzip -n -k - f $<105 gzip -n -k -9 -f $< 106 106 107 107 $(COMPS).tar: $(COMPONENTS) -
boot/Makefile.common
re3272101 rd5a89a3 94 94 devman \ 95 95 fs/locfs \ 96 hid/compositor \97 96 klog 97 98 ifeq ($(CONFIG_FB), y) 99 RD_SRVS_ESSENTIAL += \ 100 hid/compositor 101 endif 98 102 99 103 RD_SRVS_NON_ESSENTIAL = \ … … 141 145 nic/ar9271 \ 142 146 nic/virtio-net \ 143 block/ahci 147 block/ahci \ 148 block/virtio-blk 144 149 145 150 RD_DRV_CFG = … … 162 167 endif 163 168 164 RD_APPS_ESSENTIAL = bdsh getterm kio vlaunch vterm 169 RD_APPS_ESSENTIAL = \ 170 bdsh \ 171 getterm \ 172 kio 173 174 ifeq ($(CONFIG_FB), y) 175 RD_APPS_ESSENTIAL += \ 176 vlaunch \ 177 vterm 178 endif 165 179 166 180 RD_APPS_NON_ESSENTIAL = \ … … 168 182 bithenge \ 169 183 blkdump \ 170 bnchmark \171 184 contacts \ 172 185 corecfg \ … … 179 192 fdisk \ 180 193 gunzip \ 194 hbench \ 181 195 inet \ 182 196 kill \ … … 192 206 mkmfs \ 193 207 nic \ 194 perf \195 208 sbi \ 196 209 sportdmp \ -
boot/generic/include/byteorder.h
re3272101 rd5a89a3 33 33 */ 34 34 35 #ifndef LIBC_BYTEORDER_H_36 #define LIBC_BYTEORDER_H_35 #ifndef _LIBC_BYTEORDER_H_ 36 #define _LIBC_BYTEORDER_H_ 37 37 38 38 #include <stdint.h> -
boot/generic/include/errno.h
re3272101 rd5a89a3 40 40 #define EOVERFLOW -16 /* The result does not fit its size. */ 41 41 42 typedef int errno_t; 43 42 44 #endif 43 45 -
boot/generic/include/str.h
re3272101 rd5a89a3 1 1 /* 2 * Copyright (c) 2010 Martin Decky 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 2005 Martin Decky 4 * Copyright (c) 2011 Oleg Romanenko 3 5 * All rights reserved. 4 6 * … … 33 35 #define BOOT_STR_H_ 34 36 37 #include <errno.h> 35 38 #include <stdbool.h> 36 39 #include <stddef.h> 37 40 38 /* *<Common Unicode characters */39 #define U_SPECIAL '?'41 /* Common Unicode characters */ 42 #define U_SPECIAL '?' 40 43 41 /** <No size limit constant */44 /** No size limit constant */ 42 45 #define STR_NO_LIMIT ((size_t) -1) 43 46 44 extern wchar_t str_decode(const char * , size_t *, size_t);45 extern int chr_encode(wchar_t, char *, size_t *, size_t);47 extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); 48 extern errno_t chr_encode(wchar_t ch, char *str, size_t *offset, size_t sz); 46 49 47 extern size_t str_size(const char * );48 extern size_t str_lsize(const char * , size_t);49 extern size_t str_length(const char * );50 extern size_t str_size(const char *str); 51 extern size_t str_lsize(const char *str, size_t max_len); 52 extern size_t str_length(const char *str); 50 53 51 extern bool ascii_check(wchar_t );52 extern bool chr_check(wchar_t );54 extern bool ascii_check(wchar_t ch); 55 extern bool chr_check(wchar_t ch); 53 56 54 extern int str_cmp(const char * , const char *);55 extern void str_cpy(char * , size_t, const char *);57 extern int str_cmp(const char *s1, const char *s2); 58 extern void str_cpy(char *dest, size_t size, const char *src); 56 59 57 60 #endif -
boot/generic/src/str.c
re3272101 rd5a89a3 1 1 /* 2 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 2005 Martin Decky 4 * Copyright (c) 2008 Jiri Svoboda 5 * Copyright (c) 2011 Martin Sucha 6 * Copyright (c) 2011 Oleg Romanenko 3 7 * All rights reserved. 4 8 * … … 98 102 */ 99 103 104 #include <str.h> 105 100 106 #include <errno.h> 101 107 #include <stdbool.h> 102 108 #include <stddef.h> 103 109 #include <stdint.h> 104 #include <str.h>105 110 106 111 /** Check the condition if wchar_t is signed */ … … 208 213 * code was invalid. 209 214 */ 210 int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size)215 errno_t chr_encode(const wchar_t ch, char *str, size_t *offset, size_t size) 211 216 { 212 217 if (*offset >= size) … … 392 397 return 1; 393 398 394 if ( (c1 == 0) || (c2 == 0))399 if (c1 == 0 || c2 == 0) 395 400 break; 396 401 }
Note:
See TracChangeset
for help on using the changeset viewer.
