Sources placed under CVS control.
[become] / src / sym.c
index d882f5f..a698382 100644 (file)
--- a/src/sym.c
+++ b/src/sym.c
@@ -1,13 +1,13 @@
 /* -*-c-*-
  *
- * $Id: sym.c,v 1.1 1997/07/21 13:47:44 mdw Exp $
+ * $Id: sym.c,v 1.2 1997/08/04 10:24:25 mdw Exp $
  *
  * Symbol table management
  *
  * (c) 1996 Straylight
  */
 
-/*----- Licencing notice --------------------------------------------------*
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of `become'
  *
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with `become'; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with `become'; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: sym.c,v $
- * Revision 1.1  1997/07/21 13:47:44  mdw
+ * Revision 1.2  1997/08/04 10:24:25  mdw
+ * Sources placed under CVS control.
+ *
+ * Revision 1.1  1997/07/21  13:47:44  mdw
  * Initial revision
  *
  */
@@ -575,7 +578,10 @@ int main(void)
       case 0: {
        sym_word *w;
 
-       printf("find `%s'\n", line[i]);
+       /* printf("find `%s'\n", line[i]); */
+       if ((rand() & 1023) == 0) {
+         putchar('.'); fflush(stdout);
+       }
 
        w = sym_find(&tbl, line[i], -1, 0, 0);
        if (w != flag[i])
@@ -590,7 +596,10 @@ int main(void)
        unsigned f;
        sym_word *w;
 
-       printf("create `%s'\n", line[i]);
+       /* printf("create `%s'\n", line[i]); */
+       if ((rand() & 1023) == 0) {
+         putchar('+'); fflush(stdout);
+       }
 
        w = sym_find(&tbl, line[i], -1, sizeof(sym_word), &f);
        if (f)
@@ -618,6 +627,11 @@ int main(void)
       case 2: {
        sym_iter it;
        sym_word *w, **ntbl;
+       int v = (rand() % entries) == 0;
+       if (!v)
+         break;
+       printf("\niterated %i entries\n", entries);
+       break;
 
        printf("iterate\n");
 
@@ -641,6 +655,7 @@ int main(void)
       case 3: {
        sym_base *b;
        int v = rand() & 255 ? 0 : 1;
+       break;
 
        printf("dump\n");
 
@@ -663,7 +678,10 @@ int main(void)
 
       case 4: {
        if (flag[i]) {
-         printf("remove `%s'\n", flag[i]->base.name);
+         /* printf("remove `%s'\n", flag[i]->base.name); */
+         if ((rand() & 1023) == 0) {
+           putchar('-'); fflush(stdout);
+         }
          sym_remove(&tbl, flag[i]);
          flag[i] = 0;
          entries--;