Changes in uspace/lib/posix/strings.c [8ecef91:6128390] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/strings.c
r8ecef91 r6128390 38 38 #include "internal/common.h" 39 39 #include "strings.h" 40 41 40 #include "string.h" 42 41 #include "ctype.h" 43 44 #include "libc/mem.h"45 42 46 43 /** … … 51 48 int posix_ffs(int i) 52 49 { 53 if (i == 0) { 54 return 0; 55 } 56 57 int result = 0; 58 59 // XXX: assumes at most 32-bit int 60 if (!(i & 0xFFFF)) { 61 result |= 16; 62 i >>= 16; 63 } 64 if (!(i & 0xFF)) { 65 result |= 8; 66 i >>= 8; 67 } 68 if (!(i & 0xF)) { 69 result |= 4; 70 i >>= 4; 71 } 72 if (!(i & 0x3)) { 73 result |= 2; 74 i >>= 2; 75 } 76 if (!(i & 0x1)) { 77 result |= 1; 78 } 79 80 return result + 1; 50 // TODO 51 not_implemented(); 81 52 } 82 53 … … 124 95 int posix_bcmp(const void *mem1, const void *mem2, size_t n) 125 96 { 126 return bcmp(mem1, mem2, n); 97 // TODO 98 not_implemented(); 127 99 } 128 100 … … 135 107 void posix_bcopy(const void *dest, void *src, size_t n) 136 108 { 137 / * Note that memmove has different order of arguments. */138 memmove(src, dest, n);109 // TODO 110 not_implemented(); 139 111 } 140 112 … … 146 118 void posix_bzero(void *mem, size_t n) 147 119 { 148 bzero(mem, n); 120 // TODO 121 not_implemented(); 149 122 } 150 123
Note:
See TracChangeset
for help on using the changeset viewer.