chiark / gitweb /
Fix the bugs in the new macros. (Whoops.)
[mLib] / sym.c
diff --git a/sym.c b/sym.c
index fb3806b11ec86d6b7506d204641fba7528a8d051..965da3f3c67e7cc1e3f29139ad094b8301e5e3e6 100644 (file)
--- a/sym.c
+++ b/sym.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: sym.c,v 1.4 1999/05/06 19:51:35 mdw Exp $
+ * $Id: sym.c,v 1.5 1999/05/13 22:48:37 mdw Exp $
  *
  * Symbol table management
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: sym.c,v $
+ * Revision 1.5  1999/05/13 22:48:37  mdw
+ * Twiddle the extension threshold.  Change `-ise' to `-ize' throughout.
+ *
  * Revision 1.4  1999/05/06 19:51:35  mdw
  * Reformatted the LGPL notice a little bit.
  *
  * and the limit %$l$% satisfy the relation %$n < bl$%; if a new item is
  * added to the table and this relation is found to be false, the table is
  * doubled in size.
- *
- * The current function gives %$l = {3n \over 4}$%, which appears to be
- * reasonable on the face of things.
  */
 
-#define SYM_LIMIT(n) (((n) * 3) >> 2)  /* Load factor for growing table */
+#define SYM_LIMIT(n) ((n) * 4)         /* Load factor for growing table */
 
 /*----- Main code ---------------------------------------------------------*/
 
 /* --- @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.
  */
 
@@ -222,7 +222,7 @@ void *sym_find(sym_table *t, const char *n, long l, size_t sz, unsigned *f)
   if (f) *f = 0;                       /* Failed to find the block */
   if (!sz) return (0);                 /* Return zero if not creating */
 
-  /* --- Create a new symbol block and initialise it --- */
+  /* --- Create a new symbol block and initialize it --- */
 
   {
     TRACK_CTX("new symbol creation");
@@ -442,7 +442,7 @@ int main(void)
   sym_table tbl;
   int entries;
 
-  /* --- Initialise for reading the file --- */
+  /* --- Initialize for reading the file --- */
 
   sz = BUFSIZ;
   buff = xmalloc(sz + 1);