Changeset 597 for vendor/current/source3/lib/util_str.c
- Timestamp:
- Jul 2, 2011, 4:01:14 PM (14 years ago)
- File:
-
- 1 edited
-
vendor/current/source3/lib/util_str.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/lib/util_str.c
r594 r597 587 587 zero. Strips out all but 'a-Z0-9' and the character in other_safe_chars 588 588 and replaces with '_'. Deliberately does *NOT* check for multibyte 589 characters. Don't change it ! 589 characters. Treats src as an array of bytes, not as a multibyte 590 string. Any byte >0x7f is automatically converted to '_'. 591 other_safe_chars must also contain an ascii string (bytes<0x7f). 590 592 **/ 591 593 … … 623 625 for(i = 0; i < len; i++) { 624 626 int val = (src[i] & 0xff); 625 if (isupper_ascii(val) || islower_ascii(val) || 626 isdigit(val) || strchr_m(other_safe_chars, val)) 627 if (val > 0x7f) { 628 dest[i] = '_'; 629 continue; 630 } 631 if (isupper(val) || islower(val) || 632 isdigit(val) || strchr(other_safe_chars, val)) 627 633 dest[i] = src[i]; 628 634 else
Note:
See TracChangeset
for help on using the changeset viewer.
