Make pv__calc_percentage() into pv_percentage() in number.c instead of a static function in display.c, so it can be used in multiple places in future.

This commit is contained in:
Andrew Wood
2024-10-04 17:15:18 +01:00
parent 9bd5a518ea
commit cd696e60ab
3 changed files with 25 additions and 17 deletions
+7
View File
@@ -78,6 +78,13 @@ extern unsigned int pv_getnum_count(const char *, bool);
*/
extern bool pv_getnum_check(const char *, pv_numtype);
/*
* Return an integer representing the first amount as a percentage of the
* second total, i.e. 100*amount/total. If the second value, the total, is
* zero or less, return 0.
*/
extern int pv_percentage(off_t, const off_t);
/*
* String handling wrappers.
*/