Merged revisions 186799 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

................
  r186799 | tilghman | 2009-04-07 17:23:46 -0500 (Tue, 07 Apr 2009) | 10 lines
  
  Merged revisions 186775 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r186775 | tilghman | 2009-04-07 17:16:50 -0500 (Tue, 07 Apr 2009) | 3 lines
    
    Fix Macro documentation to match current (and intended) behavior.
    (See -dev mailing list)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@186805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-04-07 22:30:27 +00:00
parent 47387bc563
commit cfe5f3e0fc

View File

@@ -46,26 +46,22 @@ static char *descrip =
" Macro(macroname,arg1,arg2...): Executes a macro using the context\n" " Macro(macroname,arg1,arg2...): Executes a macro using the context\n"
"'macro-<macroname>', jumping to the 's' extension of that context and\n" "'macro-<macroname>', jumping to the 's' extension of that context and\n"
"executing each step, then returning when the steps end. \n" "executing each step, then returning when the steps end. \n"
"The calling extension, context, and priority are stored in ${MACRO_EXTEN}, \n" "The calling extension, context, and priority are stored in ${MACRO_EXTEN},\n"
"${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively. Arguments become\n" "${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively. Arguments become\n"
"${ARG1}, ${ARG2}, etc in the macro context.\n" "${ARG1}, ${ARG2}, etc in the macro context.\n"
"If you Goto out of the Macro context, the Macro will terminate and control\n" "If you Goto out of the Macro context, the Macro will terminate and control\n"
"will be returned at the location of the Goto.\n" "will be returned at the location of the Goto.\n"
"If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue\n" "If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue\n"
"at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n" "at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n"
"Extensions: While a macro is being executed, it becomes the current context.\n"
" This means that if a hangup occurs, for instance, that the macro\n"
" will be searched for an 'h' extension, NOT the context from which\n"
" the macro was called. So, make sure to define all appropriate\n"
" extensions in your macro! (Note: AEL does not use macros)\n"
"WARNING: Because of the way Macro is implemented (it executes the priorities\n" "WARNING: Because of the way Macro is implemented (it executes the priorities\n"
" contained within it via sub-engine), and a fixed per-thread\n" " contained within it via sub-engine), and a fixed per-thread memory\n"
" memory stack allowance, macros are limited to 7 levels\n" " stack allowance, macros are limited to 7 levels of nesting (macro\n"
" of nesting (macro calling macro calling macro, etc.); It\n" " calling macro calling macro, etc.). It may be possible that\n"
" may be possible that stack-intensive applications in deeply nested macros\n" " stack-intensive applications in deeply nested macros could cause\n"
" could cause asterisk to crash earlier than this limit. It is advised that\n" " Asterisk to crash earlier than this limit. It is advised that if you\n"
" if you need to deeply nest macro calls, that you use the Gosub application\n" " need to deeply nest macro calls, that you use the Gosub application\n"
" (now allows arguments like a Macro) with explict Return() calls instead.\n"; " (now allows arguments like a Macro) with explict Return() calls\n"
" instead.\n";
static char *if_descrip = static char *if_descrip =
" MacroIf(<expr>?macroname_a[,arg1][:macroname_b[,arg1]])\n" " MacroIf(<expr>?macroname_a[,arg1][:macroname_b[,arg1]])\n"