Added --bits option

This commit is contained in:
Andrew Wood
2023-07-16 23:12:12 +01:00
parent fd46c9b1f6
commit 461486ec4f
12 changed files with 70 additions and 15 deletions
+1
View File
@@ -22,6 +22,7 @@ struct opts_s { /* structure describing run-time options */
bool rate; /* rate counter flag */
bool average_rate; /* average rate counter flag */
bool bytes; /* bytes transferred flag */
bool bits; /* report transfer size in bits */
bool bufpercent; /* transfer buffer percentage flag */
unsigned int lastwritten; /* show N bytes last written */
bool force; /* force-if-not-terminal flag */
+1
View File
@@ -70,6 +70,7 @@ struct pvstate_s {
bool numeric; /* numeric output only */
bool wait; /* wait for data before display */
bool linemode; /* count lines instead of bytes */
bool bits; /* report bits instead of bytes */
bool null; /* lines are null-terminated */
bool no_op; /* do nothing other than pipe data */
unsigned int skip_errors; /* skip read errors counter */
+1
View File
@@ -78,6 +78,7 @@ extern void pv_state_numeric_set(pvstate_t, bool);
extern void pv_state_wait_set(pvstate_t, bool);
extern void pv_state_delay_start_set(pvstate_t, double);
extern void pv_state_linemode_set(pvstate_t, bool);
extern void pv_state_bits_set(pvstate_t, bool);
extern void pv_state_null_set(pvstate_t, bool);
extern void pv_state_no_op_set(pvstate_t, bool);
extern void pv_state_skip_errors_set(pvstate_t, unsigned int);