Commit Graph

13 Commits

Author SHA1 Message Date
Craig Small
c84675241d For free -b make the variable a long long
Bug-Debian: http://bugs.debian.org/654368

On systems with very large amonut of RAM when they use the -b or --bytes
option on free you get overflow and free shows a negative amount of
memory, which is obviously wrong.
2012-01-05 09:46:39 +11:00
Craig Small
5219a9c453 Check for 0 repeat count and tests in free
free checks for -c 0 now too.
testsuite has new checks for the checks.
2012-01-04 10:07:31 +11:00
Craig Small
223c95c95d free -c option uses strutils
The handling of the -c (count) option in free uses the standard string
handling and error utils.  The program also checks for negative counts
and errors on these.
2012-01-04 09:53:51 +11:00
Craig Small
fb11e1fe0a Changed the err and warns to macros
err and warn are BSD format but they are not recommended by library
developers.  However their consiseness is useful!

The solution is to use some macros that create xerr etc which then
just map to the error() function.  The next problem is error() uses
program_invocation_name so we set this to program_invovation_short_name

This is a global set but seems to be the convention (or at least errors
are on the short name only) used everywhere else.
2012-01-03 18:48:43 +11:00
Sami Kerola
c3405fab1a translations: group usage texts
Reference: http://www.freelists.org/post/procps/backporting,5
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-01-02 16:29:03 +11:00
Sami Kerola
0022b6ec5d nls: improve translations and provide translator help comments
Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:54 +01:00
Jim Warner
7b9b0c8d18 free: added remaining missing nls support 2011-12-20 17:30:51 +01:00
Sami Kerola
10db451038 free: add gettext support
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
e1bfc779f4 free: do not mix declarations and code [smatch scan]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
71d10d3a49 name change: procps -> procps-ng
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-04 20:50:12 +02:00
Sami Kerola
d13fbc34a7 free: great modernization
Support long options, use program_invocation_short_name, print
version up on request, new giga & tera byte sizes switches, exit
when numeric arguments has garbage... and for rest see the diff.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-04-28 10:10:02 +02:00
albert
4ab5a6c8c3 merge with procps2 free 2004-01-30 04:47:14 +00:00
csmall
03a9b5a30f procps 010114 2002-02-01 22:47:29 +00:00