changeset 1134:ff22f24c9661 draft

Fix cut. Some commands went in before "pending", and thus need cleanup but are enabled in defconfig. The fact cut used a function out of lib/pending.c is a hint it might be in this category...
author Rob Landley <rob@landley.net>
date Sat, 30 Nov 2013 00:57:26 -0600
parents f8c926309a21
children 581c35250cff
files toys/posix/cut.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/toys/posix/cut.c	Sat Nov 30 00:16:28 2013 -0600
+++ b/toys/posix/cut.c	Sat Nov 30 00:57:26 2013 -0600
@@ -82,14 +82,14 @@
 
     //Get start position.
     if (*(dtoken = strsep(&ctoken, "-"))) {
-      start = get_int_value(dtoken, 0, INT_MAX);
+      start = atolx_range(dtoken, 0, INT_MAX);
       start = (start?(start-1):start);
     }
 
     //Get end position.
     if (!ctoken) end = -1; //case e.g. 1,2,3
     else if (*ctoken) {//case e.g. N-M
-      end = get_int_value(ctoken, 0, INT_MAX);
+      end = atolx_range(ctoken, 0, INT_MAX);
       if (!end) end = INT_MAX;
       end--;
       if(end == start) end = -1;