← Commit list

489a4c1b48

Alhuda Khan
Alhuda Khan
2026-07-23
SUCCESS Duration: 324s

Subject

ctype: exclude control bytes from ISPRINT and ISGRAPH

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/curl_ctype.h+2 -4
@@ -30,10 +30,8 @@
#define ISLOWCNTRL(x) ((unsigned char)(x) <= 0x1f)
#define IS7F(x) ((x) == 0x7f)
-#define ISLOWPRINT(x) (((x) >= 9) && ((x) <= 0x0d))
-
-#define ISPRINT(x) (ISLOWPRINT(x) || (((x) >= ' ') && ((x) <= 0x7e)))
-#define ISGRAPH(x) (ISLOWPRINT(x) || (((x) > ' ') && ((x) <= 0x7e)))
+#define ISPRINT(x) (((x) >= ' ') && ((x) <= 0x7e))
+#define ISGRAPH(x) (((x) > ' ') && ((x) <= 0x7e))
#define ISCNTRL(x) (ISLOWCNTRL(x) || IS7F(x))
#define ISALPHA(x) (ISLOWER(x) || ISUPPER(x))
#define ISXDIGIT(x) (ISDIGIT(x) || ISLOWHEXALPHA(x) || ISUPHEXALPHA(x))
tests/unit/unit1307.c+5 -0
@@ -174,10 +174,15 @@ static CURLcode test_unit1307(const char *arg)
{ "[[:print:]]", "L", MATCH },
{ "[[:print:]]", "\10", NOMATCH },
{ "[[:print:]]", "\10", NOMATCH },
+ { "[[:print:]]", "\t", NOMATCH },
+ { "[[:print:]]", "\n", NOMATCH },
+ { "[[:print:]]", "\r", NOMATCH },
{ "[[:space:]]", " ", MATCH },
{ "[[:space:]]", "x", NOMATCH },
{ "[[:graph:]]", " ", NOMATCH },
{ "[[:graph:]]", "x", MATCH },
+ { "[[:graph:]]", "\t", NOMATCH },
+ { "[[:graph:]]", "\r", NOMATCH },
{ "[[:blank:]]", "\t", MATCH },
{ "[[:blank:]]", " ", MATCH },
{ "[[:blank:]]", "\r", NOMATCH },