More strict checks...
This commit is contained in:
committed by
Manoël Trapier
parent
a8d9183e25
commit
2bbd5a38de
@@ -31,7 +31,6 @@ static char rcsid[] = "$Id$";
|
||||
#define IND_DBUG(x) (IND_RELO(x) + sizeof(ind_t))
|
||||
#endif /* SYMDBUG */
|
||||
|
||||
extern char *core_alloc();
|
||||
extern bool incore;
|
||||
extern int infile;
|
||||
extern int passnumber;
|
||||
@@ -66,12 +65,10 @@ static void read_modul();
|
||||
*/
|
||||
int getfile(char *filename)
|
||||
{
|
||||
unsigned int rd_unsigned2();
|
||||
struct ar_hdr archive_header;
|
||||
unsigned short magic_number;
|
||||
#ifdef SYMDBUG
|
||||
struct stat statbuf;
|
||||
extern int fstat();
|
||||
#endif /* SYMDBUG */
|
||||
|
||||
archname = (char *)0;
|
||||
@@ -189,7 +186,6 @@ static void scan_modul()
|
||||
static bool all_alloc()
|
||||
{
|
||||
struct outhead head;
|
||||
extern ind_t hard_alloc();
|
||||
|
||||
if (hard_alloc(ALLOMODL, (long)sizeof(struct outhead)) == BADOFF)
|
||||
fatal("no space for module header");
|
||||
@@ -212,8 +208,6 @@ static bool direct_alloc(struct outhead *head)
|
||||
struct outsect *sects;
|
||||
unsigned short nsect = head->oh_nsect;
|
||||
long size, rest;
|
||||
extern ind_t hard_alloc();
|
||||
extern ind_t alloc();
|
||||
|
||||
#ifdef SYMDBUG
|
||||
rest = nsect * sizeof(ind_t) + sizeof(ind_t) + sizeof(ind_t);
|
||||
@@ -282,7 +276,6 @@ static bool putemitindex(ind_t sectindex, ind_t emitoff, int allopiece)
|
||||
{
|
||||
long flen;
|
||||
ind_t emitindex;
|
||||
extern ind_t alloc();
|
||||
static long zeros[MAXSECT];
|
||||
long zero = zeros[allopiece - ALLOEMIT];
|
||||
|
||||
@@ -320,7 +313,6 @@ static bool putemitindex(ind_t sectindex, ind_t emitoff, int allopiece)
|
||||
static bool putreloindex(ind_t relooff, long nrelobytes)
|
||||
{
|
||||
ind_t reloindex;
|
||||
extern ind_t alloc();
|
||||
|
||||
if ((reloindex = alloc(ALLORELO, nrelobytes)) != BADOFF) {
|
||||
*(ind_t *)modulptr(relooff) = reloindex;
|
||||
@@ -335,7 +327,6 @@ static bool putreloindex(ind_t relooff, long nrelobytes)
|
||||
static bool putdbugindex(ind_t dbugoff, long ndbugbytes)
|
||||
{
|
||||
ind_t dbugindex;
|
||||
extern ind_t alloc();
|
||||
|
||||
if ((dbugindex = alloc(ALLODBUG, ndbugbytes)) != BADOFF) {
|
||||
*(ind_t *)modulptr(dbugoff) = dbugindex;
|
||||
@@ -410,7 +401,6 @@ static void read_modul()
|
||||
unsigned short nsect, nname;
|
||||
long size;
|
||||
long nchar;
|
||||
extern ind_t hard_alloc();
|
||||
|
||||
assert(passnumber == SECOND);
|
||||
assert(!incore);
|
||||
@@ -536,7 +526,6 @@ char *getemit(struct outhead *head, struct outsect *sects, int sectindex)
|
||||
{
|
||||
char *ret;
|
||||
ind_t off;
|
||||
extern char *core_alloc();
|
||||
|
||||
if (!incore) {
|
||||
ret = core_alloc(ALLOMODL, sects[sectindex].os_flen);
|
||||
|
||||
Reference in New Issue
Block a user