man page pass, minor cleanups
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 6 Mar 1991 06:54:41 +0000 (22:54 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 6 Mar 1991 06:54:41 +0000 (22:54 -0800)
SCCS-vsn: lib/libc/stdio/fgetln.3 5.3
SCCS-vsn: lib/libc/stdio/fgets.3 6.7
SCCS-vsn: lib/libc/stdio/fread.3 6.4
SCCS-vsn: lib/libc/stdio/fseek.3 6.7
SCCS-vsn: lib/libc/stdio/getc.3 6.5
SCCS-vsn: lib/libc/stdio/mktemp.3 6.8
SCCS-vsn: lib/libc/string/strerror.3 6.5
SCCS-vsn: lib/libc/stdio/printf.3 6.9
SCCS-vsn: lib/libc/stdio/setbuf.3 6.7
SCCS-vsn: lib/libc/stdio/stdio.3 6.4

usr/src/lib/libc/stdio/fgetln.3
usr/src/lib/libc/stdio/fgets.3
usr/src/lib/libc/stdio/fread.3
usr/src/lib/libc/stdio/fseek.3
usr/src/lib/libc/stdio/getc.3
usr/src/lib/libc/stdio/mktemp.3
usr/src/lib/libc/stdio/printf.3
usr/src/lib/libc/stdio/setbuf.3
usr/src/lib/libc/stdio/stdio.3
usr/src/lib/libc/string/strerror.3

index ec7034d..ac97551 100644 (file)
@@ -3,7 +3,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)fgetln.3    5.2 (Berkeley) %G%
+.\"    @(#)fgetln.3    5.3 (Berkeley) %G%
 .\"
 .TH FGETLINE 3 ""
 .UC 7
 .\"
 .TH FGETLINE 3 ""
 .UC 7
@@ -37,9 +37,9 @@ or as soon as the stream is closed.
 Otherwise, NULL is returned.
 .I Fgetline
 does not distinguish between end-of-file and error, and callers must use
 Otherwise, NULL is returned.
 .I Fgetline
 does not distinguish between end-of-file and error, and callers must use
-.I feof
+.IR feof (3)
 and
 and
-.I ferror
+.IR ferror (3)
 to determine which occurred.
 If an error occurrs, the global variable
 .I errno
 to determine which occurred.
 If an error occurrs, the global variable
 .I errno
@@ -47,7 +47,7 @@ is set to indicate the error.
 The end-of-file condition is remembered, even on a terminal, and all
 subsequent attempts to read will return NULL until the condition is
 cleared with
 The end-of-file condition is remembered, even on a terminal, and all
 subsequent attempts to read will return NULL until the condition is
 cleared with
-.IR clearerr .
+.IR clearerr (3).
 .PP
 The text to which the returned pointer points may be modified,
 provided that no changes are made beyond the terminating NUL.
 .PP
 The text to which the returned pointer points may be modified,
 provided that no changes are made beyond the terminating NUL.
index 8bc1eef..58869ab 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)fgets.3     6.6 (Berkeley) %G%
+.\"    @(#)fgets.3     6.7 (Berkeley) %G%
 .\"
 .TH FGETS 3 ""
 .UC 7
 .\"
 .TH FGETS 3 ""
 .UC 7
@@ -59,10 +59,13 @@ return
 .IR s .
 If end-of-file or an error occurs before any characters are read, 
 they return NULL.
 .IR s .
 If end-of-file or an error occurs before any characters are read, 
 they return NULL.
-Callers must use
-.I feof
+.I Fgets
+and
+.I gets
+do not distinguish between end-of-file and error, and callers must use
+.IR feof (3)
 and
 and
-.I ferror
+.I ferror (3)
 to determine which occurred.
 .SH ERRORS
 .TP 15
 to determine which occurred.
 .SH ERRORS
 .TP 15
index 4ca661c..ae5ad08 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)fread.3     6.3 (Berkeley) %G%
+.\"    @(#)fread.3     6.4 (Berkeley) %G%
 .\"
 .TH FREAD 3 ""
 .UC 7
 .\"
 .TH FREAD 3 ""
 .UC 7
