Update README on using libraries in non-standard locations
[bpt/guile.git] / libguile / programs.h
CommitLineData
8f5cfc81 1/* Copyright (C) 2001 Free Software Foundation, Inc.
17e90c5e 2 *
560b9c25
AW
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
17e90c5e 7 *
560b9c25
AW
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
17e90c5e 12 *
560b9c25
AW
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17e90c5e 17
8f5cfc81
KN
18#ifndef _SCM_PROGRAMS_H_
19#define _SCM_PROGRAMS_H_
17e90c5e
KN
20
21#include <libguile.h>
53e28ed9 22#include <libguile/objcodes.h>
17e90c5e
KN
23
24/*
25 * Programs
26 */
27
28typedef unsigned char scm_byte_t;
29
560b9c25 30SCM_API scm_t_bits scm_tc16_program;
17e90c5e 31
3b9e095b
AW
32#define SCM_F_PROGRAM_IS_BOOT (1<<0)
33
17e90c5e 34#define SCM_PROGRAM_P(x) (SCM_SMOB_PREDICATE (scm_tc16_program, x))
53e28ed9
AW
35#define SCM_PROGRAM_OBJCODE(x) (SCM_SMOB_OBJECT (x))
36#define SCM_PROGRAM_OBJTABLE(x) (SCM_SMOB_OBJECT_2 (x))
37#define SCM_PROGRAM_EXTERNALS(x) (SCM_SMOB_OBJECT_3 (x))
38#define SCM_PROGRAM_DATA(x) (SCM_OBJCODE_DATA (SCM_PROGRAM_OBJCODE (x)))
17e90c5e 39#define SCM_VALIDATE_PROGRAM(p,x) SCM_MAKE_VALIDATE (p, x, PROGRAM_P)
3b9e095b 40#define SCM_PROGRAM_IS_BOOT(x) (SCM_SMOB_FLAGS (x) & SCM_F_PROGRAM_IS_BOOT)
17e90c5e 41
560b9c25 42SCM_API SCM scm_make_program (SCM objcode, SCM objtable, SCM externals);
17e90c5e 43
560b9c25
AW
44SCM_API SCM scm_program_p (SCM obj);
45SCM_API SCM scm_program_base (SCM program);
46SCM_API SCM scm_program_arity (SCM program);
47SCM_API SCM scm_program_meta (SCM program);
48SCM_API SCM scm_program_bindings (SCM program);
49SCM_API SCM scm_program_sources (SCM program);
50SCM_API SCM scm_program_source (SCM program, SCM ip);
51SCM_API SCM scm_program_properties (SCM program);
52SCM_API SCM scm_program_name (SCM program);
53SCM_API SCM scm_program_objects (SCM program);
54SCM_API SCM scm_program_module (SCM program);
55SCM_API SCM scm_program_external (SCM program);
56SCM_API SCM scm_program_external_set_x (SCM program, SCM external);
57SCM_API SCM scm_program_objcode (SCM program);
fcd4901b 58
560b9c25 59SCM_API SCM scm_c_program_source (SCM program, size_t ip);
9a9f6487 60
560b9c25
AW
61SCM_INTERNAL void scm_bootstrap_programs (void);
62SCM_INTERNAL void scm_init_programs (void);
17e90c5e 63
8f5cfc81 64#endif /* _SCM_PROGRAMS_H_ */
17e90c5e
KN
65
66/*
67 Local Variables:
68 c-file-style: "gnu"
69 End:
70*/