Make pv_error() and pv_perror() available outside of src/pv/, and use them throughout the program.

This commit is contained in:
Andrew Wood
2026-04-18 22:23:28 +01:00
parent 25f43e129f
commit 7dc02a475e
4 changed files with 101 additions and 116 deletions
-3
View File
@@ -554,9 +554,6 @@ struct pvdisplay_component_s {
bool dynamic; /* whether it can scale with screen size */
};
void pv_error(char *, ...);
void pv_perror(char *, ...);
int pv_main_loop(pvstate_t);
void pv_calculate_transfer_rate(pvtransfercalc_t, readonly_pvtransferstate_t, readonly_pvcontrol_t, readonly_pvdisplay_t, bool);
+11
View File
@@ -182,6 +182,17 @@ void pv_nanosleep(long long);
*/
extern void pv_set_error_prefix(/*@null@ */ const char *);
/*
* Report an error.
*/
extern void pv_error(char *, ...);
/*
* Report an error, suffixed with the system error message for errno.
*/
extern void pv_perror(char *, ...);
/*
* Create a new state structure, and return it, or 0 (NULL) on error.
*/