top: when did scale_mem parm lose 'unsigned' qualifier

Well, for some strange unknown reason it happened in a
commit referenced below. But this patch reverts it and
puts this newlib scale_mem on par with the master guy.

[ a little more research reveals that it should have ]
[ been reverted in the 2nd commit shown. that's when ]
[ types were fixed after XTRA_PROCPS_DEBUG was used. ]

Reference(s):
. when 'unsigned' qualifier lost
commit 911083bf76
. when 'unsigned' qualifier not restored
commit 105058ae2d
. when XTRA_PROCPS_DEBUG validation introduced
commit e3270d463d

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2017-10-03 00:00:00 -05:00 committed by Craig Small
parent 335c070c8d
commit e55016def5
2 changed files with 2 additions and 2 deletions

View File

@ -1465,7 +1465,7 @@ static inline const char *make_str_utf8 (const char *str, int width, int justr,
* Do some scaling then justify stuff. * Do some scaling then justify stuff.
* We'll interpret 'num' as a kibibytes quantity and try to * We'll interpret 'num' as a kibibytes quantity and try to
* format it to reach 'target' while also fitting 'width'. */ * format it to reach 'target' while also fitting 'width'. */
static const char *scale_mem (int target, long num, int width, int justr) { static const char *scale_mem (int target, unsigned long num, int width, int justr) {
// SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb // SK_Kb SK_Mb SK_Gb SK_Tb SK_Pb SK_Eb
#ifdef BOOST_MEMORY #ifdef BOOST_MEMORY
static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL }; static const char *fmttab[] = { "%.0f", "%#.1f%c", "%#.3f%c", "%#.3f%c", "%#.3f%c", NULL };

View File

@ -585,7 +585,7 @@ typedef struct WIN_t {
//atic inline const char *make_num (long num, int width, int justr, int col, int noz); //atic inline const char *make_num (long num, int width, int justr, int col, int noz);
//atic inline const char *make_str (const char *str, int width, int justr, int col); //atic inline const char *make_str (const char *str, int width, int justr, int col);
//atic inline const char *make_str_utf8 (const char *str, int width, int justr, int col); //atic inline const char *make_str_utf8 (const char *str, int width, int justr, int col);
//atic const char *scale_mem (int target, long num, int width, int justr); //atic const char *scale_mem (int target, unsigned long num, int width, int justr);
//atic const char *scale_num (unsigned long num, int width, int justr); //atic const char *scale_num (unsigned long num, int width, int justr);
//atic const char *scale_pcnt (float num, int width, int justr); //atic const char *scale_pcnt (float num, int width, int justr);
//atic const char *scale_tics (TIC_t tics, int width, int justr); //atic const char *scale_tics (TIC_t tics, int width, int justr);