]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/function-documentation.cc
Merge with master
[lilypond.git] / lily / function-documentation.cc
index 622d3140bc1a5402fc39e6e54918676f6c349b0d..38e85837c0f6397b894c3f14b29cf67b59e6c5bc 100644 (file)
@@ -13,6 +13,11 @@ using namespace std;
 #include "lily-guile.hh"
 #include "warn.hh"
 
+/* type predicates. */
+#include "spanner.hh"
+#include "item.hh"
+
+
 static SCM doc_hash_table;
 
 void
@@ -74,3 +79,34 @@ predicate_to_typename (void *ptr)
   else
     return type_names[ptr];
 }
+
+static int
+arg_dir (int a, int b)
+{
+  if (&a < &b)
+    return 1;
+  else
+    return -1;
+}
+
+
+int function_argument_direction;
+void
+init_func_doc ()
+{
+  function_argument_direction = arg_dir (2,3);
+
+  ly_add_type_predicate ((void*) &scm_is_integer, "integer");
+  ly_add_type_predicate ((void*) &scm_is_bool, "boolean");
+  ly_add_type_predicate ((void*) &scm_is_pair, "pair");
+  ly_add_type_predicate ((void*) &is_number_pair, "number pair");
+  ly_add_type_predicate ((void*) &scm_is_number, "number");
+  ly_add_type_predicate ((void*) &scm_is_string, "string");
+  ly_add_type_predicate ((void*) &ly_is_symbol, "symbol");
+  ly_add_type_predicate ((void*) &scm_is_vector, "vector");
+  ly_add_type_predicate ((void*) &is_axis, "axis");
+  ly_add_type_predicate ((void*) &unsmob_spanner, "spanner");
+  ly_add_type_predicate ((void*) &unsmob_item, "item");
+}
+
+ADD_SCM_INIT_FUNC(func_doc, init_func_doc);