home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dosdisas.zip / dccsrcoo.zip / symtab.h < prev    next >
Text File  |  1997-04-09  |  2KB  |  48 lines

  1. /*$Log:    symtab.h,v $
  2.  * Revision 1.7  93/10/01  09:10:46  cifuente
  3.  * *$Log within a comment
  4.  * 
  5.  * Revision 1.6  93/10/01  09:03:42  cifuente
  6.  * boolT type - for compilation under unix SVR4.2
  7.  * 
  8. */
  9.  
  10. /* * * * * * * * * * * * * * * * * */
  11. /* Symbol table structs and protos */
  12. /* * * * * * * * * * * * * * * * * */
  13.  
  14. typedef struct
  15. {
  16.     char    *pSymName;              /* Ptr to symbolic name or comment */
  17.     dword   symOff;                 /* Symbol image offset */
  18.     PPROC   symProc;                /* Procedure pointer */
  19.     word    preHash;                /* Hash value before the modulo */
  20.     word    postHash;               /* Hash value after the modulo */
  21.     word    nextOvf;                /* Next entry this hash bucket, or -1 */
  22.     word    prevOvf;                /* Back link in Ovf chain */
  23. } SYMTABLE;
  24.  
  25. enum _tableType                     /* The table types */
  26. {
  27.     Label=0,                        /* The label table */
  28.     Comment,                        /* The comment table */
  29.     NUM_TABLE_TYPES                 /* Number of entries: must be last */
  30. };              
  31.  
  32. typedef enum _tableType tableType;  /* For convenience */
  33.  
  34. void    createSymTables(void);
  35. void    destroySymTables(void);
  36. void    enterSym(char *symName, dword   symOff, PPROC   symProc, boolT bSymToo);
  37. boolT   readSym (char *symName, dword *pSymOff, PPROC *pSymProc);
  38. boolT   readVal (char *symName, dword   symOff, PPROC   symProc);
  39. void    deleteSym(char *symName);
  40. void    deleteVal(dword symOff, PPROC symProc, boolT bSymToo);
  41. boolT   findVal(dword symOff, PPROC symProc, word *pIndex);
  42. word    symHash(char *name, word *pre);
  43. word    valHash(dword off, PPROC proc, word *pre);
  44. void    selectTable(tableType);     /* Select a particular table */
  45.  
  46. char   *addStrTbl(char *pStr);      /* Add string to string table */
  47.  
  48.