comparison lib/linebuffer.h @ 1216:cf3c93b52b9b

Make PARAMS-defining conditionals consistent.
author Jim Meyering <jim@meyering.net>
date Fri, 16 Jan 1998 08:51:39 +0000
parents 98c1dec0f42d
children 8cac4427bbda
comparison
equal deleted inserted replaced
1215:f28266e1c1dc 1216:cf3c93b52b9b
1 /* linebuffer.h -- declarations for reading arbitrarily long lines 1 /* linebuffer.h -- declarations for reading arbitrarily long lines
2 Copyright (C) 1986, 1991 Free Software Foundation, Inc. 2 Copyright (C) 1986, 1991, 1998 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 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 Foundation, 15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 16 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17 17
18 #if !defined LINEBUFFER_H
19 # define LINEBUFFER_H
20
18 /* A `struct linebuffer' holds a line of text. */ 21 /* A `struct linebuffer' holds a line of text. */
19 22
20 struct linebuffer 23 struct linebuffer
21 { 24 {
22 long size; /* Allocated. */ 25 long size; /* Allocated. */
23 long length; /* Used. */ 26 long length; /* Used. */
24 char *buffer; 27 char *buffer;
25 }; 28 };
26 29
27 #undef PARAMS 30 # ifndef PARAMS
28 #if defined (__STDC__) && __STDC__ 31 # if defined PROTOTYPES || (defined __STDC__ && __STDC__)
29 # define PARAMS(Args) Args 32 # define PARAMS(Args) Args
30 #else 33 # else
31 # define PARAMS(Args) () 34 # define PARAMS(Args) ()
32 #endif 35 # endif
36 # endif
33 37
34 /* Initialize linebuffer LINEBUFFER for use. */ 38 /* Initialize linebuffer LINEBUFFER for use. */
35 void initbuffer PARAMS ((struct linebuffer *linebuffer)); 39 void initbuffer PARAMS ((struct linebuffer *linebuffer));
36 40
37 /* Read an arbitrarily long line of text from STREAM into LINEBUFFER. 41 /* Read an arbitrarily long line of text from STREAM into LINEBUFFER.
40 struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer, 44 struct linebuffer *readline PARAMS ((struct linebuffer *linebuffer,
41 FILE *stream)); 45 FILE *stream));
42 46
43 /* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */ 47 /* Free linebuffer LINEBUFFER and its data, all allocated with malloc. */
44 void freebuffer PARAMS ((struct linebuffer *)); 48 void freebuffer PARAMS ((struct linebuffer *));
49
50 #endif /* LINEBUFFER_H */