5 |
#ifndef LIBGUILE_SNARF_H |
#ifndef LIBGUILE_SNARF_H |
6 |
#define LIBGUILE_SNARF_H |
#define LIBGUILE_SNARF_H |
7 |
|
|
8 |
/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. |
/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2003 Free Software Foundation, Inc. |
9 |
* |
* |
10 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
11 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
109 |
)\ |
)\ |
110 |
SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) |
SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) |
111 |
|
|
112 |
|
#define SCM_PRIMITIVE_GENERIC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ |
113 |
|
SCM_SNARF_HERE(\ |
114 |
|
static const char s_ ## FNAME [] = PRIMNAME; \ |
115 |
|
static SCM g_ ## FNAME; \ |
116 |
|
SCM FNAME ARGLIST\ |
117 |
|
)\ |
118 |
|
SCM_SNARF_INIT(\ |
119 |
|
g_ ## FNAME = SCM_PACK (0); \ |
120 |
|
scm_c_define_gsubr_with_generic (s_ ## FNAME, REQ, OPT, VAR, \ |
121 |
|
(SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME, \ |
122 |
|
&g_ ## FNAME); \ |
123 |
|
)\ |
124 |
|
SCM_SNARF_DOCS(primitive, FNAME, PRIMNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) |
125 |
|
|
126 |
#define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ |
#define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ |
127 |
SCM_SNARF_HERE(\ |
SCM_SNARF_HERE(\ |
128 |
static const char s_ ## FNAME [] = PRIMNAME; \ |
static const char s_ ## FNAME [] = PRIMNAME; \ |
131 |
SCM_SNARF_INIT(scm_c_define_subr (s_ ## FNAME, TYPE, FNAME); ) \ |
SCM_SNARF_INIT(scm_c_define_subr (s_ ## FNAME, TYPE, FNAME); ) \ |
132 |
SCM_SNARF_DOCS(1, FNAME, PRIMNAME, ARGLIST, 2, 0, 0, DOCSTRING) |
SCM_SNARF_DOCS(1, FNAME, PRIMNAME, ARGLIST, 2, 0, 0, DOCSTRING) |
133 |
|
|
134 |
|
#define SCM_PRIMITIVE_GENERIC_1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ |
135 |
|
SCM_SNARF_HERE(\ |
136 |
|
static const char s_ ## FNAME [] = PRIMNAME; \ |
137 |
|
static SCM g_ ## FNAME; \ |
138 |
|
SCM FNAME ARGLIST\ |
139 |
|
)\ |
140 |
|
SCM_SNARF_INIT(\ |
141 |
|
g_ ## FNAME = SCM_PACK (0); \ |
142 |
|
scm_c_define_subr_with_generic (s_ ## FNAME, TYPE, FNAME, &g_ ## FNAME); \ |
143 |
|
)\ |
144 |
|
SCM_SNARF_DOCS(1, FNAME, PRIMNAME, ARGLIST, 2, 0, 0, DOCSTRING) |
145 |
|
|
146 |
#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ |
#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ |
147 |
SCM_SNARF_HERE(static const char RANAME[]=STR) \ |
SCM_SNARF_HERE(static const char RANAME[]=STR) \ |
148 |
SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \ |
SCM_SNARF_INIT(scm_c_define_gsubr (RANAME, REQ, OPT, VAR, \ |