Update README on using libraries in non-standard locations
[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
e20d7001 6/* Copyright (C) 1995,1996,1998,2000,2001, 2006, 2008, 2009 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
e20d7001
LC
29/* Return an integer describing the arity of GSUBR, a subr of type
30 `scm_tc7_gsubr'. The result can be interpreted with `SCM_GSUBR_REQ ()'
31 and similar. */
32#define SCM_GSUBR_TYPE(gsubr) (SCM_CELL_TYPE (gsubr) >> 8)
33
dc0938d8 34#define SCM_GSUBR_MAKTYPE(req, opt, rst) ((req)|((opt)<<4)|((rst)<<8))
e20d7001 35#define SCM_GSUBR_MAX 33
c014a02e
ML
36#define SCM_GSUBR_REQ(x) ((long)(x)&0xf)
37#define SCM_GSUBR_OPT(x) (((long)(x)&0xf0)>>4)
38#define SCM_GSUBR_REST(x) ((long)(x)>>8)
dc0938d8 39
33b001fd
MV
40SCM_API SCM scm_c_make_gsubr (const char *name,
41 int req, int opt, int rst, SCM (*fcn) ());
42SCM_API SCM scm_c_make_gsubr_with_generic (const char *name,
43 int req, int opt, int rst,
44 SCM (*fcn) (), SCM *gf);
45SCM_API SCM scm_c_define_gsubr (const char *name,
46 int req, int opt, int rst, SCM (*fcn) ());
47SCM_API SCM scm_c_define_gsubr_with_generic (const char *name,
48 int req, int opt, int rst,
49 SCM (*fcn) (), SCM *gf);
9d78586f 50
8321ed20
LC
51SCM_INTERNAL SCM scm_i_gsubr_apply (SCM proc, SCM arg, ...);
52SCM_INTERNAL SCM scm_i_gsubr_apply_list (SCM proc, SCM args);
102dbb6f 53SCM_INTERNAL void scm_init_gsubr (void);
9d78586f 54
dee01b01 55#endif /* SCM_GSUBR_H */
89e00824
ML
56
57/*
58 Local Variables:
59 c-file-style: "gnu"
60 End:
61*/