X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffunction-documentation.cc;h=bfa68ec5465c33fbd0e54ffcc75480c9c557a36e;hb=205203e856ba125f43b9caa66fc7177db16a6db9;hp=b65461d81a7da5a0cada1c1f8305f8ddf9c0b10a;hpb=aa4e6cdf7c4e830a3389e237620725cea144dbde;p=lilypond.git diff --git a/lily/function-documentation.cc b/lily/function-documentation.cc index b65461d81a..bfa68ec546 100644 --- a/lily/function-documentation.cc +++ b/lily/function-documentation.cc @@ -1,10 +1,9 @@ -/* - 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 @@ -12,21 +11,21 @@ #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 (!scm_is_vector (doc_hash_table)) - doc_hash_table = scm_make_vector (scm_int2num (59), SCM_EOL); + 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 +33,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; }