home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MODEM / UWPC201.ZIP / UW-SRC.ZIP / SYMBOLS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-22  |  2.4 KB  |  88 lines

  1. /*-------------------------------------------------------------------------
  2.  
  3.   SYMBOLS.H - Symbol manipulation routines for the Termcap Compiler.
  4.  
  5.     This file is part of the Termcap Compiler source code.
  6.     Copyright (C) 1990-1991  Rhys Weatherley
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 1, or (at your option)
  11.     any later version.
  12.  
  13.     This program is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU General Public License
  19.     along with this program; if not, write to the Free Software
  20.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.   Revision History:
  23.   ================
  24.  
  25.    Version  DD/MM/YY  By  Description
  26.    -------  --------  --  --------------------------------------
  27.      1.0    03/04/91  RW  Original Version of SYMBOLS.H
  28.  
  29.   You may contact the author by:
  30.   =============================
  31.  
  32.    e-mail: rhys@cs.uq.oz.au
  33.      mail: Rhys Weatherley
  34.        5 Horizon Drive
  35.        Jamboree Heights
  36.        Queensland 4074
  37.        Australia
  38.  
  39. -------------------------------------------------------------------------*/
  40.  
  41. #ifndef __SYMBOLS_H__
  42. #define    __SYMBOLS_H__
  43.  
  44. /*
  45.  * Add a new identifier to the symbol table and return its index.
  46.  * Returns -1 if the symbol table is full.
  47.  */
  48. int    addident ( /* char *ident */ );
  49.  
  50. /*
  51.  * Get the name of an identifier.
  52.  */
  53. char    *getname ( /* int ident */ );
  54.  
  55. /*
  56.  * Add the position for an identifier to the symbol table.
  57.  */
  58. void    addposn ( /* int ident,int address */ );
  59.  
  60. /*
  61.  * Get the position for an identifier (-1 if undefined).
  62.  */
  63. int    getposn ( /* int ident */ );
  64.  
  65. /*
  66.  * Add a new reference to the symbol table for a particular
  67.  * identifier index.
  68.  */
  69. void    addref    ( /* int ident,int address */ );
  70.  
  71. /*
  72.  * Get the current reference in the symbol table for an identifier.
  73.  */
  74. int    getref    ( /* int ident */ );
  75.  
  76. /*
  77.  * Get the first reference address for the first symbol
  78.  * table entry.  Returns the address or -1 at the table's end.
  79.  */
  80. int    firstref ( /* void */ );
  81.  
  82. /*
  83.  * Get the next reference address from the symbol table.
  84.  */
  85. int    nextref    ( /* void */ );
  86.  
  87. #endif    /* __SYMBOLS_H__ */
  88.