W3C Lib OS

What is TTYPrint

This is under rapid construction. Please look at the User's Guide for more details.

TTYPrint is a generic way for libwww to send error and logging messages to the user interface or a logging file. Several option exist to define the TTYPrint target. These are defined in HTUtils.h.

You may define the WWWTRACE_MODE to

  1. WWWTRACE_FILE to fprintf output to a file..
  2. WWWTRACE_STDERR to fprintf output to stderr.
  3. WWWTRACE_TTY to call a TTYPrint function defined in your application.

WWWTRACE_FILE

All calls to the macro TTYPrint will result in an fprintf to HT_TRACE_FILE (also defined in HTUtils.h ). This defaults to "WWWTRACE.TXT".

WWWTRACE_STDERR

By default, the unix and WIN32 console builds send all the output to stderr.

WWWTRACE_TTY

The windowed builds cannot use stderr or file redirection to a console, so they send messages to an application defined function called TTYPrint. This function must be of type TTYPrint_t. If the build involves dynamic linking, the calls are made through a function pointer called PTTYPrint. The application must set this pointer to point to a function of type TTYPrint_t, eg.

	*PTTYPrint = &AppTTYPrint;


Eric Prud'hommeaux, December 1995