curl_ctype.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef HEADER_CURL_CTYPE_H
  2. #define HEADER_CURL_CTYPE_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
  11. *
  12. * This software is licensed as described in the file COPYING, which
  13. * you should have received as part of this distribution. The terms
  14. * are also available at https://curl.se/docs/copyright.html.
  15. *
  16. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  17. * copies of the Software, and permit persons to whom the Software is
  18. * furnished to do so, under the terms of the COPYING file.
  19. *
  20. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  21. * KIND, either express or implied.
  22. *
  23. ***************************************************************************/
  24. #include "curl_setup.h"
  25. int Curl_isspace(int c);
  26. int Curl_isdigit(int c);
  27. int Curl_isalnum(int c);
  28. int Curl_isxdigit(int c);
  29. int Curl_isgraph(int c);
  30. int Curl_isprint(int c);
  31. int Curl_isalpha(int c);
  32. int Curl_isupper(int c);
  33. int Curl_islower(int c);
  34. int Curl_iscntrl(int c);
  35. #define ISSPACE(x) (Curl_isspace((int) ((unsigned char)x)))
  36. #define ISDIGIT(x) (Curl_isdigit((int) ((unsigned char)x)))
  37. #define ISALNUM(x) (Curl_isalnum((int) ((unsigned char)x)))
  38. #define ISXDIGIT(x) (Curl_isxdigit((int) ((unsigned char)x)))
  39. #define ISGRAPH(x) (Curl_isgraph((int) ((unsigned char)x)))
  40. #define ISALPHA(x) (Curl_isalpha((int) ((unsigned char)x)))
  41. #define ISPRINT(x) (Curl_isprint((int) ((unsigned char)x)))
  42. #define ISUPPER(x) (Curl_isupper((int) ((unsigned char)x)))
  43. #define ISLOWER(x) (Curl_islower((int) ((unsigned char)x)))
  44. #define ISCNTRL(x) (Curl_iscntrl((int) ((unsigned char)x)))
  45. #define ISASCII(x) (((x) >= 0) && ((x) <= 0x80))
  46. #define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
  47. (((unsigned char)x) == '\t'))
  48. #endif /* HEADER_CURL_CTYPE_H */