add prototypes, slight formatting changes

This commit is contained in:
drochner 1999-04-14 11:17:04 +00:00
parent ffd8d7c6d0
commit 2d1e6a1f5a
3 changed files with 35 additions and 28 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dosfile.c,v 1.4 1997/09/17 18:09:04 drochner Exp $ */
/* $NetBSD: dosfile.c,v 1.5 1999/04/14 11:17:04 drochner Exp $ */
/*
* Copyright (c) 1996
@ -49,16 +49,19 @@ extern int dosread __P((int, char *, int));
extern int dosseek __P((int, int, int));
struct dosfile {
int doshandle, off;
int doshandle, off;
};
extern int doserrno; /* in dos_file.S */
extern int doserrno; /* in dos_file.S */
static int dos2errno()
static int dos2errno __P((void));
static int
dos2errno()
{
int err;
switch(doserrno) {
switch (doserrno) {
case 1:
case 4:
case 12:
@ -72,7 +75,7 @@ static int dos2errno()
case 6:
err = EINVAL;
}
return(err);
return (err);
}
int

View File

@ -1,4 +1,4 @@
/* $NetBSD: getsecs.c,v 1.1.1.1 1997/03/14 02:40:32 perry Exp $ */
/* $NetBSD: getsecs.c,v 1.2 1999/04/14 11:17:05 drochner Exp $ */
/* extracted from netbsd:sys/arch/i386/netboot/misc.c */
@ -10,32 +10,34 @@
extern int biosgetrtc __P((u_long*));
static inline u_long bcd2dec __P((u_long));
static inline u_long
bcd2dec(arg)
u_long arg;
u_long arg;
{
return((arg >> 4) * 10 + (arg & 0x0f));
return ((arg >> 4) * 10 + (arg & 0x0f));
}
time_t
getsecs() {
/*
* Return the current time in seconds
*/
/*
* Return the current time in seconds
*/
u_long t;
time_t sec;
u_long t;
time_t sec;
if(biosgetrtc(&t))
panic("RTC invalid");
if (biosgetrtc(&t))
panic("RTC invalid");
sec = bcd2dec(t & 0xff);
sec *= 60;
t >>= 8;
sec += bcd2dec(t & 0xff);
sec *= 60;
t >>= 8;
sec += bcd2dec(t & 0xff);
sec = bcd2dec(t & 0xff);
sec *= 60;
t >>= 8;
sec += bcd2dec(t & 0xff);
sec *= 60;
t >>= 8;
sec += bcd2dec(t & 0xff);
return(sec);
return (sec);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcio.c,v 1.8 1999/03/12 04:14:37 sommerfe Exp $ */
/* $NetBSD: pcio.c,v 1.9 1999/04/14 11:17:05 drochner Exp $ */
/*
* Copyright (c) 1996, 1997
@ -78,7 +78,7 @@ static int getcomaddr __P((int));
#ifdef SUPPORT_SERIAL
static int
getcomaddr(idx)
int idx;
int idx;
{
short addr;
/* read in BIOS data area */
@ -203,9 +203,11 @@ nocom:
#endif /* SUPPORT_SERIAL */
}
static inline void internal_putchar __P((int));
static inline void
internal_putchar(c)
int c;
int c;
{
#ifdef SUPPORT_SERIAL
switch (iodev) {
@ -226,7 +228,7 @@ internal_putchar(c)
void
putchar(c)
int c;
int c;
{
if (c == '\n')
internal_putchar('\r');