X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffunction-documentation.cc;h=9a1fb9daefdfba3c9de8d2e1ea885ca56cf33fca;hb=d3e963c18f2e5958797018191abb9b861ac09bda;hp=f0ba20d55485b9e5a467e7a5b4d971b0af282be1;hpb=c659cb200486c2f908703696a1b2873e78c8160a;p=lilypond.git diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index f0ba20d554..9a1fb9daef 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -1,32 +1,32 @@ -/* - function-documentation.cc -- +/* + function-documentation.cc -- Scheme doc strings. source file of the GNU LilyPond music typesetter - (c) 2004 Han-Wen Nienhuys - + (c) 2004--2005 Han-Wen Nienhuys */ #include +using namespace std; #include "protected-scm.hh" #include "string.hh" -static Protected_scm doc_hash_table ; +static Protected_scm doc_hash_table; void ly_add_function_documentation (SCM func, - char const * fname, - char const * varlist, - char const * doc) + char const *fname, + char const *varlist, + char const *doc) { if (!strlen (doc)) - return ; - - if (!ly_c_vector_p (doc_hash_table )) - doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL); + return; + + if (scm_hash_table_p (doc_hash_table) != SCM_BOOL_T) + doc_hash_table = scm_c_make_hash_table (59); String s = String (" - ") + "LilyPond procedure: " + fname + " " + varlist - + "\n" + doc ; + + "\n" + doc; scm_set_procedure_property_x (func, ly_symbol2scm ("documentation"), scm_makfrom0str (s.to_str0 ())); @@ -34,10 +34,9 @@ void ly_add_function_documentation (SCM func, scm_hashq_set_x (doc_hash_table, ly_symbol2scm (fname), entry); } - LY_DEFINE (ly_get_all_function_documentation, "ly:get-all-function-documentation", - 0,0,0, (), - "Get a hash table with all lilypond Scheme extension functions.") + 0, 0, 0, (), + "Get a hash table with all lilypond Scheme extension functions.") { return doc_hash_table; }