@@ -41,6 +41,13 @@ in the event of an
 .B EOF
 or error).
 .PP
 .B EOF
 or error).
 .PP
+Fread does not distinguish between end-of-file and error, and callers
+must use
+.IR feof (3)
+and
+.IR ferror (3)
+to determine which occurred.
+.PP
 .I Fwrite
 writes
 .I count
 .I Fwrite
 writes
 .I count
@@ -54,4 +61,4 @@ It returns the actual count of items written.
 .SH "RETURN VALUE"
 These functions return 0 (or a short count) upon end of file or error.
 .SH "SEE ALSO"
 .SH "RETURN VALUE"
 These functions return 0 (or a short count) upon end of file or error.
 .SH "SEE ALSO"
-read(2), write(2), fopen(3), getc(3), putc(3), stdio(3)
+read(2), write(2)
index 10c107e..e4b702b 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)fseek.3     6.6 (Berkeley) %G%
+.\"    @(#)fseek.3     6.7 (Berkeley) %G%
 .\"
 .TH FSEEK 3 ""
 .UC 7
 .\"
 .TH FSEEK 3 ""
 .UC 7
@@ -45,13 +45,8 @@ value of
 .IR whence .
 If 
 .I whence
 .IR whence .
 If 
 .I whence
-is set to 
-.IR SEEK_SET ,
-.IR SEEK_CUR ,
-or
-.IR SEEK_END ,
-the offset is from the beginning, the current position, or the end of
-the file, respectively.
+is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is from the
+beginning, the current position, or the end of the file, respectively.
 .I Fseek
 undoes any effects of
 .IR ungetc .
 .I Fseek
 undoes any effects of
 .IR ungetc .
index e7d9a8a..bcec321 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)getc.3      6.4 (Berkeley) %G%
+.\"    @(#)getc.3      6.5 (Berkeley) %G%
 .\"
 .TH GETC 3 ""
 .UC 7
 .\"
 .TH GETC 3 ""
 .UC 7
@@ -24,7 +24,7 @@ int
 getc(FILE *stream);
 
 int
 getc(FILE *stream);
 
 int
-getchar()
+getchar();
 
 int
 getw(FILE *stream);
 
 int
 getw(FILE *stream);
index 810da34..36e9131 100644 (file)
@@ -3,7 +3,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)mktemp.3    6.7 (Berkeley) %G%
+.\"    @(#)mktemp.3    6.8 (Berkeley) %G%
 .\"
 .TH MKTEMP 3  ""
 .AT 3
 .\"
 .TH MKTEMP 3  ""
 .AT 3
@@ -12,12 +12,11 @@ mktemp \- create a unique file name
 .SH SYNOPSIS
 .nf
 .ft B
 .SH SYNOPSIS
 .nf
 .ft B
-char *
-mktemp(template)
-char *template;
-.sp
-mkstemp(template)
-char *template;
+#include <unistd.h>
+
+char *mktemp(char *template);
+
+int mkstemp(char *template);
 .ft R
 .fi
 .SH DESCRIPTION
 .ft R
 .fi
 .SH DESCRIPTION
index 2a2a550..1daf8bc 100644 (file)
@@ -6,7 +6,7 @@
 .\"
 .\" %sccs.include.redist.man%
 .\"
 .\"
 .\" %sccs.include.redist.man%
 .\"
-.\"    @(#)printf.3    6.8 (Berkeley) %G%
+.\"    @(#)printf.3    6.9 (Berkeley) %G%
 .\"
 .TH PRINTF 3 ""
 .UC 7
 .\"
 .TH PRINTF 3 ""
 .UC 7
@@ -546,7 +546,7 @@ char *newfmt(va_alist)
 .RE
 .fi
 .SH "SEE ALSO"
 .RE
 .fi
 .SH "SEE ALSO"
-malloc(3), putc(3), scanf(3)
+printf(1), scanf(3)
 .SH BUGS
 The conversion formats `%D', `%O', and `%U' are not standard and
 are provided only for backward compatibility.
 .SH BUGS
 The conversion formats `%D', `%O', and `%U' are not standard and
 are provided only for backward compatibility.
