Doc updates for character encoding of source code files
[bpt/guile.git] / libguile / srcprop.h
CommitLineData
8a5ae618
MD
1/* classes: h_files */
2
b29058ff
DH
3#ifndef SCM_SRCPROP_H
4#define SCM_SRCPROP_H
5
102dbb6f 6/* Copyright (C) 1995,1996,2000,2001, 2006, 2008 Free Software Foundation, Inc.
b29058ff 7 *
73be1d9e 8 * This library is free software; you can redistribute it and/or
53befeb7
NJ
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
b29058ff 12 *
53befeb7
NJ
13 * This library is distributed in the hope that it will be useful, but
14 * 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.
b29058ff 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
53befeb7
NJ
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301 USA
73be1d9e 22 */
d3a6bc94 23
8a5ae618
MD
24\f
25
b4309c3c 26#include "libguile/__scm.h"
8a5ae618
MD
27
28\f
29
8a5ae618
MD
30/* {The old whash table interface}
31 * *fixme* This is a temporary solution until weak hash table access
32 * has been optimized for speed (which is quite necessary, if they are
33 * used for recording of source code positions...)
34 */
35
36#define scm_whash_handle SCM
37
9fec1f77 38#define scm_whash_get_handle(whash, key) scm_hash_fn_get_handle (whash, key, scm_ihashq, scm_sloppy_assq, 0)
7888309b 39#define SCM_WHASHFOUNDP(h) (scm_is_true (h))
8a5ae618
MD
40#define SCM_WHASHREF(whash, handle) SCM_CDR (handle)
41#define SCM_WHASHSET(whash, handle, obj) SCM_SETCDR (handle, obj)
9fec1f77
MD
42#define scm_whash_create_handle(whash, key) scm_hash_fn_create_handle_x (whash, key, SCM_UNSPECIFIED, scm_ihashq, scm_sloppy_assq, 0)
43#define scm_whash_lookup(whash, obj) scm_hash_fn_ref (whash, obj, SCM_BOOL_F, scm_ihashq, scm_sloppy_assq, 0)
44#define scm_whash_insert(whash, key, obj) \
d3a6bc94 45do { \
9fec1f77
MD
46 register SCM w = (whash); \
47 SCM_WHASHSET (w, scm_whash_create_handle (w, key), obj); \
d3a6bc94 48} while (0)
9fec1f77 49
8a5ae618
MD
50
51/* {Source properties}
52 */
b0763985 53#define SCM_PROCTRACEP(x) (scm_is_true (scm_procedure_property (x, scm_sym_trace)))
f5710d53 54#define SCM_SOURCE_PROPERTY_FLAG_BREAK 1
e038c042 55
b0763985 56SCM_API scm_t_bits scm_tc16_srcprops;
8a5ae618 57
33b001fd
MV
58SCM_API SCM scm_sym_filename;
59SCM_API SCM scm_sym_copy;
60SCM_API SCM scm_sym_line;
61SCM_API SCM scm_sym_column;
62SCM_API SCM scm_sym_breakpoint;
34019bd6 63
8a5ae618
MD
64\f
65
bc76d628 66SCM_API int scm_c_source_property_breakpoint_p (SCM form);
33b001fd
MV
67SCM_API SCM scm_make_srcprops (long line, int col, SCM fname, SCM copy, SCM plist);
68SCM_API SCM scm_source_property (SCM obj, SCM key);
69SCM_API SCM scm_set_source_property_x (SCM obj, SCM key, SCM datum);
70SCM_API SCM scm_source_properties (SCM obj);
71SCM_API SCM scm_set_source_properties_x (SCM obj, SCM props);
102dbb6f 72SCM_INTERNAL void scm_init_srcprop (void);
8a5ae618 73
bc76d628
DH
74#if SCM_ENABLE_DEPRECATED == 1
75#define SRCBRKP(x) (scm_source_property_breakpoint_p (x))
76#endif
77
b29058ff 78#endif /* SCM_SRCPROP_H */
89e00824
ML
79
80/*
81 Local Variables:
82 c-file-style: "gnu"
83 End:
84*/