[BACK]Return to utils.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Diff for /src/usr.bin/top/utils.c between version 1.11 and 1.12

version 1.11, 2003/06/19 22:40:45 version 1.12, 2003/06/20 16:53:15
Line 43 
Line 43 
 int  int
 atoiwi(char *str)  atoiwi(char *str)
 {  {
         int len;          size_t len;
   
         len = strlen(str);          len = strlen(str);
         if (len != 0) {          if (len != 0) {
Line 310 
Line 310 
 format_k(int amt)  format_k(int amt)
 {  {
         static char retarray[NUM_STRINGS][16];          static char retarray[NUM_STRINGS][16];
         static int  index = 0;          static int  idx = 0;
         char *ret, tag = 'K';          char *ret, tag = 'K';
   
         ret = retarray[index];          ret = retarray[idx];
         index = (index + 1) % NUM_STRINGS;          idx = (idx + 1) % NUM_STRINGS;
   
         if (amt >= 10000) {          if (amt >= 10000) {
                 amt = (amt + 512) / 1024;                  amt = (amt + 512) / 1024;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12