Clean up the led includes.

This commit is contained in:
David Given 2017-01-18 19:55:56 +01:00
parent 232545606d
commit d5a83fd73e
12 changed files with 50 additions and 20 deletions

View 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"

View 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)

View 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"

View 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"

View 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;

View 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)

View 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;

View 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()

View 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"

View 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>

View 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. */

View 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;