GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
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
11
static
int
G_clicker_prev = 0;
12
13
int
G_clicker
(
void
)
14
{
15
int
x;
16
static
char
clicks[] =
"|/-\\"
;
17
18
if
(G_clicker_prev == -1 || G_clicker_prev == 3)
19
x = 0;
20
21
else
22
x = G_clicker_prev + 1;
23
24
fprintf(stderr,
"%1c\b"
, clicks[x]);
25
fflush(stderr);
26
G_clicker_prev = x;
27
28
return
0;
29
}
lib
gis
clicker.c
Generated on Sun Mar 16 2014 05:07:43 for GRASS Programmer's Manual by
1.8.1.2