regex-posix.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef SCM_REGEX_POSIX_H
  2. #define SCM_REGEX_POSIX_H
  3. /* Copyright 1997-1998,2000-2001,2006,2008,2018
  4. Free Software Foundation, Inc.
  5. This file is part of Guile.
  6. Guile is free software: you can redistribute it and/or modify it
  7. under the terms of the GNU Lesser General Public License as published
  8. by the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. Guile is distributed in the hope that it will be useful, but WITHOUT
  11. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
  13. License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with Guile. If not, see
  16. <https://www.gnu.org/licenses/>. */
  17. #include <libguile/error.h>
  18. SCM_API scm_t_bits scm_tc16_regex;
  19. #define SCM_RGX(X) ((regex_t *) SCM_SMOB_DATA (X))
  20. #define SCM_RGXP(X) (SCM_SMOB_PREDICATE (scm_tc16_regex, (X)))
  21. #define SCM_VALIDATE_RGXP(pos, a) SCM_MAKE_VALIDATE_MSG (pos, a, RGXP, "regexp")
  22. SCM_API SCM scm_make_regexp (SCM pat, SCM flags);
  23. SCM_API SCM scm_regexp_p (SCM x);
  24. SCM_API SCM scm_regexp_exec (SCM rx, SCM str, SCM start, SCM flags);
  25. SCM_INTERNAL void scm_init_regex_posix (void);
  26. #endif /* SCM_REGEX_POSIX_H */