#include "config.h"
#include "headers.h"
#include "types.h"
#include "error.h"
#include "io.h"
#include "display.h"
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 | readline_infofile (void) |
int | is_delimiter_infofile (void) |
int | init_infofile (void) |
int | shutdown_infofile (void) |
void | displayAnsiNormal (void) |
void | displayClearScreen (void) |
int | displayInfo (void) |
int | displayNextInfo (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 | 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 |
Definition at line 302 of file display.c.
Referenced by calculateTimeDisplay().
#define sec_per_minute 60 |
Definition at line 303 of file display.c.
Referenced by calculateTimeDisplay().
int calculateCountDisplay | ( | uint64 * | total_count, | |
char ** | total_count_units, | |||
float * | short_count, | |||
char ** | short_count_units | |||
) |
Definition at line 305 of file display.c.
References _display::display_count_bits, io, _display::k, and _io::total_write.
Referenced by displayEnd(), and displayPrint().
int calculatePercentComplete | ( | void | ) |
Definition at line 456 of file display.c.
References 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 380 of file display.c.
References _display::display_throughput_bits, _display::elapsed_time, io, _display::k, and _io::total_write.
Referenced by displayEnd(), and displayPrint().
Definition at line 443 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 467 of file display.c.
References _display::display_ansi.
Referenced by displayPrint(), and displayTwiddle().
void displayAnsiNormal | ( | void | ) |
Definition at line 204 of file display.c.
References _display::display_ansi.
Referenced by displayInfo(), and displayPrint().
int displayBegin | ( | void | ) |
Definition at line 279 of file display.c.
References _display::current_time, displayGetSize(), displayInfo(), displaySetSigWinch(), _display::info_file, init_infofile(), print_error(), print_esup(), and _display::start_time.
Referenced by main().
void displayClearScreen | ( | void | ) |
Definition at line 211 of file display.c.
References _display::display_ansi, and _display::screen_height.
Referenced by displayInfo().
int displayEnd | ( | void | ) |
Definition at line 822 of file display.c.
References calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), calculateTimeDisplay(), _display::current_time, _display::display_summary, displayPrint(), _display::elapsed_time, io, _display::percent_complete, _display::start_time, _display::total_display_percent, and _io::total_size_known.
Referenced by main().
static void displayGetSize | ( | void | ) | [static] |
Definition at line 22 of file display.c.
References _display::manual_height, _display::manual_width, _display::screen_height, _display::screen_height_minus_one, _display::screen_width, and _display::screen_width_minus_one.
Referenced by displayBegin(), and sig_winch().
int displayInfo | ( | void | ) |
Definition at line 243 of file display.c.
References displayAnsiNormal(), displayClearScreen(), _display::info_fin, _display::info_line, is_delimiter_infofile(), readline_infofile(), and _display::screen_height.
Referenced by displayBegin(), and displayNextInfo().
int displayInit | ( | void | ) |
Definition at line 61 of file display.c.
References _display::bar_bg_color, _display::bar_close_brace, _display::bar_complete, _display::bar_fg_bold, _display::bar_fg_color, _display::bar_incomplete, _display::bar_open_brace, _display::barbrace_bg_color, _display::barbrace_fg_bold, _display::barbrace_fg_color, _display::current_time, _display::datacount_bg_color, _display::datacount_fg_bold, _display::datacount_fg_color, DEFAULT_DISPLAY_TWIDDLE, DEFAULT_SH_MINUS_ONE, 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_numeric, _display::display_percent, _display::display_summary, _display::display_throughput, _display::display_throughput_bits, _display::display_time, _display::display_title, _display::display_twiddle, _display::display_wait, _display::elapsed_time, _display::info_file, _display::info_fin, _display::info_line, _display::info_num, _display::info_percent_count, _display::info_percent_threshold, _display::k, _display::manual_height, _display::manual_width, _display::overtime_flag, _display::percent_bg_color, _display::percent_complete, _display::percent_fg_bold, _display::percent_fg_color, _display::screen_height, _display::screen_height_minus_one, _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 displayNextInfo | ( | void | ) |
Definition at line 265 of file display.c.
References _display::display_numeric, displayInfo(), _display::info_fin, _display::info_percent_count, _display::info_percent_threshold, and _display::percent_complete.
Referenced by displayPrint().
int displayPrint | ( | void | ) |
Definition at line 504 of file display.c.
References _display::bar_bg_color, _display::bar_close_brace, _display::bar_complete, _display::bar_fg_bold, _display::bar_fg_color, _display::bar_incomplete, _display::bar_open_brace, _display::barbrace_bg_color, _display::barbrace_fg_bold, _display::barbrace_fg_color, calculateCountDisplay(), calculatePercentComplete(), calculateThroughputDisplay(), calculateTimeDisplay(), _display::current_time, _display::datacount_bg_color, _display::datacount_fg_bold, _display::datacount_fg_color, _display::display_bar, _display::display_datacount, _display::display_elapsed_only, _display::display_numeric, _display::display_percent, _display::display_throughput, _display::display_time, _display::display_title, _display::display_twiddle, _display::display_wait, displayAnsi(), displayAnsiNormal(), displayNextInfo(), _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().
int displaySetSigWinch | ( | void | ) |
Definition at line 50 of file display.c.
References sig_winch().
Referenced by displayBegin(), and sig_winch().
void displayTwiddle | ( | void | ) |
Definition at line 482 of file display.c.
References displayAnsi(), io, _io::total_write, _display::twiddle, _display::twiddle_bg_color, _display::twiddle_fg_bold, and _display::twiddle_fg_color.
Referenced by displayUpdate().
int displayUpdate | ( | void | ) |
Definition at line 814 of file display.c.
References _display::current_time, _display::display_interval, _display::display_twiddle, displayPrint(), and displayTwiddle().
Referenced by main().
int init_infofile | ( | void | ) |
Definition at line 164 of file display.c.
References _display::info_file, _display::info_fin, _display::info_num, _display::info_percent_count, _display::info_percent_threshold, is_delimiter_infofile(), print_error(), and readline_infofile().
Referenced by displayBegin().
int is_delimiter_infofile | ( | void | ) |
Definition at line 155 of file display.c.
References _display::info_line.
Referenced by displayInfo(), and init_infofile().
int readline_infofile | ( | void | ) |
Definition at line 142 of file display.c.
References _display::info_fin, and _display::info_line.
Referenced by displayInfo(), and init_infofile().
int shutdown_infofile | ( | void | ) |
Definition at line 198 of file display.c.
References _display::info_fin.
static void sig_winch | ( | int | signo | ) | [static] |
Definition at line 44 of file display.c.
References displayGetSize(), and displaySetSigWinch().
Referenced by displaySetSigWinch().
Definition at line 19 of file display.c.
Referenced by help(), parse_ansi_commandline(), parse_ansi_rc(), parse_bar_bg_color_commandline(), parse_bar_bg_color_rc(), parse_bar_closebrace_char_commandline(), parse_bar_closebrace_char_rc(), parse_bar_commandline(), parse_bar_complete_char_commandline(), parse_bar_complete_char_rc(), parse_bar_fg_bold_commandline(), parse_bar_fg_bold_rc(), parse_bar_fg_color_commandline(), parse_bar_fg_color_rc(), parse_bar_incomplete_char_commandline(), parse_bar_incomplete_char_rc(), parse_bar_openbrace_char_commandline(), parse_bar_openbrace_char_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_numeric_commandline(), parse_display_numeric_rc(), parse_display_title_commandline(), parse_display_title_rc(), parse_display_wait_commandline(), parse_display_wait_rc(), parse_elapsed_only_commandline(), parse_elapsed_only_rc(), parse_height_minus_one_commandline(), parse_height_minus_one_rc(), parse_height_value(), parse_infofile_commandline(), parse_infofile_rc(), parse_interval_value(), parse_kilo_value(), 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_minus_one_commandline(), parse_width_minus_one_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().