GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-565e82de51
Main Page
Related Pages
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
ascii_chk.c
Go to the documentation of this file.
1
/*!
2
* \file lib/gis/ascii_chk.c
3
*
4
* \brief GIS Library - Remove non-ascii characters
5
*
6
* (C) 2001-2014 by the GRASS Development Team
7
*
8
* This program is free software under the GNU General Public License
9
* (>=v2). Read the file COPYING that comes with GRASS for details.
10
*
11
* \author GRASS GIS Development Team
12
*
13
* \date 1999-2014
14
*/
15
16
#include <
grass/gis.h
>
17
18
#define TAB 011
19
#define SPACE 040
20
21
/**
22
* \brief Removes non-ascii characters from buffer.
23
*
24
* Updates <b>string</b> with non_ascii characters removed, except for
25
* tabs, which are turned into spaces.
26
*
27
* \param[in,out] string buffer to have non-ascii characters removed
28
* \return
29
*/
30
31
void
G_ascii_check
(
char
*
string
)
32
{
33
char
*ptr1, *ptr2;
34
35
ptr1 = string;
36
ptr2 = string;
37
38
while
(*ptr1) {
39
if
((*ptr1 >= 040) && (*ptr1 <= 0176))
40
*ptr2++ = *ptr1;
41
else
if
(*ptr1 ==
TAB
)
42
*ptr2++ =
SPACE
;
43
ptr1++;
44
}
45
*ptr2 = 0;
46
}
G_ascii_check
void G_ascii_check(char *string)
Removes non-ascii characters from buffer.
Definition:
ascii_chk.c:31
SPACE
#define SPACE
Definition:
ascii_chk.c:19
TAB
#define TAB
Definition:
ascii_chk.c:18
gis.h
lib
gis
ascii_chk.c
Generated on Thu Mar 20 2025 07:33:22 for GRASS GIS 8 Programmer's Manual by
1.9.1