]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.0
authorfred <fred>
Sat, 23 Oct 1999 22:34:35 +0000 (22:34 +0000)
committerfred <fred>
Sat, 23 Oct 1999 22:34:35 +0000 (22:34 +0000)
lily/include/property-inspect.hh [new file with mode: 0644]
lily/property-inspect.cc [new file with mode: 0644]

diff --git a/lily/include/property-inspect.hh b/lily/include/property-inspect.hh
new file mode 100644 (file)
index 0000000..31d26ac
--- /dev/null
@@ -0,0 +1,20 @@
+/*   
+  property-inspect.hh -- declare various property related funcs.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef PROPERTY_INSPECT_HH
+#define PROPERTY_INSPECT_HH
+
+#include "direction.hh"
+#include "lily-guile.hh"
+
+bool isdir_b (SCM s);
+Direction to_dir (SCM s);
+
+#endif /* PROPERTY_INSPECT_HH */
+
diff --git a/lily/property-inspect.cc b/lily/property-inspect.cc
new file mode 100644 (file)
index 0000000..5e29f41
--- /dev/null
@@ -0,0 +1,27 @@
+/*   
+  property-inspect.cc --  implement Property inspect funcs.
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "property-inspect.hh"
+
+bool
+isdir_b (SCM s)
+{
+  if (SCM_NUMBERP (s))
+    {
+      int i = gh_int2scm (s);
+      return i>= -1 && i <= 1; 
+    }
+  return false;
+}
+
+Direction
+to_dir (SCM s)
+{
+  return (Direction) gh_scm2int (s);
+}