/[cvs]/ccvs/lib/getline.h
ViewVC logotype

Diff of /ccvs/lib/getline.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by dprice, Mon May 23 17:44:31 2005 UTC revision 1.15 by dprice, Fri Aug 12 20:58:10 2005 UTC
# Line 1  Line 1 
1  /* Replacement for GNU C library function getline  /* getline.h --- Prototype for replacement getline function.
2       Copyright (C) 2005 Free Software Foundation, Inc.
3    
4     Copyright (C) 1995, 1997, 1999, 2000, 2001, 2002, 2003 Free     This program is free software; you can redistribute it and/or
5     Software Foundation, Inc.     modify it under the terms of the GNU General Public License as
6       published by the Free Software Foundation; either version 2, or (at
7       your option) any later version.
8    
9       This program is distributed in the hope that it will be useful, but
10       WITHOUT ANY WARRANTY; without even the implied warranty of
11       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12       General Public License for more details.
13    
14       You should have received a copy of the GNU General Public License
15       along with this program; if not, write to the Free Software
16       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17       02110-1301, USA.  */
18    
19  This program is free software; you can redistribute it and/or modify  /* Written by Simon Josefsson. */
 it under the terms of the GNU General Public License as published by  
 the Free Software Foundation; either version 2, or (at your option)  
 any later version.  
   
 This program is distributed in the hope that it will be useful,  
 but WITHOUT ANY WARRANTY; without even the implied warranty of  
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
 GNU General Public License for more details.  
   
 You should have received a copy of the GNU General Public License  
 along with this program; if not, write to the Free Software  
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */  
   
 #ifndef GETLINE_H_  
 # define GETLINE_H_ 1  
20    
21    /* Get size_t, FILE, ssize_t.  And getline, if available.  */
22  # include <stddef.h>  # include <stddef.h>
23  # include <stdio.h>  # include <stdio.h>
   
 /* Get ssize_t.  */  
24  # include <sys/types.h>  # include <sys/types.h>
25    
26  /* glibc2 has these functions declared in <stdio.h>.  Avoid redeclarations.  */  #if !HAVE_DECL_GETLINE
27  # if __GLIBC__ < 2  ssize_t getline (char **lineptr, size_t *n, FILE *stream);
28    #endif /* !HAVE_GETLINE */
 extern ssize_t getline (char **_lineptr, size_t *_linesize, FILE *_stream);  
   
 extern ssize_t getdelim (char **_lineptr, size_t *_linesize, int _delimiter,  
                           FILE *_stream);  
   
 # endif  
   
 #endif /* not GETLINE_H_ */  

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26