]> git.donarmstrong.com Git - lilypond.git/blob - lily/function-documentation.cc
ly- -> ly:
[lilypond.git] / lily / function-documentation.cc
1 #include "lily-guile.hh"
2 #include "protected-scm.hh"
3
4 static Protected_scm doc_hash_table ;
5
6 void ly_add_function_documentation (char const * fname,
7                                     char const * varlist,
8                                     char const * doc)
9 {
10   if (!gh_vector_p (doc_hash_table ))
11     doc_hash_table = scm_make_vector (gh_int2scm (59), SCM_EOL);
12
13
14   SCM entry = gh_cons (scm_makfrom0str (varlist), scm_makfrom0str (doc));
15   scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry);
16 }
17
18
19 LY_DEFINE(ly_get_all_function_documentation, "ly:get-all-function-documentation",
20           0,0,0, (),
21           "Get a hash table with all lilypond Scheme extension functions.")
22 {
23   return doc_hash_table;
24 }