home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_oth / debugutl.lha / trace.h < prev   
Encoding:
C/C++ Source or Header  |  1992-05-21  |  3.3 KB  |  103 lines

  1. /*                         FILE:    trace.h
  2.  *
  3.  * This file contains definitions and includes for the trace.c, debug.c,
  4.  *    and tDB.c files used for debugging.
  5.  *
  6.  *
  7.  * Created:            5/24/89
  8.  * Author:        Mark Porter (fog)
  9.  *
  10.  *
  11.  * $Revision: 1.1 $
  12.  * $Date: 92/05/07 05:36:29 $
  13.  * $Author: fog $
  14.  *
  15.  *
  16.  *    Copyright © 1992 if...only Amiga
  17.  *
  18.  *    Permission is granted to distribute this program's source, executable,
  19.  *    and documentation for non-commercial use only, provided the copyright
  20.  *    and header information are left intact.
  21.  *
  22.  */
  23.  
  24.  
  25. /*----------------------------------------------------------------------*/
  26. /*----------------------------------------------------------------------*
  27.  *
  28.  *
  29.  * $Log:    trace.h,v $
  30.  * Revision 1.1  92/05/07  05:36:29  fog
  31.  * Initial revision
  32.  * 
  33.  *
  34.  *
  35.  *----------------------------------------------------------------------*/
  36. /*----------------------------------------------------------------------*/
  37.  
  38.  
  39. #ifndef    TRACE_H
  40. #define    TRACE_H
  41.  
  42. #include    <exec/ports.h>
  43.  
  44.  
  45. #define    TDB_BUFSIZE        ( 512 )
  46. #define    DB_BUFSIZE        (    64 )
  47. #define    DB_NUM            (    32 )
  48.  
  49.  
  50. /*---------- Debug Code Values used to determine output values ---------*/
  51.  
  52. #define    DB_CONTINUE        (  1 )        /* Normal message sent by Trace().    */
  53. #define    DB_ADDFUNC        (  2 )        /* Add screening functions to list.    */
  54. #define    DB_REMFUNC        (  3 )        /* Remove functions from list.        */
  55. #define    DB_CLEAR            (  4 )        /* Clear screening function list.    */
  56. #define    DB_LEVEL            (  5 )        /* Set new debug enable level.        */
  57. #define    DB_CHECK            (  6 )        /* Request info from debug.            */
  58. #define    DB_WRITE            (  7 )        /* Write output to file.                */
  59. #define    DB_ENDWRITE        (  8 )        /* Stop file output and close file.    */
  60. #define    DB_SER            (  9 )        /* Write output to serial port.        */
  61. #define    DB_ENDSER        ( 10 )        /* Stop serial port output.            */
  62. #define    DB_PAR            ( 11 )        /* Write output to parallel port.    */
  63. #define    DB_ENDPAR        ( 12 )        /* Stop parallel port output.            */
  64. #define    DB_TOGGLE        ( 13 )        /* Toggle function output enable.    */
  65. #define    DB_QUIT            ( 86 )        /* Close debug and exit.                */
  66. #define    DB_UNKNOWN        ( 87 )        /* Unknown code value...error.        */
  67. #define    DB_OVERFLOW        ( 88 )        /* DB_Function List overflow.            */
  68. #define    DB_UNMATCH        ( 89 )        /* Unmatched function to remove.        */
  69.  
  70.  
  71. /*-------------- Data structures necessary for debugging ---------------*/
  72.  
  73. typedef struct _Debug_Msg                /* Message to send to debug from        */
  74. {                                                /* Trace() or tDB.                        */
  75.     struct Message  DB_msg;                /* Exec Message to attach to port.    */
  76.     char                *DB_string,            /* Printable output string.            */
  77.                         *DB_function,        /* Function list to add/remove.        */
  78.                         *DB_file;            /* Name of output file for DB_WRITE.*/
  79.     long                 DB_count;            /* Number of chars in DB_string.        */
  80.     int                 DB_code,            /* One of debug codes above.            */
  81.                          DB_level;            /* Debug level to enable.                */
  82. }    Debug_Msg;
  83.  
  84.  
  85. typedef enum _DB_Type                    /* Choose between enabling or dis-    */
  86. {                                                /* abling screening function output.*/
  87.     db_none,                                    /* No function list available.        */
  88.     db_include,                                /* Enable function list output.        */
  89.     db_exclude,                                /* Disable function list output.        */
  90.  
  91. }    DB_Type;
  92.  
  93.  
  94. extern BOOL                  screen_list();
  95. extern void                  send_status();
  96. extern void                  add_functions();
  97. extern void                  rem_functions();
  98. extern void                  clear_functions();
  99. extern struct MsgPort *FindPort(),
  100.                              *CreatePort();
  101.  
  102.  
  103. #endif