/* -*-c-*-
*
- * $Id: sym.h,v 1.1 1998/06/17 23:44:42 mdw Exp $
+ * $Id: sym.h,v 1.5 1999/05/13 22:48:37 mdw Exp $
*
* Symbol table management
*
* (c) 1998 Straylight/Edgeware
*/
-/*----- Licensing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
*
* This file is part of the mLib utilities library.
*
* mLib is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
* mLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with mLib; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with mLib; if not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
*/
/*----- Revision history --------------------------------------------------*
*
* $Log: sym.h,v $
- * Revision 1.1 1998/06/17 23:44:42 mdw
- * Initial revision
+ * Revision 1.5 1999/05/13 22:48:37 mdw
+ * Change `-ise' to `-ize' throughout.
+ *
+ * Revision 1.4 1999/05/06 19:51:35 mdw
+ * Reformatted the LGPL notice a little bit.
+ *
+ * Revision 1.3 1999/05/05 18:50:31 mdw
+ * Change licensing conditions to LGPL.
+ *
+ * Revision 1.2 1998/11/26 19:27:34 mdw
+ * Move SYM_NAME into the header file. Fix bugs.
+ *
+ * Revision 1.1.1.1 1998/06/17 23:44:42 mdw
+ * Initial version of mLib
*
*/
size_t len; /* Length of the symbol's name */
} sym_base;
+/* --- A macro to pick a symbol's name out from the mess --- */
+
+#define SYM_NAME(sy) \
+ (((sym_base *)(sy))->len > SYM_BUFSZ ? \
+ ((sym_base *)(sy))->name.p : \
+ ((sym_base *)(sy))->name.b)
+
/* --- An iterator block --- */
typedef struct sym_iter {
/* --- @sym_createTable@ --- *
*
- * Arguments: @sym_table *t@ = symbol table to initialise
+ * Arguments: @sym_table *t@ = symbol table to initialize
*
* Returns: ---
*
- * Use: Initialises the given symbol table. Raises @EXC_NOMEM@ if
+ * Use: Initializes the given symbol table. Raises @EXC_NOMEM@ if
* there isn't enough memory.
*/