$NetBSD: patch-ex__tagio_c,v 1.1 2012/12/28 03:03:08 dholland Exp $ - avoid implicit int - don't misuse NULL - declare void functions void --- ex_tagio.c~ 2003-09-03 19:53:02.000000000 +0000 +++ ex_tagio.c @@ -96,6 +96,7 @@ static int bcnt = 0; static int b_size = MAXBSIZE; static char *ibuf; +int topen(file, buf) char *file, *buf; { @@ -116,6 +117,7 @@ char *file, *buf; return(fd); } +int tseek(fd, off) int fd; off_t off; @@ -134,6 +136,7 @@ off_t off; return(0); } +int tgets(buf, cnt, fd) register char *buf; int cnt; @@ -145,19 +148,19 @@ int fd; cc = offset; if (cc == -1) { if ((bcnt = read(fd, ibuf, b_size)) <= 0) - return (NULL); + return 0; cc = 0; block = 0; } if (bcnt == 0) /* EOF */ - return(NULL); + return 0; cp = ibuf + cc; while (--cnt > 0) { if (++cc > bcnt) { block += b_size; if ((bcnt = read(fd, ibuf, b_size)) <= 0) { offset = cc; - return (NULL); + return 0; } cp = ibuf; cc = 1; @@ -170,6 +173,7 @@ int fd; return(1); } +void tclose(fd) int fd; {