GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
strip.c
Go to the documentation of this file.
1
7
/* db_strip(buf)
8
* char *buf buffer to be worked on
9
*
10
* 'buf' is rewritten in place with leading and trailing white
11
* space removed.
12
*/
13
14
15
void
db_strip
(
char
*buf)
16
{
17
char
*a, *
b
;
18
19
/* remove leading white space */
20
for
(a = b = buf; *a ==
' '
|| *a ==
'\t'
; a++) ;
21
if
(a != b)
22
while
((*b++ = *a++)) ;
23
24
/* remove trailing white space */
25
for
(a = buf; *a; a++) ;
26
if
(a != buf) {
27
for
(a--; *a ==
' '
|| *a ==
'\t'
; a--) ;
28
a++;
29
*a = 0;
30
}
31
}
lib
db
dbmi_base
strip.c
Generated on Sat Oct 5 2013 12:11:10 for GRASS Programmer's Manual by
1.8.4