C:/Users/Dennis/src/lang/russell.orig/src/pass1/stt/sttdefs.h

Go to the documentation of this file.
00001 /*
00002  *                Defines for Russell string table
00003  */
00004 
00005 
00006 /*
00007  *  String table entry structure
00008  *
00009  *    sttrelptr          - type of the relative pointers in the table.
00010  *    STTENTRYSZ(strlen) - computes the size of a string entry, given
00011  *                         the length of the string it contains.
00012  *    STT_NO_NEXT_ENTRY  - terminates chains of stt entries.
00013  *    Sttentry           - a single entry in the string table.
00014  *    sttnstrings        - number of strings in stt.
00015  */
00016 
00017 typedef unsigned sttrelptr;
00018 #define STTENTRYSZ(strlen)  ( sizeof(sttrelptr) + sizeof(char) * strlen )
00019 #define STT_NO_NEXT_ENTRY   -1
00020 
00021 typedef struct {
00022     sttrelptr stte_next;    /* relative position in string table of next    */
00023                             /*   entry chained from hash header             */
00024     char stte_str[1];       /* null-terminated character string             */
00025 } Sttentry;
00026 
00027 int sttnstrings;
00028 
00029 
00030 
00031 /*
00032  *  String table block structure
00033  *
00034  *    STTBDATASZ    -  size of the data section of a sttblock
00035  *    sttblock      -  type of a string table block
00036  *    STTNBLKS      -  max number of stt blocks (defined in parm.h)
00037  *    STTBLKNO(rpt) -  maps a relative pointer to an entry into
00038  *                     the block which it's on.
00039  *    STTOFFSET(rpt) - maps a relative pointer to an entry into
00040  *                     its offset from the start of whichever block it's in.
00041  */
00042 
00043 #define STTBDATASZ 512
00044 
00045 typedef struct {
00046     byte sttb_data[STTBDATASZ];
00047 } sttblock;
00048 #define STTBLKNO(rpt)   ( ((unsigned) (rpt)) >> 9 )
00049 #define STTOFFSET(rpt)  ( ((unsigned) (rpt)) & (STTBDATASZ - 1) )

Generated on Fri Jan 25 10:39:46 2008 for russell by  doxygen 1.5.4