index 2078763..cf072a9 100644 (file)
@@ -2,7 +2,7 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)setbuf.3    6.6 (Berkeley) %G%
+.\"    @(#)setbuf.3    6.7 (Berkeley) %G%
 .\"
 .TH SETBUF 3
 .UC 4
 .\"
 .TH SETBUF 3
 .UC 4
@@ -117,13 +117,13 @@ fopen(3), fclose(3), fread(3), malloc(3), puts(3), printf(3)
 .I Setbuf  
 and
 .I setvbuf
 .I Setbuf  
 and
 .I setvbuf
-onform to ANSI X3.159-1989 (``ANSI C'').
+conform to ANSI X3.159-1989 (``ANSI C'').
 .SH BUGS
 The
 .I setbuffer
 and
 .I setlinebuf
 .SH BUGS
 The
 .I setbuffer
 and
 .I setlinebuf
-functions are not portable to non-4.2BSD versions of UNIX.
+functions are not portable to versions of BSD UNIX before 4.2BSD.
 On 4.2BSD and 4.3BSD systems,
 .I setbuf
 always uses a suboptimal buffer size and should be avoided.
 On 4.2BSD and 4.3BSD systems,
 .I setbuf
 always uses a suboptimal buffer size and should be avoided.
index 525fa2c..dbdced7 100644 (file)
@@ -2,7 +2,7 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)stdio.3     6.3 (Berkeley) %G%
+.\"    @(#)stdio.3     6.4 (Berkeley) %G%
 .\"
 .TH STDIO 3 ""
 .UC 4
 .\"
 .TH STDIO 3 ""
 .UC 4
@@ -84,41 +84,13 @@ The following are implemented as macros;
 these names may not be reused
 without first removing their current definitions with
 .BR #undef :
 these names may not be reused
 without first removing their current definitions with
 .BR #undef :
-.IR NULL ,
-.IR BUFSIZ ,
-.IR EOF ,
-.IR FOPEN_MAX ,
-.IR FILENAME_MAX ,
-.IR L_tmpnam ,
-.IR SEEK_SET ,
-.IR SEE_CUR ,
-.IR SEEK_END ,
-.IR TMP_MAX ,
-.IR stdin ,
-.IR stdout ,
-.IR stderr ,
-.IR fropen ,
-.IR fwopen ,
-.IR feof ,
-.IR ferror ,
-.IR clearerr ,
-.IR fileno ,
-.IR getc ,
-.IR getchar ,
-.IR putc ,
-.IR putchar ,
-.IR L_cuserid .
-Function versions of the macro functions
-.IR feof ,
-.IR ferror ,
-.IR clearerr ,
-.IR fileno ,
-.IR getc ,
-.IR getchar ,
-.IR putc ,
-and
-.I putchar
-exist and will be used if the macros definitions are explicitly removed.
+BUFSIZ, EOF, FILENAME_MAX, FOPEN_MAX, L_cuserid, L_tmpnam, NULL,
+SEEK_END, SEEK_SET, SEE_CUR, TMP_MAX, clearerr, feof, ferror,
+fileno, fropen, fwopen, getc, getchar, putc, putchar, stderr,
+stdin, stdout.
+Function versions of the macro functions feof, ferror, clearerr, fileno,
+getc, getchar, putc, and putchar exist and will be used if the macros
+definitions are explicitly removed.
 .PP
 Output streams that refer to terminal devices
 are always line buffered by default;
 .PP
 Output streams that refer to terminal devices
 are always line buffered by default;
@@ -132,7 +104,7 @@ will appear.
 .SH "SEE ALSO"
 open(2), close(2), read(2), write(2)
 .br
 .SH "SEE ALSO"
 open(2), close(2), read(2), write(2)
 .br
-all of the manuals listed below
+all of the manual entries listed below
 .SH "RETURN VALUE"
 The value
 .SM
 .SH "RETURN VALUE"
 The value
 .SM
@@ -193,41 +165,20 @@ putc      putc.3  put a character or word to a stream
 putchar        putc.3  put a character or word to a stream
 puts   fputs.3 put a line to a stream
 putw   putc.3  put a character or word to a stream
 putchar        putc.3  put a character or word to a stream
 puts   fputs.3 put a line to a stream
 putw   putc.3  put a character or word to a stream
