Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src remove the fgetstr manpage



details:   https://anonhg.NetBSD.org/src/rev/3dbc3f271caf
branches:  trunk
changeset: 566480:3dbc3f271caf
user:      drochner <drochner%NetBSD.org@localhost>
date:      Mon May 10 17:02:21 2004 +0000

description:
remove the fgetstr manpage

diffstat:

 distrib/sets/lists/comp/mi  |    6 +-
 lib/libc/stdio/Makefile.inc |    4 +-
 lib/libc/stdio/fgetstr.3    |  166 --------------------------------------------
 3 files changed, 5 insertions(+), 171 deletions(-)

diffs (216 lines):

diff -r c9e86ac57117 -r 3dbc3f271caf distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Mon May 10 16:53:56 2004 +0000
+++ b/distrib/sets/lists/comp/mi        Mon May 10 17:02:21 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.700 2004/05/10 02:08:01 kleink Exp $
+#      $NetBSD: mi,v 1.701 2004/05/10 17:02:21 drochner Exp $
 ./etc/mtree/set.comp                           comp-sys-root
 ./usr/bin/addr2line                            comp-debug-bin          bfd
 ./usr/bin/ar                                   comp-util-bin           bfd
@@ -2916,7 +2916,7 @@
 ./usr/share/man/cat3/fgetln.0                  comp-c-catman           .cat
 ./usr/share/man/cat3/fgetpos.0                 comp-c-catman           .cat
 ./usr/share/man/cat3/fgets.0                   comp-c-catman           .cat
-./usr/share/man/cat3/fgetstr.0                 comp-c-catman           .cat
+./usr/share/man/cat3/fgetstr.0                 comp-obsolete           obsolete
 ./usr/share/man/cat3/fgetwc.0                  comp-c-catman           .cat
 ./usr/share/man/cat3/fgetws.0                  comp-c-catman           .cat
 ./usr/share/man/cat3/field_arg.0               comp-c-catman           .cat
@@ -6637,7 +6637,7 @@
 ./usr/share/man/man3/fgetln.3                  comp-c-man              .man
 ./usr/share/man/man3/fgetpos.3                 comp-c-man              .man
 ./usr/share/man/man3/fgets.3                   comp-c-man              .man
-./usr/share/man/man3/fgetstr.3                 comp-c-man              .man
+./usr/share/man/man3/fgetstr.3                 comp-obsolete           obsolete
 ./usr/share/man/man3/fgetwc.3                  comp-c-man              .man
 ./usr/share/man/man3/fgetws.3                  comp-c-man              .man
 ./usr/share/man/man3/field_arg.3               comp-c-man              .man
diff -r c9e86ac57117 -r 3dbc3f271caf lib/libc/stdio/Makefile.inc
--- a/lib/libc/stdio/Makefile.inc       Mon May 10 16:53:56 2004 +0000
+++ b/lib/libc/stdio/Makefile.inc       Mon May 10 17:02:21 2004 +0000
@@ -1,5 +1,5 @@
 #      from: @(#)Makefile.inc  5.7 (Berkeley) 6/27/91
-#      $NetBSD: Makefile.inc,v 1.27 2004/05/09 17:27:53 kleink Exp $
+#      $NetBSD: Makefile.inc,v 1.28 2004/05/10 17:02:21 drochner Exp $
 
 # stdio sources
 .PATH: ${.CURDIR}/stdio
@@ -29,7 +29,7 @@
 MAN+=  fclose.3 ferror.3 fflush.3 fgetln.3 fgets.3 flockfile.3 fopen.3 \
        fputs.3 fread.3 fseek.3 funopen.3 getc.3 mktemp.3 perror.3 printf.3 \
        putc.3 remove.3 scanf.3 setbuf.3 stdio.3 tmpnam.3 ungetc.3 putwc.3 \
-       getwc.3 ungetwc.3 fwide.3 fparseln.3 fgetws.3 fputws.3 fgetstr.3
+       getwc.3 ungetwc.3 fwide.3 fparseln.3 fgetws.3 fputws.3
 
 MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3
 MLINKS+=fflush.3 fpurge.3
