#include <grass/gis.h>#include <stdio.h>Include dependency graph for percent.c:

Go to the source code of this file.
Functions | |
| int | G_percent (int n, int d, int s) |
| print percent complete messages | |
| int | G_percent2 (int n, int d, int s, FILE *out) |
| print percent complete messages | |
| int | G_percent_reset (void) |
| Reset G_percent() to 0%; do not add newline. | |
| int G_percent | ( | int | n, | |
| int | d, | |||
| int | s | |||
| ) |
print percent complete messages
This routine prints a percentage complete message to stderr. The percentage complete is (n/ total)*100, and these are printed only for each incr percentage. This is perhaps best explained by example:
#include <stdio.h> int row; int nrows; nrows = 1352; // 1352 is not a special value - example only fprintf (stderr, ''Percent complete: ''); for (row = 0; row < nrows; row++) G_percent (row, nrows, 10);
| n | ||
| total | ||
| incr |
Definition at line 51 of file percent.c.
References G_percent2().
| int G_percent2 | ( | int | n, | |
| int | d, | |||
| int | s, | |||
| FILE * | out | |||
| ) |
print percent complete messages
This routine prints a percentage complete message to stderr. The percentage complete is (n/ total)*100, and these are printed only for each incr percentage. This is perhaps best explained by example:
#include <stdio.h> int row; int nrows; nrows = 1352; // 1352 is not a special value - example only fprintf (stderr, ''Percent complete: ''); for (row = 0; row < nrows; row++) G_percent (row, nrows, 10);
| n | ||
| total | ||
| incr | ||
| out | print here |
Definition at line 84 of file percent.c.
References G_info_format(), and NULL.
Referenced by G_percent().
| int G_percent_reset | ( | void | ) |
1.5.1