]> git.donarmstrong.com Git - lilypond.git/blob - lily/lily-guile.cc
a5c47bd39b6347c2b2fee65d81d8b1a27e1ae4db
[lilypond.git] / lily / lily-guile.cc
1 /*
2   lily-guile.cc -- implement assorted guile functions
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "lily-guile.hh"
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 SCM
16 gh_append (SCM a, SCM b)
17 {
18   return gh_call2 (gh_eval_str ("append"), a, b);
19 }
20
21 SCM
22 gh_list1 (SCM a)
23 {
24   return gh_call1 (gh_eval_str ("list"), a);
25 }
26
27 SCM
28 gh_list2(SCM a, SCM b)
29 {
30   return gh_call2 (gh_eval_str ("list"), a, b);
31 }
32
33 SCM
34 gh_quote ()
35 {
36   return gh_eval_str ("'quote");
37 }
38
39 SCM
40 gh_eval (SCM a)
41 {
42   return gh_call1 (gh_eval_str ("eval"), a);
43 }
44
45 SCM
46 gh_lambda_o ()
47 {
48   return gh_eval_str ("'(lambda (o))");
49 }
50
51 SCM
52 gh_func_o (char const* name)
53 {
54   char buf[200];
55   snprintf (buf, 200, "'(%s o)", name);
56   return gh_eval_str (buf);
57 }
58
59 #ifdef __cplusplus
60 }
61 #endif