home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 3 / AACD03.BIN / AACD / Programming / ClassFree / CFsampleclass / debug.doc < prev    next >
Text File  |  1998-04-11  |  3KB  |  132 lines

  1.  
  2.  debug.lib
  3.  
  4.  by Anders E. Andersen
  5.  
  6.  Contacting me:
  7.  
  8.  e-mail: <andersa@fys.ku.dk>
  9.  
  10.  Fidonet netmail: "Anders Ellenshoej" 2:236/29.6
  11.  
  12.  
  13.  Description:
  14.  
  15.  This is a (very :) small linked library in the object format
  16. for use when debugging exec shared libraries, devices or anything
  17. where you can't use normal stdio functions.
  18.  The library is intended for C programmers.
  19.  With the library you can open one or more simple console windows
  20. and print formated text strings with some stdio-like functions.
  21.  So what good is this you ask?
  22.  It is very hard to debug libraries because it is illegal to call
  23. dos.library functions from within a library and you can't use your
  24. compilers source-level debugger either. Therefore you can't know
  25. why your library fails if it has an error.
  26.  This linked library uses exec's RawDoFmt() and graphic.library's
  27. Text() to output to a normal intuition window. This is a fairly
  28. safe way to output simple variable values and other text.
  29.  
  30.  
  31.  Installation:
  32.  
  33.  Put the linked library "debug.lib" either where your source files
  34. are or alternatively in the directory where your compiler keeps
  35. it's linked libraries. There is already another library with the
  36. same name there, but the reason you are using this (my) debug.lib,
  37. is because you won't be using the other one.. :)
  38.  Put the header file "debug_protos.h" where your source files are.
  39.  
  40.  
  41.  Usage:
  42.  
  43.  Include the headerfile at the start of your source. Link your code
  44. with the debug.lib.
  45.  
  46.  
  47.  Functions:
  48.  
  49.  NAME
  50.       DLopencon - Open debug console.
  51.  
  52.  SYNOPSIS
  53.       console = DLopencon()
  54.  
  55.       APTR DLopencon(void);
  56.  
  57.  FUNCTION
  58.       This opens a console window and returns an abstact pointer
  59.       to it. This pointer must be suplied as the first argument
  60.       to other debug.lib functions.
  61.  
  62.  INPUTS
  63.       None
  64.  
  65.  RESULTS
  66.       A pointer to the debug.lib console.
  67.  
  68.  BUGS
  69.       None (they are all features, as they say.. ;)
  70.  
  71.  SEE ALSO
  72.  
  73.       DLclosecon()
  74.  
  75. -
  76.  
  77.  NAME
  78.       DLprintf() - Print formated output to debug.lib console.
  79.  
  80.  SYNOPSIS
  81.       DLprintf( console, fmt, ...)
  82.  
  83.       void DLprintf( APTR, STRPTR, ...);
  84.  
  85.  FUNCTION
  86.       Formats non-float arguments and prints them to the
  87.       debug.lib console window.
  88.  
  89.  INPUTS
  90.       console   - The abstract pointer returned by previous
  91.                   call to DLopencon().
  92.       fmt       - exec RawDoFmt()-like formatstring.
  93.  
  94.  RESULTS
  95.       String is printed.
  96.  
  97.  BUGS
  98.       Newline and carriage return is not supported,
  99.       each call to DBprintf will scroll the text in
  100.       the console and print the new output below.
  101.  
  102.  SEE ALSO
  103.       RawDoFmt(), A book on C stdio.
  104.  
  105.  
  106. -
  107.  
  108.  NAME
  109.       DLclosecon - Close a debug.lib console.
  110.  
  111.  SYNOPSIS
  112.       DLclosecon( console)
  113.  
  114.       void DLclosecon( APTR);
  115.  
  116.  FUNCTION
  117.       When you are done using the console you must
  118.       use this function to close it.
  119.  
  120.  INPUTS
  121.       console  - Abtract debug.lib console pointer
  122.                  returned by call to DLopencon.
  123.  
  124.  RESULTS
  125.       The debug.lib console is closed.
  126.  
  127.  BUGS
  128.       None (How hard can closing a window be.. :)
  129.  
  130.  SEE ALSO
  131.       DLopencon()
  132.