Skip to content
Snippets Groups Projects
Commit 7e9a4f86 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add some detials to JSDOCS for global methods: log, word_wrap, lfexpand

parent 4a0d83d7
No related branches found
No related tags found
No related merge requests found
Pipeline #5065 passed
...@@ -4925,7 +4925,7 @@ static jsSyncMethodSpec js_global_functions[] = { ...@@ -4925,7 +4925,7 @@ static jsSyncMethodSpec js_global_functions[] = {
,310 ,310
}, },
{"lfexpand", js_lfexpand, 1, JSTYPE_STRING, JSDOCSTR("text") {"lfexpand", js_lfexpand, 1, JSTYPE_STRING, JSDOCSTR("text")
,JSDOCSTR("Expand line-feeds (LF) to carriage-return/line-feeds (CRLF), returns modified string") ,JSDOCSTR("Expand sole line-feeds (LF) to carriage-return/line-feed sequences (CRLF), returns modified string")
,310 ,310
}, },
{"wildmatch", js_wildmatch, 2, JSTYPE_BOOLEAN, JSDOCSTR("[<i>bool</i> case_sensitive=false,] filename [,pattern='*'] [,path=false]") {"wildmatch", js_wildmatch, 2, JSTYPE_BOOLEAN, JSDOCSTR("[<i>bool</i> case_sensitive=false,] filename [,pattern='*'] [,path=false]")
...@@ -5126,7 +5126,8 @@ static jsSyncMethodSpec js_global_functions[] = { ...@@ -5126,7 +5126,8 @@ static jsSyncMethodSpec js_global_functions[] = {
{"word_wrap", js_word_wrap, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79 [,orig_line_length=79 [,<i>bool</i> handle_quotes=true [,<i>bool</i> is_utf8=false]]]]") {"word_wrap", js_word_wrap, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79 [,orig_line_length=79 [,<i>bool</i> handle_quotes=true [,<i>bool</i> is_utf8=false]]]]")
,JSDOCSTR("Return a word-wrapped version of the <i>text</i> string argument optionally handing quotes magically, " ,JSDOCSTR("Return a word-wrapped version of the <i>text</i> string argument optionally handing quotes magically, "
"<i>line_length</i> defaults to <i>79</i>, <i>orig_line_length</i> defaults to <tt>79</tt>, " "<i>line_length</i> defaults to <i>79</i>, <i>orig_line_length</i> defaults to <tt>79</tt>, "
"<i>handle_quotes</i> defaults to <tt>true</tt>, and <i>is_utf8</i> defaults to <tt>false</tt>") "<i>handle_quotes</i> defaults to <tt>true</tt>, and <i>is_utf8</i> defaults to <tt>false</tt>"
"<p>Note: if the original text does not contain any carriage-return (CR) characters, lines are wrapped with sole line-feed (LF) characters.")
,311 ,311
}, },
{"quote_msg", js_quote_msg, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79] [,prefix=\" > \"]") {"quote_msg", js_quote_msg, 1, JSTYPE_STRING, JSDOCSTR("text [,line_length=79] [,prefix=\" > \"]")
......
...@@ -1217,8 +1217,8 @@ js_prompt(JSContext *cx, uintN argc, jsval *arglist) ...@@ -1217,8 +1217,8 @@ js_prompt(JSContext *cx, uintN argc, jsval *arglist)
static jsSyncMethodSpec js_global_functions[] = { static jsSyncMethodSpec js_global_functions[] = {
{"log", js_log, 1, JSTYPE_STRING, JSDOCSTR("[<i>number</i> level=LOG_INFO,] value [,value]") {"log", js_log, 1, JSTYPE_STRING, JSDOCSTR("[<i>number</i> level=LOG_INFO,] value [,value]")
,JSDOCSTR("Add a line of text to the server and/or system log, " ,JSDOCSTR("Add a line of text to the server and/or system log.<br>"
"<i>values</i> are typically string constants or variables, " "<i>values</i> are typically string constants or variables (each logged as a separate log message),<br>"
"<i>level</i> is the severity of the message to be logged, one of the globally-defined values, in decreasing severity:<br>" "<i>level</i> is the severity of the message to be logged, one of the globally-defined values, in decreasing severity:<br>"
"<tt>LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG</tt> (default: <tt>LOG_INFO</tt>)") "<tt>LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, and LOG_DEBUG</tt> (default: <tt>LOG_INFO</tt>)")
,311 ,311
...@@ -1246,7 +1246,7 @@ static jsSyncMethodSpec js_global_functions[] = { ...@@ -1246,7 +1246,7 @@ static jsSyncMethodSpec js_global_functions[] = {
,311 ,311
}, },
{"printf", js_printf, 1, JSTYPE_STRING, JSDOCSTR("<i>string</i> format [,value][,value]") {"printf", js_printf, 1, JSTYPE_STRING, JSDOCSTR("<i>string</i> format [,value][,value]")
,JSDOCSTR("Send a C-style formatted string of text to the output stream") ,JSDOCSTR("Send a C-style formatted string of text to the output stream. See also the <tt>format()</tt> function.")
,310 ,310
}, },
{"alert", js_alert, 1, JSTYPE_VOID, JSDOCSTR("value") {"alert", js_alert, 1, JSTYPE_VOID, JSDOCSTR("value")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment