GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
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
z
+
Enumerations
a
c
d
e
h
l
m
n
o
p
r
s
t
v
y
+
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
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
eol.c
Go to the documentation of this file.
1
2
/***********************************************************
3
* I_get_to_eol (line,len,fd)
4
*
5
* Reads from fd until the newline, copying the first len-1
6
* characters into line. The newline is not copied.
7
* len should be the length of line in bytes. This allows for
8
* a NULL to be added at the end.
9
***********************************************************/
10
#include <
grass/imagery.h
>
11
#include <stdio.h>
12
int
I_get_to_eol
(
char
*line,
int
len, FILE * fd)
13
{
14
int
c;
15
int
n;
16
17
n = len - 1;
18
while
((c = fgetc(fd)) >= 0 && c !=
'\n'
)
19
if
(n-- > 0)
20
*line++ = c;
21
if
(len > 0)
22
*line = 0;
23
return
c ==
'\n'
;
24
}
imagery.h
I_get_to_eol
int I_get_to_eol(char *line, int len, FILE *fd)
Definition:
eol.c:12
lib
imagery
eol.c
Generated on Mon May 31 2021 05:21:29 for GRASS GIS 7 Programmer's Manual by
1.8.13