Module Name: src Committed By: enami Date: Wed Apr 20 23:37:51 UTC 2011
Modified Files: src/lib/libc/stdio: getdelim.3 Log Message: - Put empty line after the local variable definition in the sample code to improve readability. - Remove indirection operator to clarify error condition. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdio/getdelim.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdio/getdelim.3 diff -u src/lib/libc/stdio/getdelim.3:1.8 src/lib/libc/stdio/getdelim.3:1.9 --- src/lib/libc/stdio/getdelim.3:1.8 Wed Jun 30 13:38:10 2010 +++ src/lib/libc/stdio/getdelim.3 Wed Apr 20 23:37:51 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdelim.3,v 1.8 2010/06/30 13:38:10 jruoho Exp $ +.\" $NetBSD: getdelim.3,v 1.9 2011/04/20 23:37:51 enami Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -108,6 +108,7 @@ char *line = NULL; size_t linesize = 0; ssize_t linelen; + while ((linelen = getline(\*[Am]line, \*[Am]linesize, fp)) != -1) fwrite(line, linelen, 1, stdout); @@ -117,9 +118,9 @@ .Sh ERRORS .Bl -tag -width [EOVERFLOW] .It Bq Er EINVAL -.Fa *lineptr +.Fa lineptr or -.Fa *n +.Fa n is a .Dv NULL pointer.