Code cleanup:-

The usual stuff, adding missing function prototypes, argument types,
return values, etc.

This directory now compiles with no warnings with -Wall on gcc2.6.3!
This commit is contained in:
James Raynard 1996-06-12 22:59:55 +00:00
parent b83100194d
commit 45f6af0252
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16337
6 changed files with 13 additions and 13 deletions

View File

@ -47,7 +47,7 @@ static char sccsid[] = "@(#)stdio.c 8.1 (Berkeley) 6/4/93";
* Small standard I/O/seek/close functions.
* These maintain the `known seek offset' for seek optimisation.
*/
__sread(cookie, buf, n)
int __sread(cookie, buf, n)
void *cookie;
char *buf;
int n;
@ -64,7 +64,7 @@ __sread(cookie, buf, n)
return (ret);
}
__swrite(cookie, buf, n)
int __swrite(cookie, buf, n)
void *cookie;
char const *buf;
int n;
@ -96,7 +96,7 @@ __sseek(cookie, offset, whence)
return (ret);
}
__sclose(cookie)
int __sclose(cookie)
void *cookie;
{

View File

@ -55,28 +55,28 @@ tempnam(dir, pfx)
if (!pfx)
pfx = "tmp.";
if (f = getenv("TMPDIR")) {
if ((f = getenv("TMPDIR"))) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if (f = mktemp(name))
if ((f = mktemp(name)))
return(f);
}
if (f = (char *)dir) {
if ((f = (char *)dir)) {
(void)snprintf(name, MAXPATHLEN, "%s%s%sXXXXXX", f,
*(f + strlen(f) - 1) == '/'? "": "/", pfx);
if (f = mktemp(name))
if ((f = mktemp(name)))
return(f);
}
f = P_tmpdir;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
if (f = mktemp(name))
if ((f = mktemp(name)))
return(f);
f = _PATH_TMP;
(void)snprintf(name, MAXPATHLEN, "%s%sXXXXXX", f, pfx);
if (f = mktemp(name))
if ((f = mktemp(name)))
return(f);
sverrno = errno;

View File

@ -94,7 +94,7 @@ static u_char *__sccl();
/*
* vfscanf
*/
__svfscanf(fp, fmt0, ap)
int __svfscanf(fp, fmt0, ap)
register FILE *fp;
char const *fmt0;
va_list ap;

View File

@ -40,7 +40,7 @@ static char sccsid[] = "@(#)vprintf.c 8.1 (Berkeley) 6/4/93";
#include <stdio.h>
vprintf(fmt, ap)
int vprintf(fmt, ap)
char const *fmt;
_BSD_VA_LIST_ ap;
{

View File

@ -46,7 +46,7 @@ static char sccsid[] = "@(#)wbuf.c 8.1 (Berkeley) 6/4/93";
* the given file. Flush the buffer out if it is or becomes full,
* or if c=='\n' and the file is line buffered.
*/
__swbuf(c, fp)
int __swbuf(c, fp)
register int c;
register FILE *fp;
{

View File

@ -47,7 +47,7 @@ static char sccsid[] = "@(#)wsetup.c 8.1 (Berkeley) 6/4/93";
* because either _flags does not include __SWR, or _buf is NULL.
* _wsetup returns 0 if OK to write, nonzero otherwise.
*/
__swsetup(fp)
int __swsetup(fp)
register FILE *fp;
{
/* make sure stdio is set up */