home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / pmprtf / pmprintf.abs < prev    next >
Text File  |  1992-08-18  |  2KB  |  54 lines

  1.  
  2. PMprintf -- 'printf' support for Presentation Manager programs
  3. ==============================================================
  4. Copyright (c) IBM Corporation, 1991, 1992.
  5.  
  6. Abstract
  7. """"""""
  8.  
  9. * Would you like to use the C standard function 'printf' in your PM
  10.   programs for debugging, occasional error messages, etc.?
  11.  
  12. * Do you have existing subroutines, that use printf, that you'd like to
  13.   use in PM programs?
  14.  
  15. If you answer yes to either of these, you may find the PMprintf tool
  16. useful.  PMprintf comprises two parts:
  17.  
  18.   printf.obj -- an object file, compiled with IBM C Set/2, which you
  19.     link in with your PM program just like any other subroutine.  This
  20.     provides the printf service to that program.  You write printf calls
  21.     in your C program in the usual way; the printf subroutine buffers
  22.     the data (on a per-thread basis in multi-thread programs) and adds
  23.     each completed line to a message queue.  For example, the following
  24.     printf call will write a line to the PMprintf application and sound
  25.     the Alert (bell):
  26.  
  27.       printf("This seems to work\a\n");
  28.  
  29.     Sample source (in C) is also provided for the printf function.
  30.  
  31.   pmprintf.exe -- is a PM application which sets up the queue used by
  32.     printf and then "catches" and displays incoming printf lines.  It is
  33.     a kind of 'monitor' or 'virtual console' which will accept lines
  34.     from any number of processes that use printf.  PMprintf offers a
  35.     number of options, including the ability to log the incoming lines
  36.     to a file.  See below for a short description of the options.
  37.  
  38.     If PMprintf has been started then it will display the incoming lines
  39.     from printf calls in other processes.  If it has not been started,
  40.     then printf calls are quietly ignored (they return 0, not an error).
  41.     PMprintf can be started or stopped at any time, and printf calls
  42.     will then become active or be ignored as appropriate.
  43.  
  44. Sample source for printf (printf.c) is included in the package; this
  45. offers certain customization options (for example, you can cause a
  46. prefix to be added to the start of each line so that different
  47. applications can have unique output lines, or cause lines to be broken
  48. at a certain length). There are also some usage hints and minor
  49. restrictions, documented in the header of printf.c.
  50.  
  51. -----------
  52.  
  53. Mike Cowlishaw, IBM UK Laboratories
  54.