change second arg of fgets() from size_t to int

This commit is contained in:
jtc 1995-03-25 02:50:04 +00:00
parent d6c3ebedb4
commit 2ef4abe78f
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdio.h,v 1.15 1995/03/22 18:17:24 jtc Exp $ */
/* $NetBSD: stdio.h,v 1.16 1995/03/25 02:51:02 jtc Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -217,7 +217,7 @@ int ferror __P((FILE *));
int fflush __P((FILE *));
int fgetc __P((FILE *));
int fgetpos __P((FILE *, fpos_t *));
char *fgets __P((char *, size_t, FILE *));
char *fgets __P((char *, int, FILE *));
FILE *fopen __P((const char *, const char *));
int fprintf __P((FILE *, const char *, ...));
int fputc __P((int, FILE *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: fgets.c,v 1.4 1995/02/02 02:09:13 jtc Exp $ */
/* $NetBSD: fgets.c,v 1.5 1995/03/25 02:50:04 jtc Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)fgets.c 8.2 (Berkeley) 12/22/93";
#endif
static char rcsid[] = "$NetBSD: fgets.c,v 1.4 1995/02/02 02:09:13 jtc Exp $";
static char rcsid[] = "$NetBSD: fgets.c,v 1.5 1995/03/25 02:50:04 jtc Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@ -54,14 +54,14 @@ static char rcsid[] = "$NetBSD: fgets.c,v 1.4 1995/02/02 02:09:13 jtc Exp $";
char *
fgets(buf, n, fp)
char *buf;
register size_t n;
register int n;
register FILE *fp;
{
register size_t len;
register char *s;
register unsigned char *p, *t;
if (n == 0) /* sanity check */
if (n <= 0) /* sanity check */
return (NULL);
s = buf;