Clean up the led includes.
authorDavid Given <dg@cowlark.com>
Wed, 18 Jan 2017 18:55:56 +0000 (19:55 +0100)
committerDavid Given <dg@cowlark.com>
Wed, 18 Jan 2017 18:55:56 +0000 (19:55 +0100)
12 files changed:
util/led/archive.c
util/led/error.c
util/led/extract.c
util/led/finish.c
util/led/main.c
util/led/memory.c
util/led/output.c
util/led/read.c
util/led/save.c
util/led/scan.c
util/led/sym.c
util/led/write.c

index 7cb3397..7e39e9f 100644 (file)
@@ -6,8 +6,8 @@
 static char rcsid[] = "$Id$";
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include "arch.h"
index e7f4fc6..61dc798 100644 (file)
@@ -6,9 +6,11 @@
 static char rcsid[] = "$Id$";
 #endif
 
-#include <stdarg.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <stdarg.h>
 #include <out.h>
 #include "const.h"
 
@@ -73,7 +75,7 @@ do_verbose(char *format, ...)
 static void
 diag(char *tail, char *format, va_list ap)
 {
-       extern char     *progname, *archname, *modulname; 
+       extern char     *progname, *archname, *modulname;
 
        fprintf(stderr, "%s: ", progname);
        if (archname && modulname)
index 5878d52..48a2f16 100644 (file)
@@ -6,8 +6,10 @@
 static char rcsid[] = "$Id$";
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include "out.h"
 #include "const.h"
 #include "debug.h"
index 2eace76..439d4b3 100644 (file)
@@ -6,6 +6,10 @@
 static char rcsid[] = "$Id$";
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <out.h>
 #include "const.h"
 #include "defs.h"
index 028bc3b..125f0c9 100644 (file)
@@ -11,7 +11,9 @@ static char rcsid[] = "$Id$";
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdint.h>
+#include <stdbool.h>
 #include <out.h>
 #include "const.h"
 #include "debug.h"
@@ -168,7 +170,7 @@ first_pass(argv)
                case 'c':
                        /*
                         * Leave relocation information in the output, so that
-                        * a next pass can see where relocation was done. The 
+                        * a next pass can see where relocation was done. The
                         * resulting output however is no longer relocatable.
                         */
                        flagword &= ~RFLAG;
index 6349c82..df4ee99 100644 (file)
@@ -22,6 +22,9 @@ static char rcsid[] = "$Id$";
  */
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <out.h>
 #include "const.h"
 #include "assert.h"
@@ -112,7 +115,7 @@ init_core()
                incore = FALSE; /* In core strategy failed. */
                if (sbreak(AT_LEAST) == -1)
                        fatal("no core at all");
-               
+
                base = BASE;
                for (mem = mems; mem < &mems[NMEMS]; mem++) {
                        mem->mem_base = base;
@@ -198,15 +201,15 @@ compact(piece, incr, flag)
                gain = (mem->mem_full + incr) >> SHIFT_COUNT;
                if (incr < gain) incr = gain;
        }
-       
+
        /*
         * First, check that moving will result in enough space
         */
        if (flag != FREEZE) {
                gain = mem->mem_left;
                for (mem = &mems[piece-1]; mem >= &mems[0]; mem--) {
-                       /* 
-                        * Don't give it all away! 
+                       /*
+                        * Don't give it all away!
                         * If this does not give us enough, bad luck
                         */
                        if (flag == FORCED)
@@ -224,8 +227,8 @@ compact(piece, incr, flag)
                }
                if (min == piece)
                    for (mem = &mems[piece+1]; mem <= &mems[NMEMS - 1]; mem++) {
-                       /* 
-                        * Don't give it all away! 
+                       /*
+                        * Don't give it all away!
                         * If this does not give us enough, bad luck
                         */
                        if (flag == FORCED)
index 0ee622e..8356276 100644 (file)
@@ -6,6 +6,10 @@
 static char rcsid[] = "$Id$";
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <out.h>
 #include "const.h"
 #include "memory.h"
@@ -60,7 +64,7 @@ generate_section_names()
        extern struct outsect   outsect[];
        extern char             *core_alloc();
 
-       size = (long)outhead.oh_nsect * sizeof(struct outname); 
+       size = (long)outhead.oh_nsect * sizeof(struct outname);
        name = (struct outname *)core_alloc(ALLOGLOB, size);
        if (name == (struct outname *)0)
                return;
index 95ec7dd..3ea1592 100644 (file)
@@ -6,6 +6,11 @@
 static char rcsid[] = "$Id$";
 #endif
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+
 int    infile; /* The current input file. */
 
 rd_fatal()
index 3804413..9526496 100644 (file)
@@ -10,8 +10,10 @@ static char rcsid[] = "$Id$";
  * If everything is kept in core, we must save some things for the second pass.
  */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <string.h>
 #include "arch.h"
 #include "out.h"
index a870f8e..1740a14 100644 (file)
@@ -6,8 +6,10 @@
 static char rcsid[] = "$Id$";
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #ifdef SYMDBUG
 #include <sys/types.h>
 #include <sys/stat.h>
index 2ec47b6..53f0f34 100644 (file)
@@ -10,8 +10,10 @@ static char rcsid[] = "$Id$";
  * Symbol table management.
  */
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include "out.h"
 #include "const.h"
 #include "memory.h"
@@ -49,7 +51,7 @@ init_symboltable()
  * in the hash table is followed. If the names match, a pointer to the outname
  * in this element of the list is returned. When a match cannot be found,
  * NIL is returned.
- */ 
+ */
 struct outname *
 searchname(string, hashval)
        char                    *string;
@@ -74,7 +76,7 @@ searchname(string, hashval)
                                debug("found %x, %x, %lx\n",
                                        name->on_type, name->on_desc, name->on_valu, 0);
                                return name;
-                       }       
+                       }
                symindex = sym->sy_next;
        }
        /* Not found. */
index d77ea98..b916949 100644 (file)
@@ -6,8 +6,10 @@
 static char rcsid[] = "$Id$";
 #endif
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
 #include <string.h>
 #include "out.h"
 #include "const.h"
@@ -75,7 +77,7 @@ end_write()
        for (sectindex = 0; sectindex < outhead.oh_nsect; sectindex++)
                wrt_name(sectname(sectindex), 1);
 }
-       
+
 wrt_emit(emit, sectindex, cnt)
        char            *emit;
        int             sectindex;