~peter-pearse/ubuntu/natty/guile-1.8/prop001

« back to all changes in this revision

Viewing changes to libguile/srcprop.h

  • Committer: Bazaar Package Importer
  • Author(s): Rob Browning
  • Date: 2008-05-10 12:18:50 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080510121850-mwi7tobbfkat03vr
Tags: 1.8.5+1-1
* Incorporate new upstream stable release.

* Fix gcc 4.3 compilation problems (fixed upstream now).  Thanks to
  Alexander Schmehl <tolimar@debian.org> for the previous, related
  1.8.4+1-2.1 NMU, and to Maximiliano Curia and Daniel Schepler for the
  original patch. (closes: #462384, #466778)

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
/* {Source properties}
51
51
 */
 
52
#define SCM_PROCTRACEP(x) (scm_is_true (scm_procedure_property (x, scm_sym_trace)))
 
53
#define SCM_SOURCE_PROPERTY_FLAG_BREAK 1
52
54
 
53
55
SCM_API scm_t_bits scm_tc16_srcprops;
54
56
 
55
 
typedef struct scm_t_srcprops
56
 
{
57
 
  unsigned long pos;
58
 
  SCM fname;
59
 
  SCM copy;
60
 
  SCM plist;
61
 
} scm_t_srcprops;
62
 
 
63
 
#define SRCPROPS_CHUNKSIZE 2047 /* Number of srcprops per chunk */
64
 
typedef struct scm_t_srcprops_chunk
65
 
{
66
 
  struct scm_t_srcprops_chunk *next;
67
 
  scm_t_srcprops srcprops[1];
68
 
} scm_t_srcprops_chunk;
69
 
 
70
 
#define SCM_SOURCE_PROPERTY_FLAG_BREAK 1
71
 
 
72
 
#define SRCPROPSP(p) (SCM_SMOB_PREDICATE (scm_tc16_srcprops, (p)))
73
 
#define SRCPROPBRK(p) (SCM_SMOB_FLAGS (p) & SCM_SOURCE_PROPERTY_FLAG_BREAK)
74
 
#define SRCPROPPOS(p) ((scm_t_srcprops *) SCM_SMOB_DATA (p))->pos
75
 
#define SRCPROPLINE(p) (SRCPROPPOS(p) >> 12)
76
 
#define SRCPROPCOL(p) (SRCPROPPOS(p) & 0x0fffL)
77
 
#define SRCPROPFNAME(p) ((scm_t_srcprops *) SCM_SMOB_DATA (p))->fname
78
 
#define SRCPROPCOPY(p) ((scm_t_srcprops *) SCM_SMOB_DATA (p))->copy
79
 
#define SRCPROPPLIST(p) ((scm_t_srcprops *) SCM_SMOB_DATA (p))->plist
80
 
#define SETSRCPROPBRK(p) \
81
 
 (SCM_SET_SMOB_FLAGS ((p), \
82
 
                      SCM_SMOB_FLAGS (p) | SCM_SOURCE_PROPERTY_FLAG_BREAK))
83
 
#define CLEARSRCPROPBRK(p)  \
84
 
 (SCM_SET_SMOB_FLAGS ((p), \
85
 
                      SCM_SMOB_FLAGS (p) & ~SCM_SOURCE_PROPERTY_FLAG_BREAK))
86
 
#define SRCPROPMAKPOS(l, c) (((l) << 12) + (c))
87
 
#define SETSRCPROPPOS(p, l, c) (SRCPROPPOS (p) = SRCPROPMAKPOS (l, c))
88
 
#define SETSRCPROPLINE(p, l) SETSRCPROPPOS (p, l, SRCPROPCOL (p))
89
 
#define SETSRCPROPCOL(p, c) SETSRCPROPPOS (p, SRCPROPLINE (p), c)
90
 
 
91
 
#define PROCTRACEP(x) (scm_is_true (scm_procedure_property (x, scm_sym_trace)))
92
 
 
93
57
SCM_API SCM scm_sym_filename;
94
58
SCM_API SCM scm_sym_copy;
95
59
SCM_API SCM scm_sym_line;