summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>2001-08-07 11:09:15 +0000
committertg <tg@FreeBSD.org>2001-08-07 11:09:15 +0000
commitfb3e81395fc4fea6fffdc652f1364adb21631758 (patch)
treef2a39d2f34ec621383d2d36c688d6fa7b95aea48 /usr.bin
parent9e5e8e8ff4dc1c36140e5812f269c12f8ab078e8 (diff)
downloadFreeBSD-src-fb3e81395fc4fea6fffdc652f1364adb21631758.zip
FreeBSD-src-fb3e81395fc4fea6fffdc652f1364adb21631758.tar.gz
Fix warnings resulting from `-Wredundant-decls -Wstrict-prototypes'.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/doscmd/AsyncIO.c18
-rw-r--r--usr.bin/doscmd/AsyncIO.h3
-rw-r--r--usr.bin/doscmd/cmos.c2
-rw-r--r--usr.bin/doscmd/com.h14
-rw-r--r--usr.bin/doscmd/cwd.c2
-rw-r--r--usr.bin/doscmd/dos.c2
-rw-r--r--usr.bin/doscmd/dos.h4
-rw-r--r--usr.bin/doscmd/doscmd.c2
-rw-r--r--usr.bin/doscmd/doscmd.h1
-rw-r--r--usr.bin/doscmd/i386-pinsn.c12
-rw-r--r--usr.bin/doscmd/trace.c1
-rw-r--r--usr.bin/doscmd/tty.c31
-rw-r--r--usr.bin/doscmd/tty.h2
-rw-r--r--usr.bin/doscmd/xms.c11
14 files changed, 39 insertions, 66 deletions
diff --git a/usr.bin/doscmd/AsyncIO.c b/usr.bin/doscmd/AsyncIO.c
index 6b75baf..649e073 100644
--- a/usr.bin/doscmd/AsyncIO.c
+++ b/usr.bin/doscmd/AsyncIO.c
@@ -61,7 +61,7 @@
static fd_set fdset; /* File Descriptors to select on */
typedef struct {
- void (*func)(void *, REGISTERS);
+ void (*func)(void *, regcontext_t *);
/* Function to call on data arrival */
void (*failure)(void *); /* Function to call on failure */
void *arg; /* Argument to above functions */
@@ -70,18 +70,18 @@ typedef struct {
int flag; /* The flag from F_GETFL (we own it) */
} Async;
-static Async handlers[OPEN_MAX];
+static Async handlers[OPEN_MAX];
+static int in_handler = 0;
-static void HandleIO (struct sigframe *sf);
-
-static int in_handler = 0;
+static void CleanIO(void);
+static void HandleIO(struct sigframe *sf);
void
_RegisterIO(fd, func, arg, failure)
int fd;
-void (*func)();
+void (*func)(void *, regcontext_t *);
void *arg;
-void (*failure)();
+void (*failure)(void *);
{
static int firsttime = 1;
Async *as;
@@ -150,7 +150,7 @@ CleanIO()
errno = 0;
if (select(FD_SETSIZE, &set, 0, 0, &tv) < 0 &&
errno == EBADF) {
- void (*f)();
+ void (*f)(void *);
void *a;
printf("Closed file descriptor %d\n", x);
@@ -273,7 +273,7 @@ if (0)
* STEP 3: Call the handler
*/
(*handlers[fd].func)(handlers[fd].arg,
- (regcontext_t*)&sf->sf_uc);
+ (regcontext_t *)&sf->sf_uc);
/*
* STEP 4: Just turn SIGIO off. No check.
diff --git a/usr.bin/doscmd/AsyncIO.h b/usr.bin/doscmd/AsyncIO.h
index 745f32e..cb867a3 100644
--- a/usr.bin/doscmd/AsyncIO.h
+++ b/usr.bin/doscmd/AsyncIO.h
@@ -35,7 +35,8 @@
#if defined(__cplusplus)
extern "C" {
#endif
-void _RegisterIO(int, void (*)(void *), void *, void (*)());
+void _RegisterIO(int, void (*)(void *, regcontext_t *),
+ void *, void (*)(void *));
void _AssociateIO(int, int);
void _DeAssociateIO(int, int);
void _LockIO(int);
diff --git a/usr.bin/doscmd/cmos.c b/usr.bin/doscmd/cmos.c
index 75907ad..9715c9b 100644
--- a/usr.bin/doscmd/cmos.c
+++ b/usr.bin/doscmd/cmos.c
@@ -99,7 +99,7 @@ static int cmos_alarm_time = 0;
static int cmos_alarm_daytime = 0;
static inline int
-day_in_mon_year (mon, year)
+day_in_mon_year(int mon, int year)
{
return day_in_year[mon] + (mon > 2 && (year % 4 == 0));
}
diff --git a/usr.bin/doscmd/com.h b/usr.bin/doscmd/com.h
index 98982a9..b2281d9 100644
--- a/usr.bin/doscmd/com.h
+++ b/usr.bin/doscmd/com.h
@@ -152,16 +152,12 @@ struct com_data_struct {
#define DIV_LATCH_HIGH_WRITTEN 0x02
#define DIV_LATCH_BOTH_WRITTEN 0x03
-/* variable declarations */
-
-extern int errno;
-
/* routine declarations */
-extern void int14(regcontext_t *REGS);
-extern void com_set_line(struct com_data_struct *, unsigned char, unsigned char);
-extern void init_com(int, char *, int, unsigned char);
-extern u_char com_port_in(int);
-extern void com_port_out(int, unsigned char);
+void int14(regcontext_t *REGS);
+void com_set_line(struct com_data_struct *, unsigned char, unsigned char);
+void init_com(int, char *, int, unsigned char);
+u_char com_port_in(int);
+void com_port_out(int, unsigned char);
/* end of file com.h */
diff --git a/usr.bin/doscmd/cwd.c b/usr.bin/doscmd/cwd.c
index 82d8a82..1a1f7a2 100644
--- a/usr.bin/doscmd/cwd.c
+++ b/usr.bin/doscmd/cwd.c
@@ -76,8 +76,6 @@ typedef struct Name_t {
static Path_t paths[MAX_DRIVE];
static Name_t *names;
-extern int diskdrive;
-
/*
* Initialize the drive to be based at 'base' in the BSD filesystem
*/
diff --git a/usr.bin/doscmd/dos.c b/usr.bin/doscmd/dos.c
index fd8356d..5c6904b 100644
--- a/usr.bin/doscmd/dos.c
+++ b/usr.bin/doscmd/dos.c
@@ -92,10 +92,8 @@ struct fcb {
}/* __attribute__((__packed__))*/;
/* exports */
-void encode_dos_file_time (time_t, u_short *, u_short *);
int diskdrive = 2; /* C: */
char *InDOS;
-unsigned long disk_transfer_addr;
/* locals */
static void fcb_to_string(struct fcb *, u_char *);
diff --git a/usr.bin/doscmd/dos.h b/usr.bin/doscmd/dos.h
index 1ec83ac..561457c 100644
--- a/usr.bin/doscmd/dos.h
+++ b/usr.bin/doscmd/dos.h
@@ -396,7 +396,3 @@ extern void load_command(regcontext_t *REGS, int run, int fd, char *cmdname,
u_short *param, char **argv, char **envs);
extern void exec_return(regcontext_t *REGS, int code);
extern int get_env(void);
-
-/* from setver.c */
-extern void setver(char *cmd, short version);
-extern short getver(char *cmd);
diff --git a/usr.bin/doscmd/doscmd.c b/usr.bin/doscmd/doscmd.c
index b087327..43a71b8 100644
--- a/usr.bin/doscmd/doscmd.c
+++ b/usr.bin/doscmd/doscmd.c
@@ -842,7 +842,7 @@ done (regcontext_t *REGS, int val)
}
typedef struct COQ {
- void (*func)();
+ void (*func)(void *);
void *arg;
struct COQ *next;
} COQ;
diff --git a/usr.bin/doscmd/doscmd.h b/usr.bin/doscmd/doscmd.h
index 57bae84..46dafa7 100644
--- a/usr.bin/doscmd/doscmd.h
+++ b/usr.bin/doscmd/doscmd.h
@@ -192,7 +192,6 @@ int squirrel_fd(int);
/* ems.c */
int ems_init(void);
void ems_entry(regcontext_t *);
-u_long ems_frame_addr;
/* emuint.c */
extern void emuint(regcontext_t *REGS);
diff --git a/usr.bin/doscmd/i386-pinsn.c b/usr.bin/doscmd/i386-pinsn.c
index 4525d2a..afb29d7 100644
--- a/usr.bin/doscmd/i386-pinsn.c
+++ b/usr.bin/doscmd/i386-pinsn.c
@@ -44,7 +44,7 @@ static void OP_E(int), OP_indirE(int), OP_G(int);
static void OP_I(int), OP_sI(int), OP_REG(int), OP_J(int), OP_SEG(int);
static void OP_DIR(int), OP_OFF(int), OP_DSSI(int), OP_ESDI(int);
static void OP_C(int), OP_D(int), OP_T(int), OP_rm(int);
-static void OP_ST(void), OP_STi(void);
+static void OP_ST(int), OP_STi(int);
static void append_pc(unsigned long);
static void append_prefix(void);
static void dofloat(void);
@@ -177,11 +177,11 @@ static void putop(char *);
struct dis386 {
char *name;
- void (*op1)();
+ void (*op1)(int);
int bytemode1;
- void (*op2)();
+ void (*op2)(int);
int bytemode2;
- void (*op3)();
+ void (*op3)(int);
int bytemode3;
};
@@ -1335,13 +1335,13 @@ dofloat ()
}
static void
-OP_ST()
+OP_ST(int arg)
{
oappend ("%st");
}
static void
-OP_STi()
+OP_STi(int arg)
{
sprintf (scratchbuf, "%%st(%d)", rm);
oappend (scratchbuf);
diff --git a/usr.bin/doscmd/trace.c b/usr.bin/doscmd/trace.c
index dbc7118..368b068 100644
--- a/usr.bin/doscmd/trace.c
+++ b/usr.bin/doscmd/trace.c
@@ -35,7 +35,6 @@
#include "doscmd.h"
#include "trap.h"
-extern FILE *debugf;
int tmode = 0;
static u_short *saddr;
diff --git a/usr.bin/doscmd/tty.c b/usr.bin/doscmd/tty.c
index 6657f8b..e3bd830 100644
--- a/usr.bin/doscmd/tty.c
+++ b/usr.bin/doscmd/tty.c
@@ -81,7 +81,6 @@ static int show = 1;
#endif
static int blink = 1;
int flipdelete = 0; /* Flip meaning of delete and backspace */
-extern int capture_fd;
static u_short break_code = 0x00;
static u_short scan_code = 0x00;
int height;
@@ -126,16 +125,16 @@ static struct termios tty_cook, tty_raw;
#define col (CursCol0)
/* Local functions */
-void _kbd_event(void *);
-static void Failure(void);
+static void _kbd_event(void *, regcontext_t *);
+static void Failure(void *);
static void SetVREGCur(void);
-static void debug_event(void *);
+static void debug_event(void *, regcontext_t *);
static unsigned char inb_port60(int);
static int inrange(int, int, int);
static void kbd_event(int);
static u_short read_raw_kbd(int, u_short *);
static void setgc(u_short);
-static void video_async_event(void *);
+static void video_async_event(void *, regcontext_t *);
#ifndef NO_X
static void dac2rgb(XColor *, int);
@@ -198,14 +197,8 @@ static void vram2ximage(void);
#define K4_LED 0x40 /* LED update in progress */
#define K4_ERROR 0x80
-int KbdEmpty();
-void KbdWrite(u_short code);
-void KbdRepl(u_short code);
-u_short KbdRead();
-u_short KbdPeek();
-
static void
-Failure()
+Failure(void *arg)
{
fprintf(stderr, "X Connection shutdown\n");
quit(1);
@@ -241,7 +234,7 @@ console_denit(void *arg)
}
void
-_kbd_event(void *pfd)
+_kbd_event(void *pfd, regcontext_t *REGS)
{
int fd = *(int *)pfd;
@@ -666,7 +659,7 @@ struct {
};
void
-debug_event(void *pfd)
+debug_event(void *pfd, regcontext_t *REGS)
{
static char ibuf[1024];
static int icnt = 0;
@@ -747,10 +740,8 @@ debug_event(void *pfd)
di += c;
ap += c;
}
-#if 0 /* Huh?? */
} else if (!strcasecmp(av[0], "regs")) {
dump_regs(REGS);
-#endif
} else if (!strcasecmp(av[0], "force")) {
char *p = av[1];
@@ -991,7 +982,7 @@ printf("FORCED REDRAW\n");
}
void
-video_async_event(void *pfd)
+video_async_event(void *pfd, regcontext_t *REGS)
{
#ifndef NO_X
int int9 = 0;
@@ -1860,12 +1851,6 @@ KbdWrite(u_short code)
K_FREE = kf;
}
-void
-KbdRepl(u_short code)
-{
- K_BUF(K_NEXT) = code;
-}
-
u_short
KbdRead()
{
diff --git a/usr.bin/doscmd/tty.h b/usr.bin/doscmd/tty.h
index 07ce0a9..660b44c 100644
--- a/usr.bin/doscmd/tty.h
+++ b/usr.bin/doscmd/tty.h
@@ -56,8 +56,6 @@ void tty_index(void);
void tty_move(int, int);
int tty_read(regcontext_t *, int);
void tty_report(int *, int *);
-void tty_flush();
-void tty_index();
void tty_pause(void);
int tty_peek(REGISTERS, int);
void tty_rwrite(int, int, int);
diff --git a/usr.bin/doscmd/xms.c b/usr.bin/doscmd/xms.c
index 7cd2649..bd56fb5 100644
--- a/usr.bin/doscmd/xms.c
+++ b/usr.bin/doscmd/xms.c
@@ -89,10 +89,13 @@ static u_char xms_trampoline[] = {
};
/* Local prototypes */
-static void xms_entry(regcontext_t *REGS);
-static UMB_block *create_block(u_long addr, u_long size);
-static void add_block(UMB_block **listp, UMB_block *blk);
-static void merge_blocks(void);
+static void add_block(UMB_block **listp, UMB_block *blk);
+static UMB_block *create_block(u_long addr, u_long size);
+static void disable_a20(void);
+static void enable_a20(void);
+static int get_free_handle(void);
+static void merge_blocks(void);
+static void xms_entry(regcontext_t *REGS);
/* Init the entire module */
void
OpenPOWER on IntegriCloud