Skip to contentSkip to conversation

ctype: update comments

RFC PATCH New Ilya V. Matveychikov 1 participant 1 message May 10, 2016

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ctype: update comments

We have isspace() which may be used incorrectly as one might expect that it has the same meaning as POSIX isspace(). Also, kernel has outdated comment about of what is space and hard space exactely.

---
 include/linux/ctype.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
include/linux/ctype.h +13 -2
index 653589e..5c03748 100644
@@ -11,9 +11,20 @@
 #define _D	0x04	/* digit */
 #define _C	0x08	/* cntrl */
 #define _P	0x10	/* punct */
-#define _S	0x20	/* white space (space/lf/tab) */
+#define _S	0x20	/* space
+			   0x09 - Horizontal Tab (HT)
+			   0x0A - Line Feed (LF)
+			   0x0B - Vertical Tab (VT)
+			   0x0C - Form Feed (FF)
+			   0x0D - Carriage Return (CR)
+			   0x20 - Space (SP)
+			   0xA0 - Non-Breakable Space (NBSP)
+			*/
 #define _X	0x40	/* hex digit */
-#define _SP	0x80	/* hard space (0x20) */
+#define _SP	0x80	/* hard space
+			   0x20 - Space (SP)
+			   0xA0 - Non-Breakable Space (NBSP)
+			 */
 
 extern const unsigned char _ctype[];
 
Signature · 1 line
2.8.0