home *** CD-ROM | disk | FTP | other *** search
-
- debug.lib
-
- by Anders E. Andersen
-
- Contacting me:
-
- e-mail: <andersa@fys.ku.dk>
-
- Fidonet netmail: "Anders Ellenshoej" 2:236/29.6
-
-
- Description:
-
- This is a (very :) small linked library in the object format
- for use when debugging exec shared libraries, devices or anything
- where you can't use normal stdio functions.
- The library is intended for C programmers.
- With the library you can open one or more simple console windows
- and print formated text strings with some stdio-like functions.
- So what good is this you ask?
- It is very hard to debug libraries because it is illegal to call
- dos.library functions from within a library and you can't use your
- compilers source-level debugger either. Therefore you can't know
- why your library fails if it has an error.
- This linked library uses exec's RawDoFmt() and graphic.library's
- Text() to output to a normal intuition window. This is a fairly
- safe way to output simple variable values and other text.
-
-
- Installation:
-
- Put the linked library "debug.lib" either where your source files
- are or alternatively in the directory where your compiler keeps
- it's linked libraries. There is already another library with the
- same name there, but the reason you are using this (my) debug.lib,
- is because you won't be using the other one.. :)
- Put the header file "debug_protos.h" where your source files are.
-
-
- Usage:
-
- Include the headerfile at the start of your source. Link your code
- with the debug.lib.
-
-
- Functions:
-
- NAME
- DLopencon - Open debug console.
-
- SYNOPSIS
- console = DLopencon()
-
- APTR DLopencon(void);
-
- FUNCTION
- This opens a console window and returns an abstact pointer
- to it. This pointer must be suplied as the first argument
- to other debug.lib functions.
-
- INPUTS
- None
-
- RESULTS
- A pointer to the debug.lib console.
-
- BUGS
- None (they are all features, as they say.. ;)
-
- SEE ALSO
-
- DLclosecon()
-
- -
-
- NAME
- DLprintf() - Print formated output to debug.lib console.
-
- SYNOPSIS
- DLprintf( console, fmt, ...)
-
- void DLprintf( APTR, STRPTR, ...);
-
- FUNCTION
- Formats non-float arguments and prints them to the
- debug.lib console window.
-
- INPUTS
- console - The abstract pointer returned by previous
- call to DLopencon().
- fmt - exec RawDoFmt()-like formatstring.
-
- RESULTS
- String is printed.
-
- BUGS
- Newline and carriage return is not supported,
- each call to DBprintf will scroll the text in
- the console and print the new output below.
-
- SEE ALSO
- RawDoFmt(), A book on C stdio.
-
-
- -
-
- NAME
- DLclosecon - Close a debug.lib console.
-
- SYNOPSIS
- DLclosecon( console)
-
- void DLclosecon( APTR);
-
- FUNCTION
- When you are done using the console you must
- use this function to close it.
-
- INPUTS
- console - Abtract debug.lib console pointer
- returned by call to DLopencon.
-
- RESULTS
- The debug.lib console is closed.
-
- BUGS
- None (How hard can closing a window be.. :)
-
- SEE ALSO
- DLopencon()
-