mirror of https://github.com/tildeclub/ex-vi.git
gcc -Wstrict-prototypes and related fixes
This commit is contained in:
parent
ae8b700100
commit
1135d13657
4
ex_put.c
4
ex_put.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_put.c 1.34 (gritter) 8/6/05";
|
||||
static char sccsid[] = "@(#)ex_put.c 1.35 (gritter) 12/25/06";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1054,7 +1054,7 @@ setoutt(void)
|
|||
void
|
||||
vlprintf(char *cp, va_list ap)
|
||||
{
|
||||
register int (*P)();
|
||||
register int (*P)(int);
|
||||
|
||||
P = setlist(1);
|
||||
vprintf(cp, ap);
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_subr.c 1.40 (gritter) 8/6/05";
|
||||
static char sccsid[] = "@(#)ex_subr.c 1.41 (gritter) 12/25/06";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -638,7 +638,7 @@ qcolumn(register char *lim, register char *gp)
|
|||
{
|
||||
register int x = 0, n = 1;
|
||||
int c, i;
|
||||
int (*OO)();
|
||||
int (*OO)(int);
|
||||
|
||||
OO = Outchar;
|
||||
Outchar = qcount;
|
||||
|
@ -851,7 +851,7 @@ char *
|
|||
vfindcol(int i)
|
||||
{
|
||||
register char *cp;
|
||||
register int (*OO)() = Outchar;
|
||||
register int (*OO)(int) = Outchar;
|
||||
int c, n = 0;
|
||||
|
||||
Outchar = qcount;
|
||||
|
|
26
ex_temp.c
26
ex_temp.c
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_temp.c 1.26 (gritter) 8/4/05";
|
||||
static char sccsid[] = "@(#)ex_temp.c 1.27 (gritter) 12/25/06";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -265,25 +265,29 @@ getblock(line atl, int iof)
|
|||
if (iof == READ) {
|
||||
if (hitin2 == 0) {
|
||||
if (ichang2) {
|
||||
blkio(iblock2, ibuff2, (ssize_t(*)())write);
|
||||
blkio(iblock2, ibuff2,
|
||||
(ssize_t(*)(int, void *, size_t))write);
|
||||
}
|
||||
ichang2 = 0;
|
||||
iblock2 = bno;
|
||||
blkio(bno, ibuff2, (ssize_t(*)())read);
|
||||
blkio(bno, ibuff2,
|
||||
(ssize_t(*)(int, void *, size_t))read);
|
||||
hitin2 = 1;
|
||||
return (ibuff2 + off);
|
||||
}
|
||||
hitin2 = 0;
|
||||
if (ichanged) {
|
||||
blkio(iblock, ibuff, (ssize_t(*)())write);
|
||||
blkio(iblock, ibuff,
|
||||
(ssize_t(*)(int, void *, size_t))write);
|
||||
}
|
||||
ichanged = 0;
|
||||
iblock = bno;
|
||||
blkio(bno, ibuff, (ssize_t(*)())read);
|
||||
blkio(bno, ibuff, (ssize_t(*)(int, void *, size_t))read);
|
||||
return (ibuff + off);
|
||||
}
|
||||
if (oblock >= 0) {
|
||||
blkio(oblock, obuff, (ssize_t(*)())write);
|
||||
blkio(oblock, obuff,
|
||||
(ssize_t(*)(int, void *, size_t))write);
|
||||
}
|
||||
oblock = bno;
|
||||
return (obuff + off);
|
||||
|
@ -301,7 +305,7 @@ blkio(bloc b, char *buf, ssize_t (*iofcn)(int, void *, size_t))
|
|||
|
||||
#ifdef INCORB
|
||||
if (b < INCORB) {
|
||||
if (iofcn == (ssize_t(*)())read) {
|
||||
if (iofcn == (ssize_t(*)(int, void *, size_t))read) {
|
||||
copy(buf, pagrnd(incorb[b+1]), (size_t) BUFSIZ);
|
||||
return;
|
||||
}
|
||||
|
@ -358,13 +362,13 @@ synctmp(void)
|
|||
if (dol == zero)
|
||||
return;
|
||||
if (ichanged)
|
||||
blkio(iblock, ibuff, (ssize_t(*)())write);
|
||||
blkio(iblock, ibuff, (ssize_t(*)(int, void *, size_t))write);
|
||||
ichanged = 0;
|
||||
if (ichang2)
|
||||
blkio(iblock2, ibuff2, (ssize_t(*)())write);
|
||||
blkio(iblock2, ibuff2, (ssize_t(*)(int, void *, size_t))write);
|
||||
ichang2 = 0;
|
||||
if (oblock != -1)
|
||||
blkio(oblock, obuff, (ssize_t(*)())write);
|
||||
blkio(oblock, obuff, (ssize_t(*)(int, void *, size_t))write);
|
||||
time(&H.Time);
|
||||
uid = getuid();
|
||||
*zero = (line) H.Time;
|
||||
|
@ -566,7 +570,7 @@ shread(void)
|
|||
return (0);
|
||||
}
|
||||
|
||||
int getREG();
|
||||
int getREG(void);
|
||||
|
||||
void
|
||||
putreg(int c)
|
||||
|
|
16
ex_version.c
16
ex_version.c
|
@ -70,12 +70,12 @@
|
|||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Sccsid @(#)ex_version.c 1.145 (gritter) 8/18/05
|
||||
* Sccsid @(#)ex_version.c 1.146 (gritter) 12/25/06
|
||||
*/
|
||||
|
||||
#include "ex.h"
|
||||
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 8/18/05";
|
||||
static char *versionstring = "@(#)Version 4.0 (gritter) 12/25/06";
|
||||
|
||||
void
|
||||
printver(void)
|
||||
|
@ -102,13 +102,13 @@ ex_extern.c:static char sccsid[] = "@(#)ex_extern.c 1.6 (gritter) 11/23/04";
|
|||
ex_get.c:static char sccsid[] = "@(#)ex_get.c 1.18 (gritter) 8/4/05";
|
||||
ex_io.c:static char sccsid[] = "@(#)ex_io.c 1.42 (gritter) 8/4/05";
|
||||
ex_proto.h: * Sccsid @(#)ex_proto.h 1.33 (gritter) 8/6/05
|
||||
ex_put.c:static char sccsid[] = "@(#)ex_put.c 1.34 (gritter) 8/6/05";
|
||||
ex_put.c:static char sccsid[] = "@(#)ex_put.c 1.35 (gritter) 12/25/06";
|
||||
ex_re.c:static char sccsid[] = "@(#)ex_re.c 1.60 (gritter) 8/6/05";
|
||||
ex_re.h: * Sccsid @(#)ex_re.h 1.24 (gritter) 8/4/05
|
||||
ex_set.c:static char sccsid[] = "@(#)ex_set.c 1.11 (gritter) 11/24/04";
|
||||
ex_subr.c:static char sccsid[] = "@(#)ex_subr.c 1.40 (gritter) 8/6/05";
|
||||
ex_subr.c:static char sccsid[] = "@(#)ex_subr.c 1.41 (gritter) 12/25/06";
|
||||
ex_tagio.c:static char sccsid[] = "@(#)ex_tagio.c 1.12 (gritter) 8/4/05";
|
||||
ex_temp.c:static char sccsid[] = "@(#)ex_temp.c 1.26 (gritter) 8/4/05";
|
||||
ex_temp.c:static char sccsid[] = "@(#)ex_temp.c 1.27 (gritter) 12/25/06";
|
||||
ex_temp.h: * Sccsid @(#)ex_temp.h 1.10 (gritter) 8/4/05
|
||||
ex_tty.c:static char sccsid[] = "@(#)ex_tty.c 1.30 (gritter) 8/4/05";
|
||||
ex_tty.h: * Sccsid @(#)ex_tty.h 1.14 (gritter) 8/4/05
|
||||
|
@ -121,12 +121,12 @@ ex_vis.h: * Sccsid @(#)ex_vis.h 1.22 (gritter) 8/6/05
|
|||
ex_vmain.c:static char sccsid[] = "@(#)ex_vmain.c 1.34 (gritter) 8/6/05";
|
||||
ex_voper.c:static char sccsid[] = "@(#)ex_voper.c 1.28 (gritter) 8/6/05";
|
||||
ex_vops.c:static char sccsid[] = "@(#)ex_vops.c 1.28 (gritter) 8/4/05";
|
||||
ex_vops2.c:static char sccsid[] = "@(#)ex_vops2.c 1.35 (gritter) 8/4/05";
|
||||
ex_vops2.c:static char sccsid[] = "@(#)ex_vops2.c 1.36 (gritter) 12/25/06";
|
||||
ex_vops3.c:static char sccsid[] = "@(#)ex_vops3.c 1.21 (gritter) 8/4/05";
|
||||
ex_vput.c:static char sccsid[] = "@(#)ex_vput.c 1.51 (gritter) 8/6/05";
|
||||
ex_vput.c:static char sccsid[] = "@(#)ex_vput.c 1.52 (gritter) 12/25/06";
|
||||
ex_vwind.c:static char sccsid[] = "@(#)ex_vwind.c 1.9 (gritter) 11/23/04";
|
||||
expreserve.c:static char sccsid[] UNUSED = "@(#)expreserve.c 1.23 (gritter) 11/27/04";
|
||||
exrecover.c:static char sccsid[] UNUSED = "@(#)exrecover.c 1.22 (gritter) 8/4/05";
|
||||
exrecover.c:static char sccsid[] UNUSED = "@(#)exrecover.c 1.23 (gritter) 12/25/06";
|
||||
mapmalloc.c: * Sccsid @(#)mapmalloc.c 1.7 (gritter) 8/18/05
|
||||
printf.c:static char sccsid[] = "@(#)printf.c 1.15 (gritter) 12/1/04";
|
||||
*/
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_vops2.c 1.35 (gritter) 8/4/05";
|
||||
static char sccsid[] = "@(#)ex_vops2.c 1.36 (gritter) 12/25/06";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -611,7 +611,7 @@ vgetline(int cnt, char *gcursor, bool *aescaped, int commch)
|
|||
int x, y, iwhite, backsl=0;
|
||||
cell *iglobp;
|
||||
char cstr[2];
|
||||
int (*OO)() = Outchar;
|
||||
int (*OO)(int) = Outchar;
|
||||
|
||||
/*
|
||||
* Clear the output state and counters
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
#ifndef lint
|
||||
#ifdef DOSCCS
|
||||
static char sccsid[] = "@(#)ex_vput.c 1.51 (gritter) 8/6/05";
|
||||
static char sccsid[] = "@(#)ex_vput.c 1.52 (gritter) 12/25/06";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -893,7 +893,7 @@ vnpins(int dosync)
|
|||
e = vglitchup(vcline, d);
|
||||
vigoto(e, 0); vclreol();
|
||||
if (dosync) {
|
||||
int (*Ooutchar)() = Outchar;
|
||||
int (*Ooutchar)(int) = Outchar;
|
||||
Outchar = vputchar;
|
||||
vsync(e + 1);
|
||||
Outchar = Ooutchar;
|
||||
|
|
13
exrecover.c
13
exrecover.c
|
@ -83,7 +83,7 @@ char *copyright =
|
|||
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
|
||||
All rights reserved.\n";
|
||||
#endif
|
||||
static char sccsid[] UNUSED = "@(#)exrecover.c 1.22 (gritter) 8/4/05";
|
||||
static char sccsid[] UNUSED = "@(#)exrecover.c 1.23 (gritter) 12/25/06";
|
||||
#endif
|
||||
|
||||
/* from exrecover.c 7.9.2 (2.11BSD) 1996/10/26 */
|
||||
|
@ -428,7 +428,7 @@ listfiles(char *dirname)
|
|||
xfprintf(xstderr, catgets(catd, 2, 6, "No files saved.\n"));
|
||||
return;
|
||||
}
|
||||
qsort(&svbuf[0], ecount, sizeof svbuf[0], (int(*)()) qucmp);
|
||||
qsort(&svbuf[0], ecount, sizeof svbuf[0], (int(*)(const void *, const void *)) qucmp);
|
||||
for (fp = &svbuf[0]; fp < &svbuf[ecount]; fp++) {
|
||||
cp = ctime(&fp->sf_time);
|
||||
cp[10] = 0;
|
||||
|
@ -449,7 +449,7 @@ enter(struct svfile *fp, char *fname, int count)
|
|||
{
|
||||
register char *cp, *cp2;
|
||||
register struct svfile *f, *fl;
|
||||
time_t curtime, itol();
|
||||
time_t curtime;
|
||||
|
||||
f = 0;
|
||||
if (count >= NENTRY) {
|
||||
|
@ -841,14 +841,15 @@ getblock(line atl, int iof)
|
|||
return (obuff + off);
|
||||
if (iof == READ) {
|
||||
if (ichanged)
|
||||
blkio(iblock, ibuff, (ssize_t(*)())write);
|
||||
blkio(iblock, ibuff,
|
||||
(ssize_t(*)(int, void *, size_t))write);
|
||||
ichanged = 0;
|
||||
iblock = bno;
|
||||
blkio(bno, ibuff, (ssize_t(*)())read);
|
||||
blkio(bno, ibuff, (ssize_t(*)(int, void *, size_t))read);
|
||||
return (ibuff + off);
|
||||
}
|
||||
if (oblock >= 0)
|
||||
blkio(oblock, obuff, (ssize_t(*)())write);
|
||||
blkio(oblock, obuff, (ssize_t(*)(int, void *, size_t))write);
|
||||
oblock = bno;
|
||||
return (obuff + off);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue