From 79658f9bf8674437ba68db5b2cf313ee0c2c997f Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Wed, 16 Dec 2015 00:52:52 +0100 Subject: [PATCH] Compiler suggested cleanups (mostly declarations). --- src/dvdte.c | 1 + src/fecmd.c | 5 +---- src/fecmd.h | 3 +++ src/klh10.c | 4 ++++ src/klh10exp.h | 34 ++++++++++++++++++++++++++++++++++ src/kn10cpu.c | 10 ++-------- src/udlconv.c | 1 + src/uexbconv.c | 1 + src/wxtest.c | 6 ++++++ 9 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 src/klh10exp.h diff --git a/src/dvdte.c b/src/dvdte.c index 520c254..8a8e794 100644 --- a/src/dvdte.c +++ b/src/dvdte.c @@ -48,6 +48,7 @@ #include "kn10dev.h" #include "dvdte.h" #include "prmstr.h" /* For parameter parsing */ +#include "fecmd.h" #ifdef RCSID RCSID(dvdte_c,"$Id: dvdte.c,v 2.7 2002/04/24 07:56:08 klh Exp $") diff --git a/src/fecmd.c b/src/fecmd.c index 249dfa5..a5327fc 100644 --- a/src/fecmd.c +++ b/src/fecmd.c @@ -44,6 +44,7 @@ #include "prmstr.h" #include "dvcty.h" /* For cty_ functions */ #include "fecmd.h" +#include "klh10exp.h" #if KLH10_CPU_KS # include "dvuba.h" /* So can get at device info */ @@ -52,10 +53,6 @@ #ifdef RCSID RCSID(fecmd_c,"$Id: fecmd.c,v 2.2 2002/05/21 09:43:39 klh Exp $") #endif - -/* Imported data */ -extern int proc_bkgd; /* From klh10.c */ - /* FE command parsing and CTY utilities diff --git a/src/fecmd.h b/src/fecmd.h index a1939e3..4211e13 100644 --- a/src/fecmd.h +++ b/src/fecmd.h @@ -59,6 +59,9 @@ extern void fe_ctycmforce(void); extern void fe_cmpromptset(char *); extern char *fe_cmprompt(int); +extern enum haltcode fe_haltcode(void); +extern void fe_ctyinit(void); + /* Exported data */ extern int feiosignulls; extern int feiosiginps; diff --git a/src/klh10.c b/src/klh10.c index e4fe129..33c0c64 100644 --- a/src/klh10.c +++ b/src/klh10.c @@ -62,6 +62,10 @@ # include "dvuba.h" /* So can get at device info */ #endif +#if KLH10_DEV_LITES +# include "dvlites.h" +#endif + #ifdef RCSID RCSID(klh10_c,"$Id: klh10.c,v 2.9 2002/05/21 16:54:32 klh Exp $") #endif diff --git a/src/klh10exp.h b/src/klh10exp.h new file mode 100644 index 0000000..dcbf938 --- /dev/null +++ b/src/klh10exp.h @@ -0,0 +1,34 @@ +/* KLH10EXP.H - Exports from klh10.c +*/ +/* Copyright © 2015 Olaf "Rhialto" Seibert +** All Rights Reserved +** +** This file is part of the KLH10 Distribution. Use, modification, and +** re-distribution is permitted subject to the terms in the file +** named "LICENSE", which contains the full text of the legal notices +** and should always accompany this Distribution. +** +** This software is provided "AS IS" with NO WARRANTY OF ANY KIND. +** +** This notice (including the copyright and warranty disclaimer) +** must be included in all copies or derivations of this software. +*/ + +#ifndef KLH10EXP_INCLUDED +#define KLH10EXP_INCLUDED 1 + +void klh10_main(int argc, char **argv); +void fe_aprcont(int, int, vaddr_t, int); +void fe_shutdown(void); +void fe_traceprint(w10_t, vaddr_t); +void fe_begpcfdbg(FILE *f); +void fe_endpcfdbg(FILE *f); +void pishow(FILE *); +void pcfshow(FILE *, h10_t); +void insprint(FILE *, int); +void pinstr(FILE *f, register w10_t w, int flags, vaddr_t e); +/* void panic(char *, ...); */ /* Declared in kn10def.h */ + +extern int proc_bkgd; + +#endif /* ifndef KLH10EXP_INCLUDED */ diff --git a/src/kn10cpu.c b/src/kn10cpu.c index c16ef55..b2ae9ea 100644 --- a/src/kn10cpu.c +++ b/src/kn10cpu.c @@ -46,6 +46,8 @@ #include "kn10ops.h" #include "kn10dev.h" /* For device PI handling */ #include "dvcty.h" /* For cty_ stuff */ +#include "fecmd.h" +#include "klh10exp.h" #ifdef RCSID RCSID(kn10cpu_c,"$Id: kn10cpu.c,v 2.9 2002/05/21 16:54:32 klh Exp $") @@ -65,14 +67,6 @@ void a1pr_undo(void); void afi_undo(void); #endif -/* Imported functions */ -extern void fe_begpcfdbg(FILE *); -extern void fe_endpcfdbg(FILE *); -extern void pishow(FILE *); -extern void pcfshow(FILE *, h10_t flags); -extern void pinstr(FILE *, w10_t w, int flags, vaddr_t e); -extern void fe_traceprint (register w10_t instr, vaddr_t e); - /* Pre-declarations */ static void trap_xct(void); static int pi_check(void); diff --git a/src/udlconv.c b/src/udlconv.c index 3bf1b6f..c4aad01 100644 --- a/src/udlconv.c +++ b/src/udlconv.c @@ -242,6 +242,7 @@ void outlink(struct filent *fe); void outfile(struct filent *fe); +int main(int argc, char *argv[]) { register int i; diff --git a/src/uexbconv.c b/src/uexbconv.c index ea48adc..521b906 100644 --- a/src/uexbconv.c +++ b/src/uexbconv.c @@ -77,6 +77,7 @@ static int getw10(WFILE *wf, w10_t *wp); static char usage[] = "\ Usage: %s [-v] < infile.exb > outfile.sav\n"; +int main(int argc, char **argv) { int n; diff --git a/src/wxtest.c b/src/wxtest.c index eb91061..7c9da4a 100644 --- a/src/wxtest.c +++ b/src/wxtest.c @@ -77,7 +77,13 @@ int dotests(void); int txtest(void); int tinttypes(void); int tmasks(void); +int testfmt(void); +int test32(void); +#ifdef WORD10_INT +int test36(void); +#endif +int main(int argc, char **argv) { char *cp;