home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmprtf.zip / pmprintf.abs < prev    next >
Text File  |  1995-11-04  |  3KB  |  56 lines

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