21 _DEFUN(test_is_single
,(i
),
1916 int _DEFUN(def_isascii
,(i
), int i
) { return isascii(i
); }
1917 int _DEFUN(def_iscntrl
,(i
), int i
) { return iscntrl(i
); }
1918 int _DEFUN(def_isspace
,(i
), int i
) { return isspace(i
); }
1919 int _DEFUN(def_isprint
,(i
), int i
) { return isprint(i
); }
1920 int _DEFUN(def_isalnum
,(i
), int i
) { return isalnum(i
); }
1921 int _DEFUN(def_isdigit
,(i
), int i
) { return isdigit(i
); }
1922 int _DEFUN(def_isxdigit
,(i
), int i
) { return isxdigit(i
); }
1923 int _DEFUN(def_isalpha
,(i
), int i
) { return isalpha(i
); }
1924 int _DEFUN(def_isupper
,(i
), int i
) { return isupper(i
); }
1925 int _DEFUN(def_islower
,(i
), int i
) { return islower(i
); }
1926 int _DEFUN(def_isgraph
,(i
), int i
) { return isgraph(i
); }
1927 int _DEFUN(def_ispunct
,(i
), int i
) { return ispunct(i
); }
1928 int _DEFUN(def_tolower
,(i
), int i
) { return tolower(i
); }
1929 int _DEFUN(def_toupper
,(i
), int i
) { return toupper(i
); }
1930 int _DEFUN(def_toascii
,(i
), int i
) { return toascii(i
); }
1931 int _DEFUN(def__tolower
,(i
), int i
) { return _tolower(i
); }
1932 int _DEFUN(def__toupper
,(i
), int i
) { return _toupper(i
); }
1936 _DEFUN(test_is_set
,(func
, name
, p
),
1943 for (i
= 0; i
< 255; i
++) {
1944 int r
= func(i
) != 0;
1949 printf("%s:%d wrong result, is %d shouldbe %d\n", name
, i
, r
,*p
);
1955 _DEFUN(test_to_set
,(func
, name
, p
, low
, high
),
1964 for (i
= low
; i
<= high
; i
++) {
1970 printf("%s:%d wrong result, is %d shouldbe %d\n", name
, i
, r
,*p
);
1996 _DEFUN_VOID(test_is
)
1998 test_is_set(def_isalnum
, "isalnum define", &myalnum
);
1999 test_is_set(def_isalpha
, "isalpha define", &myalpha
);
2000 test_is_set(def_isascii
, "isascii define", &myascii
);
2001 test_is_set(def_iscntrl
, "iscntrl define", &mycntrl
);
2002 test_is_set(def_isdigit
, "isdigit define", &mydigit
);
2003 test_is_set(def_isgraph
, "isgraph define", &mygraph
);
2004 test_is_set(def_islower
, "islower define", &mylower
);
2005 test_is_set(def_isprint
, "isprint define", &myprint
);
2006 test_is_set(def_ispunct
, "ispunct define", &mypunct
);
2007 test_is_set(def_isspace
, "isspace define", &myspace
);
2008 test_is_set(def_isupper
, "isupper define", &myupper
);
2009 test_is_set(def_isxdigit
, "isxdigit define", &myxdigit
);
2010 test_is_set(isalnum
, "isalnum function", &myalnum
);
2011 test_is_set(isalpha
, "isalpha function", &myalpha
);
2012 test_is_set(isascii
, "isascii function", &myascii
);
2013 test_is_set(iscntrl
, "iscntrl function", &mycntrl
);
2014 test_is_set(isgraph
, "isgraph function", &mygraph
);
2015 test_is_set(islower
, "islower function", &mylower
);
2016 test_is_set(isprint
, "isprint function", &myprint
);
2017 test_is_set(ispunct
, "ispunct function", &mypunct
);
2018 test_is_set(isspace
, "isspace function", &myspace
);
2019 test_is_set(isupper
, "isupper function", &myupper
);
2020 test_is_set(isxdigit
, "isxdigit function", &myxdigit
);
2021 test_to_set(_tolower
, "_tolower function", &setlower
, 'A','Z');
2022 test_to_set(_toupper
, "_toupper function", &setupper
, 'a','z');
2023 test_to_set(def__tolower
, "_tolower define", &setlower
, 'A','Z');
2024 test_to_set(def__toupper
, "_toupper define", &setupper
, 'a','z');
2025 test_to_set(def_toascii
, "toascii define", &setascii
, 0,255);
2026 test_to_set(def_tolower
, "tolower define", &setlower
, 0,255);
2027 test_to_set(def_toupper
, "toupper define", &setupper
, 0,255);
2028 test_to_set(toascii
, "toascii function", &setascii
, 0,255);
2029 test_to_set(tolower
, "tolower function", &setlower
, 0,255);
2030 test_to_set(toupper
, "toupper function", &setupper
, 0,255);