On Monday, March 17, 2003, at 10:18 AM, Tom Collins wrote:


On Monday, March 17, 2003, at 05:56 AM, Brian Kolaci wrote:
The abbreviations for Megabytes & Kilobytes "M", "m", "K" and "k"
have all been deprecated in the latest release of vpopmail
and qmailadmin.  You should use all numbers now.  The limits API
doesn't support this (and probably won't due to the database
holding numbers and not strings for these values).

Read the vpopmail README.quotas file and you'll see the string format
for quotas and an explanation.  Its along the lines  ######S,####C
(size & count only, M & K for meg & kilo are gone now).

Just use a number.

What do you guys think of the following:


1) qmailadmin should read and understand the old-style format of xxM (quota = xx*1024*1024) or xxK (quota = xx*1024).

2) qmailadmin should read and understand the new-style format of xxS (and xxS,yyC) (quota = xx) and even the format of plain xx (without the S).

3) qmailadmin should always write a modified quota out as #####S.

4) vmoduser should be updated to convert xxM and xxK formats into straight bytes (or, even better, xxS format).

I'm willing to make these changes and submit a patch, but I want to make sure we all agree that it's the best way to go.

FYI, I need to update my last patch anyway, since I checked my C reference on sprintf formatting strings and learned that %lf is the correct format for a double. It appears that at least under Linux, %lf and %f are treated as a double, but I don't know if other platforms are that way.

Tom,


That sounds exactly like how it should be implemented. All previous functionality is retained while setting a definitive standard on what belongs in that field.

The code should also be commented to clearly reflect that reading those numbers in alternate formats is strictly for backwards compatibility and will route itself to /dev/null at some point in the future.

Matt




Reply via email to