Code cleanup:-

The usual stuff, adding missing function prototypes, argument types,
return values, etc. In mktemp.c, convert pid from u_int to pid_t, and
get rid of "extern int errno".
This commit is contained in:
jraynard 1996-06-12 22:58:21 +00:00
parent 8a4400a463
commit 4a395602dc
7 changed files with 11 additions and 12 deletions

View File

@ -43,7 +43,7 @@ static char sccsid[] = "@(#)fsetpos.c 8.1 (Berkeley) 6/4/93";
/*
* fsetpos: like fseek.
*/
fsetpos(iop, pos)
int fsetpos(iop, pos)
FILE *iop;
const fpos_t *pos;
{

View File

@ -49,7 +49,7 @@ static char sccsid[] = "@(#)fvwrite.c 8.1 (Berkeley) 6/4/93";
* This routine is large and unsightly, but most of the ugliness due
* to the three different kinds of output buffering is handled here.
*/
__sfvwrite(fp, uio)
int __sfvwrite(fp, uio)
register FILE *fp;
register struct __suio *uio;
{

View File

@ -43,7 +43,7 @@ static char sccsid[] = "@(#)fwalk.c 8.1 (Berkeley) 6/4/93";
#include "local.h"
#include "glue.h"
_fwalk(function)
int _fwalk(function)
register int (*function)();
{
register FILE *fp;

View File

@ -40,7 +40,7 @@ static char sccsid[] = "@(#)getw.c 8.1 (Berkeley) 6/4/93";
#include <stdio.h>
getw(fp)
int getw(fp)
FILE *fp;
{
int x;

View File

@ -43,9 +43,9 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93";
#include <unistd.h>
#include <ctype.h>
static int _gettemp();
static int _gettemp(char *, int *);
mkstemp(path)
int mkstemp(path)
char *path;
{
int fd;
@ -61,14 +61,13 @@ mktemp(path)
}
static
_gettemp(path, doopen)
int _gettemp(path, doopen)
char *path;
register int *doopen;
{
extern int errno;
register char *start, *trv;
struct stat sbuf;
u_int pid;
pid_t pid;
pid = getpid();
for (trv = path; *trv; ++trv); /* extra X's get set to 0's */

View File

@ -46,7 +46,7 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
#endif
#if __STDC__
printf(char const *fmt, ...)
int printf(char const *fmt, ...)
#else
printf(fmt, va_alist)
char *fmt;

View File

@ -44,7 +44,7 @@ static char sccsid[] = "@(#)refill.c 8.1 (Berkeley) 6/4/93";
#include "local.h"
static
lflush(fp)
int lflush(fp)
FILE *fp;
{
@ -57,7 +57,7 @@ lflush(fp)
* Refill a stdio buffer.
* Return EOF on eof or error, 0 otherwise.
*/
__srefill(fp)
int __srefill(fp)
register FILE *fp;
{