# HG changeset patch # User Rik # Date 1330982331 28800 # Node ID f312918f16d238d3c4f45fefc205ba2847570a03 # Parent 3d4f7631baff58baf9cb2c9956f96749402bde6a doc: Add cross-references between fgets and fgetl in docstrings. file-io.cc (fgets, fgetl): Add cross-references between fgets and fgetl in docstrings. diff --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -302,7 +302,8 @@ DEFUN (fgetl, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} fgetl (@var{fid}, @var{len})\n\ +@deftypefn {Built-in Function} {@var{str} =} fgetl (@var{fid})\n\ +@deftypefnx {Built-in Function} {@var{str} =} fgetl (@var{fid}, @var{len})\n\ Read characters from a file, stopping after a newline, or EOF,\n\ or @var{len} characters have been read. The characters read, excluding\n\ the possible trailing newline, are returned as a string.\n\ @@ -311,7 +312,9 @@ character.\n\ \n\ If there are no more characters to read, @code{fgetl} returns @minus{}1.\n\ -@seealso{fread, fscanf}\n\ +\n\ +To read a line and return the terminating newline see @code{fgets}.\n\ +@seealso{fgets, fputs, fopen, fread, fscanf}\n\ @end deftypefn") { static std::string who = "fgetl"; @@ -350,8 +353,8 @@ DEFUN (fgets, args, , "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {} fgets (@var{fid})\n\ -@deftypefnx {Built-in Function} {} fgets (@var{fid}, @var{len})\n\ +@deftypefn {Built-in Function} {@var{str} =} fgets (@var{fid})\n\ +@deftypefnx {Built-in Function} {@var{str} =} fgets (@var{fid}, @var{len})\n\ Read characters from a file, stopping after a newline, or EOF,\n\ or @var{len} characters have been read. The characters read, including\n\ the possible trailing newline, are returned as a string.\n\ @@ -360,7 +363,9 @@ character.\n\ \n\ If there are no more characters to read, @code{fgets} returns @minus{}1.\n\ -@seealso{fputs, fopen, fread, fscanf}\n\ +\n\ +To read a line and discard the terminating newline see @code{fgetl}.\n\ +@seealso{fgetl, fputs, fopen, fread, fscanf}\n\ @end deftypefn") { static std::string who = "fgets";