5
* \brief GIS Library - String white space removal functions.
7
* (C) 2001-2008 by the GRASS Development Team
9
* This program is free software under the GNU General Public License
10
* (>=v2). Read the file COPYING that comes with GRASS for details.
12
* \author GRASS GIS Development Team
19
#include <grass/gis.h>
23
* last modification: 12 aug 81, j w hamilton
26
* Also squeezes out newlines -- easier to use with fgets()
28
* 1999-19-12 Werner Droege
29
* changed line 37, line 48ff. -- return (strip_NL(line))
34
* \brief Remove superfluous white space.
36
* Leading and trailing white space is removed from the string
37
* <b>line</b> and internal white space which is more than one character
38
* is reduced to a single space character. White space here means
39
* spaces, tabs, linefeeds, newlines, and formfeeds.
42
* \return Pointer to <b>line</b>
45
char *G_squeeze(char *line)
47
register char *f = line, *t = line;
50
/* skip over space at the beginning of the line. */
62
if (*(line + l) == '\n')