libite 2.6.1
|
Go to the source code of this file.
Macros | |
#define | SPINNER_THROB ".oOo" |
#define | SPINNER_PULSAR ".oO°Oo." |
#define | SPINNER_ARROW "v<^>" |
#define | SPINNER_STAR ".oO@*" |
#define | SPINNER_DEFAULT "|/-\\" |
Functions | |
void | progress (int percent, int max_width) |
void | progress_simple (int percent) |
#define SPINNER_ARROW "v<^>" |
Definition at line 33 of file progress.c.
#define SPINNER_DEFAULT "|/-\\" |
Definition at line 35 of file progress.c.
#define SPINNER_PULSAR ".oO°Oo." |
Definition at line 32 of file progress.c.
#define SPINNER_STAR ".oO@*" |
Definition at line 34 of file progress.c.
#define SPINNER_THROB ".oOo" |
Definition at line 31 of file progress.c.
void progress | ( | int | percent, |
int | max_width ) |
Advanced ASCII progress bar with spinner
percent | Start first call with this set to 0, end with 100 |
max_width | Max width of progress bar, in total characters. |
This function draws an advanced ASCII progressbar at the current line. It always start from the first column.
The progress bar will hide the cursor if started with percent
0 and show it again at the end, when called with percent
100.
While being called with the same percentage the spinner will spin, to show the user the process hasn't frozen.
If the output TTY cannot interpret control characters, like \r
, it is advised to instead used the progress_simple() function.
Definition at line 66 of file progress.c.
void progress_simple | ( | int | percent | ) |
Alternative progress bar on systems where progress() doesn't work
percent | Start first call with this set to 0, end with 100 |
Definition at line 99 of file progress.c.