#include "config.h"
#include "headers.h"
#include "types.h"
#include "error.h"
#include "io.h"
#include "display.h"
Include dependency graph for display.c:
Go to the source code of this file.
Defines | |
#define | CAN_RESIZE |
#define | sec_per_hour 3600 |
#define | sec_per_minute 60 |
Functions | |
static void | displayGetSize (void) |
int | displaySetSigWinch (void) |
static void | sig_winch (int signo) |
int | displayInit (void) |
int | displayBegin (void) |
int | calculateCountDisplay (uint64 *total_count, char **total_count_units, float *short_count, char **short_count_units) |
int | calculateThroughputDisplay (uint64 *total_throughput, char **total_throughput_units, float *short_throughput, char **short_throughput_units) |
int | calculateTimeDisplay (uint64 *sptr, uint64 *mptr, uint64 *hptr) |
int | calculatePercentComplete (void) |
void | displayAnsiNormal (void) |
void | displayAnsi (char *fg, char *bg, int b) |
void | displayTwiddle (void) |
int | displayPrint (void) |
int | displayUpdate (void) |
int | displayEnd (void) |
Variables | |
display | d |
#define sec_per_hour 3600 |
#define sec_per_minute 60 |
int calculateCountDisplay | ( | uint64 * | total_count, | |
char ** | total_count_units, | |||
float * | short_count, | |||
char ** | short_count_units | |||
) |
Definition at line 138 of file display.c.
References d, _display::display_count_bits, io, _display::k, and _io::total_write.
Referenced by displayEnd(), and displayPrint().
int calculatePercentComplete | ( | void | ) |
Definition at line 289 of file display.c.
References d, io, _display::percent_complete, _io::total_size, _io::total_size_known, and _io::total_write.
Referenced by displayEnd(), and displayPrint().
int calculateThroughputDisplay | ( | uint64 * | total_throughput, | |
char ** | total_throughput_units, | |||
float * | short_throughput, | |||
char ** | short_throughput_units | |||
) |
Definition at line 213 of file display.c.
References d, _display::display_throughput_bits, _display::elapsed_time, io, _display::k, and _io::total_write.
Referenced by displayEnd(), and displayPrint().
Definition at line 276 of file display.c.
References sec_per_hour, and sec_per_minute.
Referenced by displayEnd(), and displayPrint().
void displayAnsi | ( | char * | fg, | |
char * | bg, | |||
int | b | |||
) |
Definition at line 307 of file display.c.
References d, and _display::display_ansi.
Referenced by displayPrint(), and displayTwiddle().
void displayAnsiNormal | ( | void | ) |
Definition at line 300 of file display.c.
References d, and _display::display_ansi.
Referenced by displayPrint().
int displayBegin | ( | void | ) |
Definition at line 119 of file display.c.
References _display::current_time, d, displayGetSize(), displaySetSigWinch(), print_error(), print_esup(), and _display::start_time.
Referenced by main().
Here is the call graph for this function:
int displayEnd | ( | void | ) |
Definition at line 651 of file display.c.
References calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), calculateTimeDisplay(), _display::current_time, d, _display::display_summary, displayPrint(), _display::elapsed_time, io, _display::percent_complete, _display::start_time, _display::total_display_percent, _io::total_size_known, and UINT64_CTYPE.
Referenced by main().
Here is the call graph for this function:
static void displayGetSize | ( | void | ) | [static] |
Definition at line 22 of file display.c.
References d, _display::manual_width, _display::screen_width, and _display::screen_width_minus_one.
Referenced by displayBegin(), and sig_winch().
int displayInit | ( | void | ) |
Definition at line 54 of file display.c.
References _display::bar_bg_color, _display::bar_fg_bold, _display::bar_fg_color, _display::barbrace_bg_color, _display::barbrace_fg_bold, _display::barbrace_fg_color, _display::current_time, d, _display::datacount_bg_color, _display::datacount_fg_bold, _display::datacount_fg_color, DEFAULT_DISPLAY_TWIDDLE, DEFAULT_SW_MINUS_ONE, _display::display_ansi, _display::display_bar, _display::display_count_bits, _display::display_datacount, _display::display_elapsed_only, _display::display_interval, _display::display_percent, _display::display_summary, _display::display_throughput, _display::display_throughput_bits, _display::display_time, _display::display_title, _display::display_twiddle, _display::elapsed_time, _display::k, _display::manual_width, _display::overtime_flag, _display::percent_bg_color, _display::percent_complete, _display::percent_fg_bold, _display::percent_fg_color, _display::screen_width, _display::screen_width_minus_one, _display::space_bg_color, _display::start_time, _display::throughput_bg_color, _display::throughput_fg_bold, _display::throughput_fg_color, _display::throughput_label_bg_color, _display::throughput_label_fg_bold, _display::throughput_label_fg_color, _display::time_bg_color, _display::time_fg_bold, _display::time_fg_color, _display::time_label_bg_color, _display::time_label_fg_bold, _display::time_label_fg_color, _display::title, _display::title_bg_color, _display::title_fg_bold, _display::title_fg_color, _display::total_display_percent, _display::total_time, _display::twiddle, _display::twiddle_bg_color, _display::twiddle_fg_bold, and _display::twiddle_fg_color.
Referenced by main(), test1(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test2(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().
int displayPrint | ( | void | ) |
Definition at line 344 of file display.c.
References _display::bar_bg_color, _display::bar_fg_bold, _display::bar_fg_color, _display::barbrace_bg_color, _display::barbrace_fg_bold, _display::barbrace_fg_color, calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), calculateTimeDisplay(), _display::current_time, d, _display::datacount_bg_color, _display::datacount_fg_bold, _display::datacount_fg_color, _display::display_bar, _display::display_datacount, _display::display_elapsed_only, _display::display_percent, _display::display_throughput, _display::display_time, _display::display_title, _display::display_twiddle, displayAnsi(), displayAnsiNormal(), _display::elapsed_time, io, _display::overtime_flag, _display::percent_bg_color, _display::percent_complete, _display::percent_fg_bold, _display::percent_fg_color, _display::screen_width, _display::space_bg_color, _display::start_time, _display::throughput_bg_color, _display::throughput_fg_bold, _display::throughput_fg_color, _display::throughput_label_bg_color, _display::throughput_label_fg_bold, _display::throughput_label_fg_color, _display::time_bg_color, _display::time_fg_bold, _display::time_fg_color, _display::time_label_bg_color, _display::time_label_fg_bold, _display::time_label_fg_color, _display::title, _display::title_bg_color, _display::title_fg_bold, _display::title_fg_color, _io::total_size, _io::total_size_known, _display::total_time, _io::total_write, _display::twiddle, _display::twiddle_bg_color, _display::twiddle_fg_bold, and _display::twiddle_fg_color.
Referenced by displayEnd(), and displayUpdate().
Here is the call graph for this function:
int displaySetSigWinch | ( | void | ) |
Definition at line 43 of file display.c.
References sig_winch().
Referenced by displayBegin(), and sig_winch().
Here is the call graph for this function:
void displayTwiddle | ( | void | ) |
Definition at line 322 of file display.c.
References d, displayAnsi(), io, _io::total_write, _display::twiddle, _display::twiddle_bg_color, _display::twiddle_fg_bold, and _display::twiddle_fg_color.
Referenced by displayUpdate().
Here is the call graph for this function:
int displayUpdate | ( | void | ) |
Definition at line 643 of file display.c.
References _display::current_time, d, _display::display_interval, _display::display_twiddle, displayPrint(), and displayTwiddle().
Referenced by main().
Here is the call graph for this function:
static void sig_winch | ( | int | signo | ) | [static] |
Definition at line 37 of file display.c.
References displayGetSize(), and displaySetSigWinch().
Referenced by displaySetSigWinch().
Here is the call graph for this function:
Definition at line 19 of file display.c.
Referenced by calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), displayAnsi(), displayAnsiNormal(), displayBegin(), displayEnd(), displayGetSize(), displayInit(), displayPrint(), displayTwiddle(), displayUpdate(), help(), parse_ansi_commandline(), parse_ansi_rc(), parse_bar_bg_color_commandline(), parse_bar_bg_color_rc(), parse_bar_commandline(), parse_bar_fg_bold_commandline(), parse_bar_fg_bold_rc(), parse_bar_fg_color_commandline(), parse_bar_fg_color_rc(), parse_bar_rc(), parse_barbrace_bg_color_commandline(), parse_barbrace_bg_color_rc(), parse_barbrace_fg_bold_commandline(), parse_barbrace_fg_bold_rc(), parse_barbrace_fg_color_commandline(), parse_barbrace_fg_color_rc(), parse_count_bg_color_commandline(), parse_count_bg_color_rc(), parse_count_bits_commandline(), parse_count_bits_rc(), parse_count_commandline(), parse_count_fg_bold_commandline(), parse_count_fg_bold_rc(), parse_count_fg_color_commandline(), parse_count_fg_color_rc(), parse_count_rc(), parse_display_title_commandline(), parse_display_title_rc(), parse_elapsed_only_commandline(), parse_elapsed_only_rc(), parse_interval_value(), parse_kilo_value(), parse_minus_one_commandline(), parse_minus_one_rc(), parse_num(), parse_percent_bg_color_commandline(), parse_percent_bg_color_rc(), parse_percent_commandline(), parse_percent_fg_bold_commandline(), parse_percent_fg_bold_rc(), parse_percent_fg_color_commandline(), parse_percent_fg_color_rc(), parse_percent_rc(), parse_space_bg_color_commandline(), parse_space_bg_color_rc(), parse_summary_commandline(), parse_summary_rc(), parse_switch_all_commandline(), parse_throughput_bg_color_commandline(), parse_throughput_bg_color_rc(), parse_throughput_bits_commandline(), parse_throughput_bits_rc(), parse_throughput_commandline(), parse_throughput_fg_bold_commandline(), parse_throughput_fg_bold_rc(), parse_throughput_fg_color_commandline(), parse_throughput_fg_color_rc(), parse_throughput_label_bg_color_commandline(), parse_throughput_label_bg_color_rc(), parse_throughput_label_fg_bold_commandline(), parse_throughput_label_fg_bold_rc(), parse_throughput_label_fg_color_commandline(), parse_throughput_label_fg_color_rc(), parse_throughput_rc(), parse_time_bg_color_commandline(), parse_time_bg_color_rc(), parse_time_commandline(), parse_time_fg_bold_commandline(), parse_time_fg_bold_rc(), parse_time_fg_color_commandline(), parse_time_fg_color_rc(), parse_time_label_bg_color_commandline(), parse_time_label_bg_color_rc(), parse_time_label_fg_bold_commandline(), parse_time_label_fg_bold_rc(), parse_time_label_fg_color_commandline(), parse_time_label_fg_color_rc(), parse_time_rc(), parse_title_bg_color_commandline(), parse_title_bg_color_rc(), parse_title_commandline(), parse_title_fg_bold_commandline(), parse_title_fg_bold_rc(), parse_title_fg_color_commandline(), parse_title_fg_color_rc(), parse_title_rc(), parse_total_percent_commandline(), parse_total_percent_rc(), parse_twiddle_bg_color_commandline(), parse_twiddle_bg_color_rc(), parse_twiddle_commandline(), parse_twiddle_fg_bold_commandline(), parse_twiddle_fg_bold_rc(), parse_twiddle_fg_color_commandline(), parse_twiddle_fg_color_rc(), parse_twiddle_rc(), parse_width_value(), test1(), test10(), test100(), test101(), test102(), test103(), test104(), test105(), test106(), test107(), test108(), test109(), test11(), test110(), test111(), test112(), test113(), test114(), test115(), test116(), test117(), test118(), test119(), test12(), test120(), test121(), test122(), test123(), test124(), test125(), test126(), test127(), test128(), test129(), test13(), test130(), test131(), test132(), test133(), test134(), test135(), test136(), test137(), test138(), test139(), test14(), test140(), test141(), test142(), test15(), test16(), test17(), test18(), test19(), test2(), test20(), test21(), test22(), test23(), test24(), test25(), test26(), test27(), test28(), test29(), test3(), test30(), test31(), test32(), test33(), test34(), test35(), test36(), test37(), test38(), test39(), test4(), test40(), test41(), test42(), test43(), test44(), test45(), test46(), test47(), test48(), test49(), test5(), test50(), test51(), test52(), test53(), test54(), test55(), test56(), test57(), test58(), test59(), test6(), test60(), test61(), test62(), test63(), test64(), test65(), test66(), test67(), test68(), test69(), test7(), test70(), test71(), test72(), test73(), test74(), test75(), test76(), test77(), test78(), test79(), test8(), test80(), test81(), test82(), test83(), test84(), test85(), test86(), test87(), test88(), test89(), test9(), test90(), test91(), test92(), test93(), test94(), test95(), test96(), test97(), test98(), and test99().