home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / install / pmprtf.dsc < prev    next >
Encoding:
Text File  |  1992-10-31  |  2.5 KB  |  57 lines

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