Bug fixes.
[bpt/guile.git] / srfi / srfi-14.h
1 #ifndef SCM_SRFI_14_H
2 #define SCM_SRFI_14_H
3 /* srfi-14.c --- SRFI-14 procedures for Guile
4 *
5 * Copyright (C) 2001 Free Software Foundation, Inc.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2, or (at
10 * your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this software; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
21 *
22 * As a special exception, the Free Software Foundation gives
23 * permission for additional uses of the text contained in its release
24 * of GUILE.
25 *
26 * The exception is that, if you link the GUILE library with other
27 * files to produce an executable, this does not by itself cause the
28 * resulting executable to be covered by the GNU General Public
29 * License. Your use of that executable is in no way restricted on
30 * account of linking the GUILE library code into it.
31 *
32 * This exception does not however invalidate any other reasons why
33 * the executable file might be covered by the GNU General Public
34 * License.
35 *
36 * This exception applies only to the code released by the Free
37 * Software Foundation under the name GUILE. If you copy code from
38 * other Free Software Foundation releases into a copy of GUILE, as
39 * the General Public License permits, the exception does not apply to
40 * the code that you add in this way. To avoid misleading anyone as
41 * to the status of such modified files, you must delete this
42 * exception notice from them.
43 *
44 * If you write modifications of your own for GUILE, it is your choice
45 * whether to permit this exception to apply to your modifications.
46 * If you do not wish that, delete this exception notice. */
47 \f
48
49 #define SCM_CHARSET_SIZE 256
50
51 #define SCM_CHARSET_GET(cs, idx) (((long *) SCM_SMOB_DATA (cs))\
52 [(idx) / sizeof (long)] & (1 << ((idx) % sizeof (long))))
53
54 #define SCM_CHARSETP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_charset))
55
56 /* Smob type code for character sets. */
57 extern int scm_tc16_charset;
58
59 void scm_init_srfi_14 (void);
60
61 #endif /* SCM_SRFI_14_H */