diff options
Diffstat (limited to 'libguile/chars.h')
-rw-r--r-- | libguile/chars.h | 60 |
1 files changed, 28 insertions, 32 deletions
diff --git a/libguile/chars.h b/libguile/chars.h index fea747f1d..f6d4c6354 100644 --- a/libguile/chars.h +++ b/libguile/chars.h @@ -1,35 +1,29 @@ -/* classes: h_files */ - #ifndef SCM_CHARS_H #define SCM_CHARS_H -/* Copyright (C) 1995, 1996, 2000, 2001, 2004, 2006, 2008, 2009, 2019 - * Free Software Foundation, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation; either version 3 of - * the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301 USA - */ +/* Copyright 1995-1996,2000-2001,2004,2006,2008-2009,2018-2019 + Free Software Foundation, Inc. - + This file is part of Guile. + + Guile is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Guile is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. -#include "libguile/__scm.h" + You should have received a copy of the GNU Lesser General Public + License along with Guile. If not, see + <https://www.gnu.org/licenses/>. */ -#ifndef SCM_T_WCHAR_DEFINED -typedef scm_t_int32 scm_t_wchar; -#define SCM_T_WCHAR_DEFINED -#endif /* SCM_T_WCHAR_DEFINED */ + + +#include "libguile/error.h" +#include "libguile/inline.h" /* Immediate Characters @@ -59,6 +53,14 @@ typedef scm_t_int32 scm_t_wchar; || ((scm_t_wchar) (c) > SCM_CODEPOINT_SURROGATE_END \ && (scm_t_wchar) (c) <= SCM_CODEPOINT_MAX)) +#define SCM_VALIDATE_CHAR(pos, scm) SCM_MAKE_VALIDATE_MSG (pos, scm, CHARP, "character") + +#define SCM_VALIDATE_CHAR_COPY(pos, scm, cvar) \ + do { \ + SCM_ASSERT (SCM_CHARP (scm), scm, pos, FUNC_NAME); \ + cvar = SCM_CHAR (scm); \ + } while (0) + SCM_API SCM scm_char_p (SCM x); @@ -104,9 +106,3 @@ scm_c_make_char (scm_t_wchar c) #endif #endif /* SCM_CHARS_H */ - -/* - Local Variables: - c-file-style: "gnu" - End: -*/ |