On 30.01.2019 11:57, Rick McGuire wrote: > > On Wed, Jan 30, 2019 at 5:51 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at > <mailto:rony.flatsc...@wu.ac.at>> wrote: > > Thanks, one last question in this context. > > On 29.01.2019 21:07, Rick McGuire wrote: >> On Tue, Jan 29, 2019 at 1:18 PM Rony G Flatscher <rony.flatsc...@wu.ac.at >> <mailto:rony.flatsc...@wu.ac.at>> wrote: >> >> Looked thru the code, a few quick questions: >> >> If a command handler that has no redirection, would the last >> argument ioctl be NULL? >> >> No, if the command handler is registered as a redirecting handler, then >> it will always be >> passed an IOContext. You can then query the context to see if there has >> been any redirection >> requested and what types. > ... cut ...
> The type indicates what sort of handler you have written. The redirecting one > is passed an io > context, the non-redirecting one does not. The non-redirecting ones are the > same as command > handlers that exist for 4.2.0. The API merely allows one to be added by other > than an option when > the interpreter instance is created. > So then the difference is reflected in the called handler function as well, for the non-directing signature: RexxObjectPtr RexxEntry nonDirectingCommandHandler(RexxExitContext *context, RexxStringObject address, RexxStringObject command) for the redirecting signature: RexxObjectPtr RexxEntry reDirectingCommandHandler(RexxExitContext *context, RexxStringObject address, RexxStringObject command, RexxIORedirectorContext *ioContext) Thanks! ---rony P.S.: Sorry, the first reply went directly to Rick instead of to the list!
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel