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
clicker.c
Go to the documentation of this file.
1
2
/*-
3
* G_clicker()
4
*
5
* Print a clock hand (one of '|', '/', '-', '\') to stderr.
6
* Used in place of G_percent for unknown number of iterations
7
*
8
*/
9
#include <stdio.h>
10
#include <
grass/gis.h
>
11
12
static
struct
state
{
13
int
prev;
14
}
state
;
15
16
static
struct
state
*
st
= &
state
;
17
18
void
G_clicker
(
void
)
19
{
20
static
const
char
clicks[] =
"|/-\\"
;
21
int
format =
G_info_format
();
22
23
if
(format ==
G_INFO_FORMAT_SILENT
||
G_verbose
() < 1)
24
return
;
25
26
st->prev++;
27
st->prev %= 4;
28
29
fprintf(stderr,
"%1c\b"
, clicks[st->prev]);
30
fflush(stderr);
31
}
G_verbose
int G_verbose(void)
Get current verbosity level.
Definition:
verbose.c:55
gis.h
st
struct state * st
Definition:
parser.c:104
G_INFO_FORMAT_SILENT
#define G_INFO_FORMAT_SILENT
Definition:
gis.h:361
G_clicker
void G_clicker(void)
Definition:
clicker.c:18
G_info_format
int G_info_format(void)
Get current message format.
Definition:
gis/error.c:532
state
struct state state
Definition:
parser.c:103
lib
gis
clicker.c
Generated on Mon May 31 2021 05:21:28 for GRASS GIS 7 Programmer's Manual by
1.8.13