]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/lily-guile.hh
patch::: 1.3.11.hwn1
[lilypond.git] / lily / include / lily-guile.hh
1 /*
2   lily-guile.hh encapsulate guile
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #ifndef LILY_GUILE_HH
10 #define LILY_GUILE_HH
11
12 #include  "string.hh"
13
14 #include <guile/gh.h>
15 #include <libguile.h>
16 #include "direction.hh"
17
18 SCM ly_str02scm (char const*c);
19 SCM ly_eval_str (char const*c);
20 SCM ly_symbol2scm (char const *);
21 String ly_symbol2string (SCM);
22 SCM ly_set_x (String name , SCM val);
23
24 SCM ly_append (SCM a, SCM b);
25 SCM ly_eval (SCM a);
26 SCM ly_func_o (char const* name);
27 SCM ly_parse_scm (char const* s, int* n);
28 SCM ly_quote_scm (SCM s);
29 void ly_display_scm (SCM s);
30 String ly_scm2string (SCM s);
31 SCM array_to_list (SCM *a , int l);
32
33
34 #include "array.hh"
35
36 void read_lily_scm_file (String);
37 void init_lily_guile ();
38
39 bool isdir_b (SCM s);
40 Direction to_dir (SCM s);
41
42
43 void init_ly_protection ();
44 unsigned int ly_scm_hash (SCM s);
45
46 SCM index_cell (SCM cellp, Direction d);
47 SCM index_set_cell (SCM cellp, Direction d, SCM val);
48
49 /*
50   snarfing.
51  */
52 void add_scm_init_func (void (*)());
53
54 #define ADD_SCM_INIT_FUNC(name, func)\
55 class name ## _scm_initter {                    \
56 public:\
57   name ## _scm_initter ()                       \
58   {                                             \
59     add_scm_init_func (func);           \
60   }                                             \
61 } _ ## name ## _scm_initter;                    \
62 /* end define */
63
64
65
66 #endif // LILY_GUILE_HH