Added prototyping stuff

This commit is contained in:
ceriel 1993-11-10 11:49:49 +00:00
parent 73adc0f645
commit 62f978c40f
13 changed files with 39 additions and 19 deletions

View file

@ -3,8 +3,7 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include <arch.h> #include "obj.h"
#include "object.h"
int int
rd_arhdr(fd, arhdr) rd_arhdr(fd, arhdr)

View file

@ -3,6 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "obj.h"
#define MININT (1 << (sizeof(int) * 8 - 1)) #define MININT (1 << (sizeof(int) * 8 - 1))
#define MAXCHUNK (~MININT) /* Highest count we read(2). */ #define MAXCHUNK (~MININT) /* Highest count we read(2). */
/* Unfortunately, MAXCHUNK is too large with some compilers. Put it in /* Unfortunately, MAXCHUNK is too large with some compilers. Put it in
@ -15,7 +18,7 @@ static int maxchunk = MAXCHUNK;
* We don't have to worry about byte order here. * We don't have to worry about byte order here.
* Just read "cnt" bytes from file-descriptor "fd". * Just read "cnt" bytes from file-descriptor "fd".
*/ */
int void
rd_bytes(fd, string, cnt) rd_bytes(fd, string, cnt)
register char *string; register char *string;
register long cnt; register long cnt;

View file

@ -3,7 +3,7 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
int int
rd_int2(fd) rd_int2(fd)

View file

@ -3,7 +3,7 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
long long
rd_long(fd) rd_long(fd)

View file

@ -3,9 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include <ranlib.h> #include "obj.h"
#include "object.h"
void
rd_ranlib(fd, ran, cnt) rd_ranlib(fd, ran, cnt)
register struct ranlib *ran; register struct ranlib *ran;
register long cnt; register long cnt;

View file

@ -3,7 +3,7 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
unsigned int unsigned int
rd_unsigned2(fd) rd_unsigned2(fd)

View file

@ -11,8 +11,7 @@
* part. In this case #define OUTSEEK. * part. In this case #define OUTSEEK.
*/ */
#include <out.h> #include "obj.h"
#include "object.h"
extern long lseek(); extern long lseek();
@ -30,6 +29,7 @@ int __sectionnr;
#define sectionnr __sectionnr #define sectionnr __sectionnr
static int offcnt; static int offcnt;
void
__wr_flush(ptr) __wr_flush(ptr)
register struct fil *ptr; register struct fil *ptr;
{ {
@ -54,7 +54,8 @@ __wr_flush(ptr)
ptr->pbegin = ptr->pbuf; ptr->pbegin = ptr->pbuf;
} }
static OUTWRITE(p, b, n) static void
OUTWRITE(p, b, n)
int p; /* part number */ int p; /* part number */
register char *b; /* buffer pointer */ register char *b; /* buffer pointer */
long n; /* write count */ long n; /* write count */
@ -119,7 +120,8 @@ static OUTWRITE(p, b, n)
} }
} }
static BEGINSEEK(p, o) static void
BEGINSEEK(p, o)
int p; /* part number */ int p; /* part number */
long o; /* offset in file */ long o; /* offset in file */
{ {
@ -162,6 +164,7 @@ wr_open(f)
return 1; return 1;
} }
void
wr_close() wr_close()
{ {
register struct fil *ptr; register struct fil *ptr;
@ -179,6 +182,7 @@ wr_close()
#endif /* OUTSEEK */ #endif /* OUTSEEK */
} }
void
wr_ohead(head) wr_ohead(head)
register struct outhead *head; register struct outhead *head;
{ {
@ -215,6 +219,7 @@ wr_ohead(head)
else OUTWRITE(PARTEMIT, (char *)head, (long)SZ_HEAD); else OUTWRITE(PARTEMIT, (char *)head, (long)SZ_HEAD);
} }
void
wr_sect(sect, cnt) wr_sect(sect, cnt)
register struct outsect *sect; register struct outsect *sect;
register unsigned int cnt; register unsigned int cnt;
@ -263,6 +268,7 @@ wr_sect(sect, cnt)
#endif #endif
} }
void
wr_outsect(s) wr_outsect(s)
int s; /* section number */ int s; /* section number */
{ {
@ -295,6 +301,7 @@ wr_outsect(s)
/* /*
* We don't have to worry about byte order here. * We don't have to worry about byte order here.
*/ */
void
wr_emit(emit, cnt) wr_emit(emit, cnt)
char *emit; char *emit;
long cnt; long cnt;
@ -302,6 +309,7 @@ wr_emit(emit, cnt)
OUTWRITE(PARTEMIT + getsect(sectionnr) , emit, cnt); OUTWRITE(PARTEMIT + getsect(sectionnr) , emit, cnt);
} }
void
wr_relo(relo, cnt) wr_relo(relo, cnt)
register struct outrelo *relo; register struct outrelo *relo;
unsigned int cnt; unsigned int cnt;
@ -339,6 +347,7 @@ wr_relo(relo, cnt)
#endif #endif
} }
void
wr_name(name, cnt) wr_name(name, cnt)
register struct outname *name; register struct outname *name;
unsigned int cnt; unsigned int cnt;
@ -374,6 +383,7 @@ wr_name(name, cnt)
} }
void
wr_string(addr, len) wr_string(addr, len)
char *addr; char *addr;
long len; long len;
@ -384,6 +394,7 @@ wr_string(addr, len)
#ifdef SYMDBUG #ifdef SYMDBUG
void
wr_dbug(buf, size) wr_dbug(buf, size)
char *buf; char *buf;
long size; long size;

View file

@ -3,9 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include <arch.h> #include "obj.h"
#include "object.h"
void
wr_arhdr(fd, arhdr) wr_arhdr(fd, arhdr)
register struct ar_hdr *arhdr; register struct ar_hdr *arhdr;
{ {

View file

@ -3,6 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "obj.h"
#define MININT (1 << (sizeof(int) * 8 - 1)) #define MININT (1 << (sizeof(int) * 8 - 1))
#define MAXCHUNK (~MININT) /* Highest count we write(2). */ #define MAXCHUNK (~MININT) /* Highest count we write(2). */
/* Notice that MAXCHUNK itself might be too large with some compilers. /* Notice that MAXCHUNK itself might be too large with some compilers.
@ -14,6 +17,7 @@ static int maxchunk = MAXCHUNK;
/* /*
* Just write "cnt" bytes to file-descriptor "fd". * Just write "cnt" bytes to file-descriptor "fd".
*/ */
void
wr_bytes(fd, string, cnt) wr_bytes(fd, string, cnt)
register char *string; register char *string;
register long cnt; register long cnt;

View file

@ -3,8 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
void
wr_int2(fd, i) wr_int2(fd, i)
{ {
char buf[2]; char buf[2];

View file

@ -3,8 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
void
wr_long(fd, l) wr_long(fd, l)
long l; long l;
{ {

View file

@ -3,10 +3,11 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include "object.h" #include "obj.h"
extern int __sectionnr; extern int __sectionnr;
void
wr_putc(ch) wr_putc(ch)
{ {
register struct fil *ptr = &__parts[PARTEMIT+getsect(__sectionnr)]; register struct fil *ptr = &__parts[PARTEMIT+getsect(__sectionnr)];

View file

@ -3,9 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#include <ranlib.h> #include "obj.h"
#include "object.h"
void
wr_ranlib(fd, ran, cnt1) wr_ranlib(fd, ran, cnt1)
struct ranlib *ran; struct ranlib *ran;
long cnt1; long cnt1;