Changeset 90924df in mainline for uspace/lib/c
- Timestamp:
- 2012-04-08T12:08:49Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f2b3d3e
- Parents:
- d9f53877 (diff), f3378ba (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:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/arm32/src/eabi.S
rd9f53877 r90924df 1 1 # 2 # Copyright (c) 20 07 Pavel Jancik2 # Copyright (c) 2012 Martin Decky 3 3 # All rights reserved. 4 4 # … … 31 31 .global __aeabi_read_tp 32 32 33 .global __aeabi_idiv 34 .global __aeabi_uidiv 35 36 .global __aeabi_idivmod 37 .global __aeabi_uidivmod 38 39 .global __aeabi_ldivmod 40 .global __aeabi_uldivmod 41 33 42 __aeabi_read_tp: 34 43 mov r0, r9 35 44 mov pc, lr 45 46 __aeabi_idiv: 47 push {sp, lr} 48 bl __divsi3 49 ldr lr, [sp, #4] 50 add sp, sp, #8 51 bx lr 52 53 __aeabi_uidiv: 54 push {sp, lr} 55 bl __udivsi3 56 ldr lr, [sp, #4] 57 add sp, sp, #8 58 bx lr 59 60 __aeabi_idivmod: 61 sub sp, sp, #8 62 push {sp, lr} 63 bl __divmodsi3 64 ldr lr, [sp, #4] 65 add sp, sp, #8 66 pop {r1, r2} 67 bx lr 68 69 __aeabi_uidivmod: 70 sub sp, sp, #8 71 push {sp, lr} 72 bl __udivmodsi3 73 ldr lr, [sp, #4] 74 add sp, sp, #8 75 pop {r1, r2} 76 bx lr 77 78 __aeabi_ldivmod: 79 sub sp, sp, #8 80 push {sp, lr} 81 bl __divmoddi3 82 ldr lr, [sp, #4] 83 add sp, sp, #8 84 pop {r2, r3} 85 bx lr 86 87 __aeabi_uldivmod: 88 sub sp, sp, #8 89 push {sp, lr} 90 bl __udivmoddi3 91 ldr lr, [sp, #4] 92 add sp, sp, #8 93 pop {r2, r3} 94 bx lr -
uspace/lib/c/generic/str.c
rd9f53877 r90924df 46 46 #include <mem.h> 47 47 #include <str.h> 48 49 /** Check the condition if wchar_t is signed */ 50 #ifdef WCHAR_IS_UNSIGNED 51 #define WCHAR_SIGNED_CHECK(cond) (true) 52 #else 53 #define WCHAR_SIGNED_CHECK(cond) (cond) 54 #endif 48 55 49 56 /** Byte mask consisting of lowest @n bits (out of 8) */ … … 399 406 bool ascii_check(wchar_t ch) 400 407 { 401 if ( (ch >= 0) && (ch <= 127))408 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127)) 402 409 return true; 403 410 … … 412 419 bool chr_check(wchar_t ch) 413 420 { 414 if ( (ch >= 0) && (ch <= 1114111))421 if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111)) 415 422 return true; 416 423 … … 513 520 * @param count Size of the destination buffer (must be > 0). 514 521 * @param src Source string. 522 * 515 523 */ 516 524 void str_cpy(char *dest, size_t size, const char *src) … … 545 553 * @param src Source string. 546 554 * @param n Maximum number of bytes to read from @a src. 555 * 547 556 */ 548 557 void str_ncpy(char *dest, size_t size, const char *src, size_t n)
Note:
See TracChangeset
for help on using the changeset viewer.