summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
466f0a3)
SCCS-vsn: lib/libc/stdio/fdopen.c 5.5
SCCS-vsn: lib/libc/stdio/fopen.c 5.4
SCCS-vsn: lib/libc/stdio/fputs.c 5.5
SCCS-vsn: lib/libc/stdio/freopen.c 5.5
SCCS-vsn: lib/libc/stdio/fseek.c 5.6
SCCS-vsn: lib/libc/stdio/ftell.c 5.4
SCCS-vsn: lib/libc/stdio/fwrite.c 5.4
SCCS-vsn: lib/libc/stdio/remove.c 5.2
SCCS-vsn: lib/libc/stdio/vsnprintf.c 5.2
SCCS-vsn: lib/libc/stdio/vsprintf.c 5.5
SCCS-vsn: lib/libc/stdio/fsetpos.c 5.2
SCCS-vsn: lib/libc/stdio/funopen.c 5.2
12 files changed:
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fdopen.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)fdopen.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
FILE *
fdopen(fd, mode)
int fd;
FILE *
fdopen(fd, mode)
int fd;
{
register FILE *fp;
static int nofile;
{
register FILE *fp;
static int nofile;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fopen.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)fopen.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
- char *file;
- char *mode;
+ const char *file;
+ const char *mode;
{
register FILE *fp;
register int f;
{
register FILE *fp;
register int f;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fputs.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)fputs.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
* Write the given string to the given file.
*/
fputs(s, fp)
* Write the given string to the given file.
*/
fputs(s, fp)
FILE *fp;
{
struct __suio uio;
struct __siov iov;
FILE *fp;
{
struct __suio uio;
struct __siov iov;
+ iov.iov_base = (void *)s;
iov.iov_len = uio.uio_resid = strlen(s);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
iov.iov_len = uio.uio_resid = strlen(s);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)freopen.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)freopen.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*/
FILE *
freopen(file, mode, fp)
*/
FILE *
freopen(file, mode, fp)
+ const char *file, *mode;
register FILE *fp;
{
register int f;
register FILE *fp;
{
register int f;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fseek.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)fseek.c 5.6 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
int whence;
{
#if __STDC__
int whence;
{
#if __STDC__
- register fpos_t (*seekfn)(char *, fpos_t, int);
+ register fpos_t (*seekfn)(void *, fpos_t, int);
#else
register fpos_t (*seekfn)();
#endif
#else
register fpos_t (*seekfn)();
#endif
case SEEK_SET:
case SEEK_END:
case SEEK_SET:
case SEEK_END:
+ curoff = 0; /* XXX just to keep gcc quiet */
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fsetpos.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)fsetpos.c 5.2 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
*/
fsetpos(iop, pos)
FILE *iop;
*/
fsetpos(iop, pos)
FILE *iop;
{
return (fseek(iop, (long)*pos, SEEK_SET));
}
{
return (fseek(iop, (long)*pos, SEEK_SET));
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)ftell.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftell.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
+ register const FILE *fp;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)funopen.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)funopen.c 5.2 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
FILE *
funopen(cookie, readfn, writefn, seekfn, closefn)
FILE *
funopen(cookie, readfn, writefn, seekfn, closefn)
int (*readfn)(), (*writefn)();
#if __STDC__
int (*readfn)(), (*writefn)();
#if __STDC__
- fpos_t (*seekfn)(char *cookie, fpos_t off, int whence);
+ fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
#else
fpos_t (*seekfn)();
#endif
#else
fpos_t (*seekfn)();
#endif
return (NULL);
fp->_flags = flags;
fp->_file = -1;
return (NULL);
fp->_flags = flags;
fp->_file = -1;
+ fp->_cookie = (void *)cookie;
fp->_read = readfn;
fp->_write = writefn;
fp->_seek = seekfn;
fp->_read = readfn;
fp->_write = writefn;
fp->_seek = seekfn;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fwrite.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)fwrite.c 5.4 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
* Return the number of whole objects written.
*/
fwrite(buf, size, count, fp)
* Return the number of whole objects written.
*/
fwrite(buf, size, count, fp)
size_t size, count;
FILE *fp;
{
size_t size, count;
FILE *fp;
{
struct __suio uio;
struct __siov iov;
struct __suio uio;
struct __siov iov;
+ iov.iov_base = (void *)buf;
uio.uio_resid = iov.iov_len = n = count * size;
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
uio.uio_resid = iov.iov_len = n = count * size;
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)remove.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)remove.c 5.2 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
remove(file)
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
remove(file)
{
return (unlink(file));
}
{
return (unlink(file));
}
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)vsnprintf.c 5.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)vsnprintf.c 5.2 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
vsnprintf(str, n, fmt, ap)
char *str;
size_t n;
vsnprintf(str, n, fmt, ap)
char *str;
size_t n;
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)vsprintf.c 5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)vsprintf.c 5.5 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
vsprintf(str, fmt, ap)
char *str;
vsprintf(str, fmt, ap)
char *str;