fix + some more statistics
authorceriel <none@none>
Tue, 11 Aug 1987 15:31:09 +0000 (15:31 +0000)
committerceriel <none@none>
Tue, 11 Aug 1987 15:31:09 +0000 (15:31 +0000)
util/led/main.c
util/led/memory.c

index 4824362..c256dce 100644 (file)
@@ -51,7 +51,7 @@ main(argc, argv)
        initializations(argc, argv);
        first_pass(argv);
 #ifndef NOSTATISTICS
-       do_statistics();
+       if (statistics) do_statistics();
 #endif
        freeze_core();
        evaluate();
@@ -461,8 +461,6 @@ complete_sections()
                if (flagword & RFLAG) continue;
                sc->os_lign =
                        tstbit(sectindex, lignmap) ? sect_lign[sectindex] : 1;
-               sc->os_size += sc->os_lign - 1;
-               sc->os_size -= sc->os_size % sc->os_lign;
                if (tstbit(sectindex, basemap)) {
                        base = sect_base[sectindex];
                        if (base % sc->os_lign)
index 44eb775..abf1555 100644 (file)
@@ -21,6 +21,7 @@ static char rcsid[] = "$Header$";
  * (70000 - 65536).
  */
 
+#include <stdio.h>
 #include <out.h>
 #include "const.h"
 #include "assert.h"
@@ -143,6 +144,9 @@ move_up(piece, incr)
        register ind_t          incr;
 {
        register struct memory  *mem;
+#ifndef NOSTATISTICS
+       extern int statistics;
+#endif
 
        debug("move_up(%d, %d)\n", piece, (int)incr, 0, 0);
        while (incr > 0 && sbreak(incr) == -1)
@@ -152,6 +156,9 @@ move_up(piece, incr)
                incr = 0;
                return (ind_t) 0;
        }
+#ifndef NOSTATISTICS
+       if (statistics) fprintf(stderr,"moving up %X\n", (long) incr);
+#endif
        for (mem = &mems[NMEMS - 1]; mem > &mems[piece]; mem--)
                copy_up(mem, incr);