projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
294ea6f
)
(main): Allow use of 0 (zero) as the margin offset
author
Jim Meyering
<jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000
(
04:06
+0000)
committer
Jim Meyering
<jim@meyering.net>
Fri, 14 Mar 1997 04:06:12 +0000
(
04:06
+0000)
argument to the -o option. Patch from Gary Anderson.
src/pr.c
patch
|
blob
|
history
diff --git
a/src/pr.c
b/src/pr.c
index
b4ddf69
..
68c12a6
100644
(file)
--- a/
src/pr.c
+++ b/
src/pr.c
@@
-816,7
+816,7
@@
main (int argc, char **argv)
{
long int tmp_long;
if (xstrtol (optarg, NULL, 10, &tmp_long, "") != LONGINT_OK
- || tmp_long <
=
0 || tmp_long > INT_MAX)
+ || tmp_long < 0 || tmp_long > INT_MAX)
error (EXIT_FAILURE, 0,
_("`-o MARGIN' invalid line offset: `%s'"), optarg);
chars_per_margin = (int) tmp_long;