$OpenBSD: patch-kbanner_c,v 1.2 2001/02/22 22:02:51 espie Exp $ --- kbanner.c.orig Fri Oct 15 09:43:31 1993 +++ kbanner.c Thu Feb 22 22:56:38 2001 @@ -1,6 +1,11 @@ /* Kanji Banner Version 2.1 by Koichi Yasuoka, October 15, 1993 */ #include +#include + +void kbanner __P((FILE *)); +int kgetchar __P((FILE *)); +void kputchar __P((unsigned int)); extern char *malloc(); extern unsigned short @@ -82,6 +87,7 @@ int b_encoding[]={ exit(1);\ } +int main(argc,argv) int argc; char *argv[]; @@ -130,7 +136,7 @@ char *argv[]; exit(0); } while(argc){ - if(src=fopen(*argv,"r")){ + if((src=fopen(*argv,"r"))){ kbanner(src); fclose(src); } @@ -142,6 +148,7 @@ char *argv[]; exit(0); } +void kbanner(fp) FILE *fp; { @@ -199,6 +206,7 @@ FILE *fp; kputchar(-1); } +void kputchar(c) unsigned int c; { @@ -275,10 +283,11 @@ unsigned int c; col++; } +int kgetchar(fp) FILE *fp; { - int i,j,k,l; + int i,j; if(mime==0) return(fgetc(fp)); if(bufindex>4)); } + return(0); }