Re: [Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes



#268: [PATCH] Allow using SI-based size prefixes
--------------------------+-------------------------------------------------
  Reporter:  bilbo        |       Owner:  bilbo   
      Type:  enhancement  |      Status:  accepted
  Priority:  major        |   Milestone:  4.7     
 Component:  mc-core      |     Version:  4.6.2   
Resolution:               |    Keywords:  rework  
  Blocking:               |   Blockedby:          
--------------------------+-------------------------------------------------
Changes (by slyfox):

  * keywords:  review => rework


Comment:

 Look here:

 >       279     /*
 >       280      * If true, SI units (1000 based) will be used for
 >       281      * larger units (kilobyte, megabyte, ...).
 >       282      * If false binary units (1024 based) will be used.
 >       283      */
 >       284     bool kilobyte_si = 0;

 and here:

 >       393             if (kilobyte_si) {
 >       394                 size = (size + 512) >> 10;
 >       395             } else {
 >       396                 size = (size + 500) / 1000;
 >       397             }

 Looks like condition shoud be inverted.

 The rest looks fine
 (except, maybe, already been there nongettextized "M" and "K"
 duplication).

-- 
Ticket URL: <www.midnight-commander.org/ticket/268#comment:3>
Midnight Commander <www.midnight-commander.org>
Midnight Development Center


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]