annotate lib/getline.h @ 6011:cf3d0bf4fc6f

2005-08-02 Simon Josefsson <jas@extundo.com> * getline.h, getline.c: Rewrite. * getdelim.h, getdelim.c: New files, ported from glibc. 2005-08-02 Simon Josefsson <jas@extundo.com> * getline.m4: Separate out getdelim stuff into separate module. * getdelim.m4: New file. 2005-08-02 Simon Josefsson <jas@extundo.com> * modules/getdelim: New file. * modules/getline: Rewrite, don't use getndelim2.
author Simon Josefsson <simon@josefsson.org>
date Tue, 02 Aug 2005 09:33:30 +0000
parents a48fb0e98c8c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
1 /* getline.h --- Prototype for replacement getline function.
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
2 Copyright (C) 2005 Free Software Foundation, Inc.
591
8088065f7ad8 New version from gettext-0.10.12.
Jim Meyering <jim@meyering.net>
parents: 512
diff changeset
3
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
4 This program is free software; you can redistribute it and/or
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
5 modify it under the terms of the GNU General Public License as
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
6 published by the Free Software Foundation; either version 2, or (at
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
7 your option) any later version.
591
8088065f7ad8 New version from gettext-0.10.12.
Jim Meyering <jim@meyering.net>
parents: 512
diff changeset
8
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
9 This program is distributed in the hope that it will be useful, but
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
10 WITHOUT ANY WARRANTY; without even the implied warranty of
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
12 General Public License for more details.
591
8088065f7ad8 New version from gettext-0.10.12.
Jim Meyering <jim@meyering.net>
parents: 512
diff changeset
13
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
14 You should have received a copy of the GNU General Public License
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
15 along with this program; if not, write to the Free Software
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
17 02110-1301, USA. */
591
8088065f7ad8 New version from gettext-0.10.12.
Jim Meyering <jim@meyering.net>
parents: 512
diff changeset
18
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
19 /* Written by Simon Josefsson. */
483
Jim Meyering <jim@meyering.net>
parents:
diff changeset
20
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
21 /* Get size_t, FILE, ssize_t. And getline, if available. */
4101
cf248975b9d3 Make getline.h and unicodeio.h self-contained.
Bruno Haible <bruno@clisp.org>
parents: 2950
diff changeset
22 # include <stddef.h>
653
b63f146fd963 indent cpp-directives
Jim Meyering <jim@meyering.net>
parents: 591
diff changeset
23 # include <stdio.h>
4483
1fc15cae781b Change getline and getdelim return type to ssize_t.
Bruno Haible <bruno@clisp.org>
parents: 4463
diff changeset
24 # include <sys/types.h>
1fc15cae781b Change getline and getdelim return type to ssize_t.
Bruno Haible <bruno@clisp.org>
parents: 4463
diff changeset
25
6011
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
26 #if !HAVE_DECL_GETLINE
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
27 ssize_t getline (char **lineptr, size_t *n, FILE *stream);
cf3d0bf4fc6f 2005-08-02 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 5848
diff changeset
28 #endif /* !HAVE_GETLINE */