]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/lily-guile.hh
patch::: 1.3.18.jcn3
[lilypond.git] / lily / include / lily-guile.hh
index 1ea707038e2bb00c1e42cabce794287d8e1992c2..c9c4e6a997344594c9b8882f2a444805ae317e84 100644 (file)
@@ -3,19 +3,73 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #ifndef LILY_GUILE_HH
 #define LILY_GUILE_HH
 
-#include "config.hh"
+#include  "string.hh"
+
+#include <guile/gh.h>
+#include <libguile.h>
+#include "direction.hh"
+
+SCM ly_str02scm (char const*c);
+SCM ly_eval_str (String s);
+SCM ly_symbol2scm (char const *);
+String ly_symbol2string (SCM);
+SCM ly_set_x (String name , SCM val);
+
+SCM ly_append (SCM a, SCM b);
+SCM ly_eval (SCM a);
+SCM ly_func_o (char const* name);
+SCM ly_parse_scm (char const* s, int* n);
+SCM ly_quote_scm (SCM s);
+void ly_display_scm (SCM s);
+String ly_scm2string (SCM s);
+SCM array_to_list (SCM *a , int l);
+
+
+#include "array.hh"
+
+void read_lily_scm_file (String);
+void init_lily_guile ();
+
+bool isdir_b (SCM s);
+Direction to_dir (SCM s);
+
+bool to_boolean (SCM s);
+
+void init_ly_protection ();
+unsigned int ly_scm_hash (SCM s);
+
+SCM index_cell (SCM cellp, Direction d);
+SCM index_set_cell (SCM cellp, Direction d, SCM val);
+
+template<class T>SCM array_to_scm (Array<T> arr);
+template<class T>void scm_to_array (SCM s, Array<T>* arr);
+
+//URG how templates suck!
+SCM to_scm (int i);
+void scm_to (SCM s, int* i);
+
+SCM to_scm (Real r);
+void scm_to (SCM s, Real* r);
+
+/*
+  snarfing.
+ */
+void add_scm_init_func (void (*)());
+
+#define ADD_SCM_INIT_FUNC(name, func)\
+class name ## _scm_initter {                   \
+public:\
+  name ## _scm_initter ()                      \
+  {                                            \
+    add_scm_init_func (func);          \
+  }                                            \
+} _ ## name ## _scm_initter;                   \
+/* end define */
 
-#ifdef HAVE_LIBGUILE
-extern "C" { 
-#include <guile/gh.h> 
-}
-#else
-typedef long SCM;
-#endif
 #endif // LILY_GUILE_HH