(exception:string-contains-nul): New exception pattern.
[bpt/guile.git] / libguile / gsubr.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
dee01b01
DH
3#ifndef SCM_GSUBR_H
4#define SCM_GSUBR_H
5
2b829bbb 6/* Copyright (C) 1995,1996,1998,2000,2001, 2006 Free Software Foundation, Inc.
dee01b01 7 *
73be1d9e
MV
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
dee01b01 12 *
73be1d9e 13 * This library is distributed in the hope that it will be useful,
0f2d19dd 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
73be1d9e
MV
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
dee01b01 17 *
73be1d9e
MV
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
92205699 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
73be1d9e 21 */
dee01b01 22
0f2d19dd
JB
23\f
24
b4309c3c 25#include "libguile/__scm.h"
0f2d19dd
JB
26
27\f
0f2d19dd 28
dc0938d8 29#define SCM_GSUBR_MAKTYPE(req, opt, rst) ((req)|((opt)<<4)|((rst)<<8))
c014a02e
ML
30#define SCM_GSUBR_REQ(x) ((long)(x)&0xf)
31#define SCM_GSUBR_OPT(x) (((long)(x)&0xf0)>>4)
32#define SCM_GSUBR_REST(x) ((long)(x)>>8)
dc0938d8
MD
33
34#define SCM_GSUBR_MAX 10
74cc8503
DH
35#define SCM_GSUBR_TYPE(cclo) (SCM_CCLO_REF ((cclo), 1))
36#define SCM_SET_GSUBR_TYPE(cclo, type) (SCM_CCLO_SET ((cclo), 1, (type)))
37#define SCM_GSUBR_PROC(cclo) (SCM_CCLO_REF ((cclo), 2))
38#define SCM_SET_GSUBR_PROC(cclo, proc) (SCM_CCLO_SET ((cclo), 2, (proc)))
dc0938d8 39
33b001fd 40SCM_API SCM scm_f_gsubr_apply;
dc0938d8 41
33b001fd
MV
42SCM_API SCM scm_c_make_gsubr (const char *name,
43 int req, int opt, int rst, SCM (*fcn) ());
44SCM_API SCM scm_c_make_gsubr_with_generic (const char *name,
45 int req, int opt, int rst,
46 SCM (*fcn) (), SCM *gf);
47SCM_API SCM scm_c_define_gsubr (const char *name,
48 int req, int opt, int rst, SCM (*fcn) ());
49SCM_API SCM scm_c_define_gsubr_with_generic (const char *name,
50 int req, int opt, int rst,
51 SCM (*fcn) (), SCM *gf);
9d78586f 52
33b001fd
MV
53SCM_API SCM scm_gsubr_apply (SCM args);
54SCM_API void scm_init_gsubr (void);
9d78586f 55
dee01b01 56#endif /* SCM_GSUBR_H */
89e00824
ML
57
58/*
59 Local Variables:
60 c-file-style: "gnu"
61 End:
62*/