slang-users mailing list

[2000 Date Index] [2000 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: S-Lang stdin / stdout


Francois Guimond <fguimond@xxxxxxxxxx> wrote:
>For me it mean that we can redirect message() output without modifying the
>original library.
>How can we do it?
>Can we redirect stdout to a function?
>Would this enable the Traceback to be redirected?

Use something along the lines of:

   static void message_hook (char *fmt, va_list ap)
   {
       vfprintf (stdout, fmt, ap);
   }

   SLang_VMessage_Hook = message_hook;

--John


[2000 date index] [2000 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]