소스 검색

Merge branch 'isspace' into 'master'

ctype: fix isspace to test all space class characters

See merge request redox-os/relibc!182
Jeremy Soller 6 년 전
부모
커밋
ca75bbc1c9
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/header/ctype/mod.rs

+ 6 - 1
src/header/ctype/mod.rs

@@ -54,7 +54,12 @@ pub extern "C" fn ispunct(c: c_int) -> c_int {
 
 #[no_mangle]
 pub extern "C" fn isspace(c: c_int) -> c_int {
-    (c == 0x20) as c_int
+    (c == ' ' as c_int
+        || c == '\t' as c_int
+        || c == '\n' as c_int
+        || c == '\r' as c_int
+        || c == 0x0b
+        || c == 0x0c) as c_int
 }
 
 #[no_mangle]