some minor fixes, and one important 2/4 one in the sbreak function
This commit is contained in:
parent
18996b9698
commit
c9e52b65d4
4 changed files with 11 additions and 14 deletions
|
@ -188,7 +188,7 @@ put_locals(name, nnames)
|
|||
}
|
||||
iname++;
|
||||
}
|
||||
wr_name(name, oname - name);
|
||||
wr_name(name, (unsigned int) (oname - name));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -46,7 +46,6 @@ static ind_t refused;
|
|||
sbreak(incr)
|
||||
ind_t incr;
|
||||
{
|
||||
extern char *sbrk();
|
||||
extern char *brk();
|
||||
unsigned int inc;
|
||||
|
||||
|
@ -54,14 +53,14 @@ sbreak(incr)
|
|||
|
||||
inc = incr;
|
||||
if ((refused && refused < incr) ||
|
||||
inc != incr ||
|
||||
BASE + inc < BASE ||
|
||||
(int) brk(BASE + inc) == -1) {
|
||||
(sizeof(char *) < sizeof(long) &&
|
||||
(inc != incr || BASE + inc < BASE)) ||
|
||||
(int) brk(BASE + incr) == -1) {
|
||||
if (!refused || refused > incr)
|
||||
refused = incr;
|
||||
return -1;
|
||||
}
|
||||
BASE += inc;
|
||||
BASE += incr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -74,7 +73,6 @@ init_core()
|
|||
register char *base;
|
||||
register ind_t total_size;
|
||||
register struct memory *mem;
|
||||
extern char *brk();
|
||||
extern char *sbrk();
|
||||
|
||||
#include "mach.c"
|
||||
|
|
|
@ -63,6 +63,7 @@ int
|
|||
getfile(filename)
|
||||
char *filename;
|
||||
{
|
||||
unsigned int rd_unsigned2();
|
||||
struct ar_hdr archive_header;
|
||||
ushort magic_number;
|
||||
#ifdef SYMDBUG
|
||||
|
@ -515,7 +516,7 @@ modulsize(head)
|
|||
|
||||
static struct outrelo *walkrelo;
|
||||
static unsigned short cnt_relos;
|
||||
static unsigned short index;
|
||||
static unsigned short relind;
|
||||
#define _RELSIZ 64
|
||||
|
||||
startrelo(head)
|
||||
|
@ -528,7 +529,7 @@ startrelo(head)
|
|||
walkrelo = (struct outrelo *)address(ALLORELO, reloindex);
|
||||
}
|
||||
else {
|
||||
index = _RELSIZ;
|
||||
relind = _RELSIZ;
|
||||
rd_rew_relos(head);
|
||||
cnt_relos = head->oh_nrelo;
|
||||
}
|
||||
|
@ -542,14 +543,14 @@ nextrelo()
|
|||
if (incore)
|
||||
return walkrelo++;
|
||||
|
||||
if (index == _RELSIZ) {
|
||||
if (relind == _RELSIZ) {
|
||||
int i = cnt_relos >= _RELSIZ ? _RELSIZ : cnt_relos;
|
||||
|
||||
cnt_relos -= i;
|
||||
rd_relo(relobuf, i);
|
||||
index = 0;
|
||||
relind = 0;
|
||||
}
|
||||
return &relobuf[index++];
|
||||
return &relobuf[relind++];
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
|
|
@ -61,7 +61,6 @@ sectname(sectindex)
|
|||
*/
|
||||
end_write()
|
||||
{
|
||||
register ushort cnt;
|
||||
register struct outname *name;
|
||||
register int sectindex;
|
||||
extern ushort NGlobals;
|
||||
|
@ -69,7 +68,6 @@ end_write()
|
|||
|
||||
assert(!incore);
|
||||
assert(!(flagword & SFLAG));
|
||||
cnt = NGlobals;
|
||||
name = (struct outname *)address(ALLOGLOB, (ind_t)0);
|
||||
namecpy(name, NGlobals, off_char);
|
||||
wr_name(name, NGlobals);
|
||||
|
|
Loading…
Reference in a new issue