chars.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* classes: h_files */
  2. #ifndef SCM_CHARS_H
  3. #define SCM_CHARS_H
  4. /* Copyright (C) 1995,1996,2000,2001,2004, 2006 Free Software Foundation, Inc.
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include "libguile/__scm.h"
  21. /* Immediate Characters
  22. */
  23. #define SCM_CHARP(x) (SCM_ITAG8(x) == scm_tc8_char)
  24. #define SCM_CHAR(x) ((unsigned int)SCM_ITAG8_DATA(x))
  25. #define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8((scm_t_bits) (unsigned char) (x), scm_tc8_char)
  26. SCM_API char *const scm_charnames[];
  27. SCM_API int scm_n_charnames;
  28. SCM_API const char scm_charnums[];
  29. SCM_API SCM scm_char_p (SCM x);
  30. SCM_API SCM scm_char_eq_p (SCM x, SCM y);
  31. SCM_API SCM scm_char_less_p (SCM x, SCM y);
  32. SCM_API SCM scm_char_leq_p (SCM x, SCM y);
  33. SCM_API SCM scm_char_gr_p (SCM x, SCM y);
  34. SCM_API SCM scm_char_geq_p (SCM x, SCM y);
  35. SCM_API SCM scm_char_ci_eq_p (SCM x, SCM y);
  36. SCM_API SCM scm_char_ci_less_p (SCM x, SCM y);
  37. SCM_API SCM scm_char_ci_leq_p (SCM x, SCM y);
  38. SCM_API SCM scm_char_ci_gr_p (SCM x, SCM y);
  39. SCM_API SCM scm_char_ci_geq_p (SCM x, SCM y);
  40. SCM_API SCM scm_char_alphabetic_p (SCM chr);
  41. SCM_API SCM scm_char_numeric_p (SCM chr);
  42. SCM_API SCM scm_char_whitespace_p (SCM chr);
  43. SCM_API SCM scm_char_upper_case_p (SCM chr);
  44. SCM_API SCM scm_char_lower_case_p (SCM chr);
  45. SCM_API SCM scm_char_is_both_p (SCM chr);
  46. SCM_API SCM scm_char_to_integer (SCM chr);
  47. SCM_API SCM scm_integer_to_char (SCM n);
  48. SCM_API SCM scm_char_upcase (SCM chr);
  49. SCM_API SCM scm_char_downcase (SCM chr);
  50. SCM_API int scm_c_upcase (unsigned int c);
  51. SCM_API int scm_c_downcase (unsigned int c);
  52. SCM_API void scm_init_chars (void);
  53. #endif /* SCM_CHARS_H */
  54. /*
  55. Local Variables:
  56. c-file-style: "gnu"
  57. End:
  58. */