Changeset 2dd7288 in mainline
- Timestamp:
- 2008-08-10T09:11:44Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d2e9c47
- Parents:
- 5749372
- Location:
- uspace/lib/libc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/string.c
r5749372 r2dd7288 147 147 148 148 return (a[c] - b[c]); 149 150 149 } 151 150 … … 159 158 return ( c < n ? a[c] - b[c] : 0); 160 159 160 } 161 162 int stricmp(const char *a, const char *b) 163 { 164 int c = 0; 165 166 while (a[c] && b[c] && (!(tolower(a[c]) - tolower(b[c])))) 167 c++; 168 169 return (tolower(a[c]) - tolower(b[c])); 161 170 } 162 171 -
uspace/lib/libc/include/ctype.h
r5749372 r2dd7288 77 77 } 78 78 79 static inline int tolower(int c) 80 { 81 if (isupper(c)) 82 return (c + ('a' - 'A' > 0 ? 'a' - 'A' : 'A' - 'a')); 83 else 84 return c; 85 } 86 79 87 #endif 80 88 -
uspace/lib/libc/include/string.h
r5749372 r2dd7288 48 48 extern int strcmp(const char *, const char *); 49 49 extern int strncmp(const char *, const char *, size_t); 50 extern int stricmp(const char *, const char *); 50 51 51 52 extern char *strcpy(char *, const char *);
Note:
See TracChangeset
for help on using the changeset viewer.