* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <arch.h>
-#include "object.h"
+#include "obj.h"
int
rd_arhdr(fd, arhdr)
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
+
+#include "obj.h"
+
#define MININT (1 << (sizeof(int) * 8 - 1))
#define MAXCHUNK (~MININT) /* Highest count we read(2). */
/* Unfortunately, MAXCHUNK is too large with some compilers. Put it in
* We don't have to worry about byte order here.
* Just read "cnt" bytes from file-descriptor "fd".
*/
-int
+void
rd_bytes(fd, string, cnt)
register char *string;
register long cnt;
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
int
rd_int2(fd)
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
long
rd_long(fd)
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <ranlib.h>
-#include "object.h"
+#include "obj.h"
+void
rd_ranlib(fd, ran, cnt)
register struct ranlib *ran;
register long cnt;
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
unsigned int
rd_unsigned2(fd)
* part. In this case #define OUTSEEK.
*/
-#include <out.h>
-#include "object.h"
+#include "obj.h"
extern long lseek();
#define sectionnr __sectionnr
static int offcnt;
+void
__wr_flush(ptr)
register struct fil *ptr;
{
ptr->pbegin = ptr->pbuf;
}
-static OUTWRITE(p, b, n)
+static void
+OUTWRITE(p, b, n)
int p; /* part number */
register char *b; /* buffer pointer */
long n; /* write count */
}
}
-static BEGINSEEK(p, o)
+static void
+BEGINSEEK(p, o)
int p; /* part number */
long o; /* offset in file */
{
return 1;
}
+void
wr_close()
{
register struct fil *ptr;
#endif /* OUTSEEK */
}
+void
wr_ohead(head)
register struct outhead *head;
{
else OUTWRITE(PARTEMIT, (char *)head, (long)SZ_HEAD);
}
+void
wr_sect(sect, cnt)
register struct outsect *sect;
register unsigned int cnt;
#endif
}
+void
wr_outsect(s)
int s; /* section number */
{
/*
* We don't have to worry about byte order here.
*/
+void
wr_emit(emit, cnt)
char *emit;
long cnt;
OUTWRITE(PARTEMIT + getsect(sectionnr) , emit, cnt);
}
+void
wr_relo(relo, cnt)
register struct outrelo *relo;
unsigned int cnt;
#endif
}
+void
wr_name(name, cnt)
register struct outname *name;
unsigned int cnt;
}
+void
wr_string(addr, len)
char *addr;
long len;
#ifdef SYMDBUG
+void
wr_dbug(buf, size)
char *buf;
long size;
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <arch.h>
-#include "object.h"
+#include "obj.h"
+void
wr_arhdr(fd, arhdr)
register struct ar_hdr *arhdr;
{
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
+
+#include "obj.h"
+
#define MININT (1 << (sizeof(int) * 8 - 1))
#define MAXCHUNK (~MININT) /* Highest count we write(2). */
/* Notice that MAXCHUNK itself might be too large with some compilers.
/*
* Just write "cnt" bytes to file-descriptor "fd".
*/
+void
wr_bytes(fd, string, cnt)
register char *string;
register long cnt;
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
+void
wr_int2(fd, i)
{
char buf[2];
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
+void
wr_long(fd, l)
long l;
{
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include "object.h"
+#include "obj.h"
extern int __sectionnr;
+void
wr_putc(ch)
{
register struct fil *ptr = &__parts[PARTEMIT+getsect(__sectionnr)];
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
-#include <ranlib.h>
-#include "object.h"
+#include "obj.h"
+void
wr_ranlib(fd, ran, cnt1)
struct ranlib *ran;
long cnt1;