home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / netdor3.zip / DISK_13 / IMAGE12.ZIP / CATALOG / PMPRINTF.DSC < prev    next >
Text File  |  1993-09-03  |  3KB  |  59 lines

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