OSDN Git Service

(split) LDP man-pages の original/ を v3.25 に更新。
[linuxjm/LDP_man-pages.git] / original / man3 / getline.3
index 8987ac9..b74c923 100644 (file)
@@ -21,7 +21,7 @@
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" License.
-.TH GETLINE 3  2009-12-05 "GNU" "Linux Programmer's Manual"
+.TH GETLINE 3  2010-06-12 "GNU" "Linux Programmer's Manual"
 .SH NAME
 getline, getdelim \- delimited string input
 .SH SYNOPSIS
@@ -49,7 +49,7 @@ Since glibc 2.10:
 .br
 .BR getline (),
 .BR getdelim ():
-_POSIX_C_SOURCE >= 200809 || _XOPEN_SOURCE >= 700
+_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700
 .SH DESCRIPTION
 .BR getline ()
 reads an entire line from \fIstream\fP,
@@ -64,7 +64,7 @@ is NULL, then
 .BR getline ()
 will allocate a buffer for storing the line,
 which should be freed by the user program.
-(The value in
+(In this case, the value in
 .I *n
 is ignored.)
 
@@ -112,7 +112,7 @@ but not including the terminating null byte.
 This value can be used
 to handle embedded null bytes in the line read.
 
-Both functions return \-1  on failure to read a line (including end of file
+Both functions return \-1  on failure to read a line (including end-of-file
 condition).
 .SH ERRORS
 .TP
@@ -142,8 +142,8 @@ They were standardized in POSIX.1-2008.
 int
 main(void)
 {
-    FILE * fp;
-    char * line = NULL;
+    FILE *fp;
+    char *line = NULL;
     size_t len = 0;
     ssize_t read;
 
@@ -156,8 +156,7 @@ main(void)
         printf("%s", line);
     }
 
-    if (line)
-        free(line);
+    free(line);
     exit(EXIT_SUCCESS);
 }
 .fi