$NetBSD: patch-ae,v 1.3 2015/12/29 23:34:43 dholland Exp $ Use standard headers. Don't redeclare standard functions. Avoid unnecessarily global variable. (why?) --- disasm/badautil.c.orig 1999-08-31 18:19:14.000000000 +0200 +++ disasm/badautil.c @@ -5,6 +5,7 @@ */ #include +#include #include #include /* for stat */ #include /* for stat */ @@ -19,13 +20,6 @@ #include "../include/disutils.h" -extern int fprintf(FILE*,const char*,...); -extern int fputc(int , FILE*); -extern int fputs(const char*,FILE*); -extern int sscanf(const char*,const char*,...); -extern int fclose(FILE*); -extern void rewind(FILE*); - FNAME_STRING prog_name; /* to hold the name of the disassembler */ char pn_root[] = @@ -213,13 +207,12 @@ void close_ifile(FILE* f,int* cur_ifile) level--; } -char buf[BUFSIZE]; - void show_line(FILE* f, int* cur_ifile) /* write the source file line inputfile[*cur_ifile].line_no to */ /* file 'f', indicating the proper file include level. */ { int i; + char buf[BUFSIZE]; for (i = 0; i< level; i++) fputc('>',f); fgets(buf,BUFSIZE,inputfile[*cur_ifile].f);