Next: Time Up: Programming Utilities Previous: Strings

Text Output

Rather than using the standard UNIX function printf for routine text output, a module which is similar in appearance is provided, which allows for installing arbitrary printing output functions. This can be used, for instance, to mirror output to a log file for instance, or to send text to an X window. The primary change is to use a function called print with exactly the same arguments as for the standard printf function.

public  void  print( char format[], ... )

Takes the same arguments as printf(), but allows installing of a user output function for the final stage of output.

public  void  set_print_function(
    void     (*function) ( char [] ) )

Sets the output function, where all text from calls to print() will be sent. By default, there is no print function, and output is sent to printf().

public  void  push_print_function()

Temporarily sets the print function to go to standard out.

public  void  pop_print_function()

Restores the previous user print function.

Next: Time Up: Programming Utilities Previous: Strings
Fri Feb 17 15:37:42 EST 1995