diff -r c9e86ac57117 -r 3dbc3f271caf lib/libc/stdio/fgetstr.3
--- a/lib/libc/stdio/fgetstr.3  Mon May 10 16:53:56 2004 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-.\"    $NetBSD: fgetstr.3,v 1.3 2004/05/05 08:48:36 jdolecek Exp $
-.\"
-.\" Copyright (c) 1990, 1991, 1993
-.\"    The Regents of the University of California.  All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"     @(#)fgetln.3   8.3 (Berkeley) 4/19/94
-.\"
-.Dd April 19, 2004
-.Dt FGETSTR 3
-.Os
-.Sh NAME
-.Nm fgetstr
-.Nd get a delimited string from a stream
-.Sh LIBRARY
-.Lb libc
-.Sh SYNOPSIS
-.In stdio.h
-.Ft char *
-.Fn fgetstr "FILE * restrict stream" "size_t * restrict len" "int delim"
-.Sh DESCRIPTION
-The
-.Fn fgetstr
-function
-returns a pointer to the next string from the stream referenced by
-.Fa stream
-ending in
-.Fa delim .
-This string is
-.Em not
-a C string as it does not end with a terminating
-.Dv NUL
-character.
-The length of the line, including the
-.Fa delim
-is stored in the memory location to which
-.Fa len
-points.
-(Note, however, that if the string is the last
-in a file that does not end in
-.Fa delim ,
-the returned text will not contain
-.Fa delim . )
-.Sh RETURN VALUES
-Upon successful completion a pointer is returned;
-this pointer becomes invalid after the next
-.Tn I/O
-operation on
-.Fa stream
-(whether successful or not)
-or as soon as the stream is closed.
-Otherwise,
-.Dv NULL
-is returned.
-The
-.Fn fgetstr
-function
-does not distinguish between end-of-file and error; the routines
-.Xr feof 3
-and
-.Xr ferror 3
-must be used
-to determine which occurred.
-If an error occurs, the global variable
-.Va errno
-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
-.Dv NULL
-until the condition is
-cleared with
-.Xr clearerr 3 .
-.Pp
-The text to which the returned pointer points may be modified,
-provided that no changes are made beyond the returned size.
-These changes are lost as soon as the pointer becomes invalid.
-.Sh ERRORS
-.Bl -tag -width [EBADF]
-.It Bq Er EBADF
-The argument
-.Fa stream
-is not a stream open for reading.
-.El
-.Pp
-The
-.Fn fgetstr
-function
-may also fail and set
-.Va errno
-for any of the errors specified for the routines
-.Xr fflush 3 ,
-.Xr malloc 3 ,
-.Xr read 2 ,
-.Xr stat 2 ,
-or
-.Xr realloc 3 .
-.Sh SEE ALSO
-.Xr ferror 3 ,
-.Xr fgetln 3 ,
-.Xr fgets 3 ,
-.Xr fopen 3 ,
-.Xr putc 3
-.Sh HISTORY
-The
-.Fn fgetstr
-function first appeared in
-.Nx 3.0 .
-.Sh CAVEATS
-Since the returned buffer is not a C string (it is not nul-terminated), a
-common practice is to replace the
-.Fa delim
-character with
-.Sq \e0 .
-However, if the last line in a file does not contain
-.Fa delim ,
-the returned text won't contain
-.Fa delim
-either.
-The following code demonstrates how to deal with this problem by allocating a
-temporary buffer:
-.Bd -literal
-       char *buf, *lbuf;
-       size_t len;
-
-       lbuf = NULL;
-       while ((buf = fgetstr(fp, \*[Am]len, '\et'))) {
-               if (buf[len - 1] == '\et')
-                       buf[len - 1] = '\e0';
-               else {
-                       if ((lbuf = (char *)malloc(len + 1)) == NULL)
-                               err(1, NULL);
-                       memcpy(lbuf, buf, len);
-                       lbuf[len] = '\e0';
-                       buf = lbuf;
-               }
-               printf("%s\en", buf);
-
-               if (lbuf != NULL) {
-                       free(lbuf);
-                       lbuf = NULL;
-               }
-       }
-.Ed



Home | Main Index | Thread Index | Old Index