home *** CD-ROM | disk | FTP | other *** search
-
- PMprintf -- 'printf' support for Presentation Manager programs
- ==============================================================
- Copyright (c) IBM Corporation, 1991, 1992.
-
- Abstract
- """"""""
-
- * Would you like to use the C standard function 'printf' in your PM
- programs for debugging, occasional error messages, etc.?
-
- * Do you have existing subroutines, that use printf, that you'd like to
- use in PM programs?
-
- If you answer yes to either of these, you may find the PMprintf tool
- useful. PMprintf comprises two parts:
-
- printf.obj -- an object file, compiled with IBM C Set/2, which you
- link in with your PM program just like any other subroutine. This
- provides the printf service to that program. You write printf calls
- in your C program in the usual way; the printf subroutine buffers
- the data (on a per-thread basis in multi-thread programs) and adds
- each completed line to a message queue. For example, the following
- printf call will write a line to the PMprintf application and sound
- the Alert (bell):
-
- printf("This seems to work\a\n");
-
- Sample source (in C) is also provided for the printf function.
-
- pmprintf.exe -- is a PM application which sets up the queue used by
- printf and then "catches" and displays incoming printf lines. It is
- a kind of 'monitor' or 'virtual console' which will accept lines
- from any number of processes that use printf. PMprintf offers a
- number of options, including the ability to log the incoming lines
- to a file. See below for a short description of the options.
-
- If PMprintf has been started then it will display the incoming lines
- from printf calls in other processes. If it has not been started,
- then printf calls are quietly ignored (they return 0, not an error).
- PMprintf can be started or stopped at any time, and printf calls
- will then become active or be ignored as appropriate.
-
- Sample source for printf (printf.c) is included in the package; this
- offers certain customization options (for example, you can cause a
- prefix to be added to the start of each line so that different
- applications can have unique output lines, or cause lines to be broken
- at a certain length). There are also some usage hints and minor
- restrictions, documented in the header of printf.c.
-
- -----------
-
- Mike Cowlishaw, IBM UK Laboratories