-remove remove.3        remove a file   xxx
+remove remove.3        remove a file
 rewind fseek.3 reposition a stream
 scanf  scanf.3 formatted input conversion
 setbuf setvbuf.3       assign buffering to a stream
 setbuffer      setvbuf.3       assign buffering to a stream
 setlinebuf     setvbuf.3       assign buffering to a stream
 setvbuf        setvbuf.3       assign buffering to a stream
 rewind fseek.3 reposition a stream
 scanf  scanf.3 formatted input conversion
 setbuf setvbuf.3       assign buffering to a stream
 setbuffer      setvbuf.3       assign buffering to a stream
 setlinebuf     setvbuf.3       assign buffering to a stream
 setvbuf        setvbuf.3       assign buffering to a stream
-.\" smprintf   printf.3        formatted output conversion
 snprintf       printf.3        formatted output conversion
 sprintf        printf.3        formatted output conversion
 snprintf       printf.3        formatted output conversion
 sprintf        printf.3        formatted output conversion
-tmpfile        xxx.3   xxx
-tmpnam xxx.3   xxx
+tmpfile        tmpnam.3        create a temporary stream
+tmpnam tmpnam.3        create a temporary file name
 ungetc ungetc.3        push character back into input stream
 vfprintf       printf.3        formatted output conversion
 vprintf        printf.3        formatted output conversion
 ungetc ungetc.3        push character back into input stream
 vfprintf       printf.3        formatted output conversion
 vprintf        printf.3        formatted output conversion
-.\" vsmprintf  printf.3        formatted output conversion
 vsnprintf      printf.3        formatted output conversion
 vsprintf       printf.3        formatted output conversion
 .fi
 vsnprintf      printf.3        formatted output conversion
 vsprintf       printf.3        formatted output conversion
 .fi
-.sp 2
-Although these have nothing to do with `standard I/O',
-the following declarations also appear in
-.RI < stdio.h >
-as required by ANSI X3.159-1989 and IEEE 1003.2 standards:
-.sp
-.nf
-.ta \w'setlinebuf'u+2n +\w'setvbuf.3'u+10n
-\fIName\fP     \fIAppears on Page\fP   \fIDescription\fP
-.ta \w'setlinebuf'u+4n +\w'setvbuf.3'u+4n
-.sp 5p
-cuserid        cuserid.3       xxx
-getlogin       getlogin.3      get login name
-pclose popen.3 initiate I/O to/from a process
-perror strerror.3      xxx
-popen  popen.3 initiate I/O to/from a process
-remove remove.3        xxx
-rename rename.2        xxx
-.fi
index f006d80..5c50d58 100644 (file)
@@ -2,7 +2,7 @@
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
 .\" All rights reserved.  The Berkeley software License Agreement
 .\" specifies the terms and conditions for redistribution.
 .\"
-.\"    @(#)strerror.3  6.4 (Berkeley) %G%
+.\"    @(#)strerror.3  6.5 (Berkeley) %G%
 .\"
 .TH PERROR 3  ""
 .UC 4
 .\"
 .TH PERROR 3  ""
 .UC 4
 perror, strerror, sys_errlist, sys_nerr \- system error messages
 .SH SYNOPSIS
 .nf
 perror, strerror, sys_errlist, sys_nerr \- system error messages
 .SH SYNOPSIS
 .nf
-.B perror(string)
-.B char *string;
-.PP
-.B char *
-.B strerror(errnum)
-.B int errnum;
-.PP
-.B extern int errno, sys_nerr;
-.B extern char *sys_errlist[];
+.ft B
+extern int errno, sys_nerr;
+extern char *sys_errlist[];
+
+#include <stdio.h>
+
+void perror(const char *string);
+
+char *strerror(int errnum);
+.ft R
 .fi
 .SH DESCRIPTION
 .I Perror
 .fi
 .SH DESCRIPTION
 .I Perror
@@ -52,4 +53,4 @@ variables is deprecated;
 .I strerror
 should be used instead.
 .SH "SEE ALSO"
 .I strerror
 should be used instead.
 .SH "SEE ALSO"
-intro(2)
+intro(2), psignal(3)