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
htmldriver/text.c
Go to the documentation of this file.
1
/* Text.c - save text string into last_text buffer */
2
3
#include <
stdlib.h
>
4
#include <
string.h
>
5
#include <
grass/gis.h
>
6
#include "
driverlib.h
"
7
#include "
htmlmap.h
"
8
9
void
HTML_Text
(
const
char
*text)
10
{
11
int
len = strlen(text);
12
const
char
*s;
13
char
*d;
14
15
if
(len >
html
.
last_text_len
) {
16
G_free
(
html
.
last_text
);
17
html
.
last_text
= (
char
*)
G_malloc
(len + 1);
18
html
.
last_text_len
= len;
19
}
20
21
/* copy string to last_text area, make sure we don't copy \n */
22
for
(d =
html
.
last_text
, s = text; *s !=
'\0'
; s++) {
23
if
(*s !=
'\n'
) {
24
*d = *s;
25
d++;
26
}
27
}
28
*d =
'\0'
;
29
}
G_free
void G_free(void *)
Free allocated memory.
Definition:
gis/alloc.c:150
G_malloc
#define G_malloc(n)
Definition:
defs/gis.h:94
driverlib.h
gis.h
html
struct html_state html
Definition:
htmldriver/graph_set.c:24
HTML_Text
void HTML_Text(const char *text)
Definition:
htmldriver/text.c:9
htmlmap.h
stdlib.h
string.h
html_state::last_text
char * last_text
Definition:
htmlmap.h:26
html_state::last_text_len
int last_text_len
Definition:
htmlmap.h:27
lib
htmldriver
text.c
Generated on Thu Mar 20 2025 07:33:30 for GRASS GIS 8 Programmer's Manual by
1.9.1