Commit Graph

504 Commits

Author SHA1 Message Date
Jakob Kramer
814b04e710 sort: document -b 2014-05-04 00:16:24 +01:00
Jakob Kramer
a2da9edb99 sort: simplify skip_columns 2014-05-04 00:15:57 +01:00
Jakob Kramer
d965985a52 sort: add -b flag; don't use it as default 2014-05-04 00:15:46 +01:00
Jakob Kramer
a62a2197a8 sort: don't evaluate if clause
this fixes that you could specify a key
definition like "-k 1.2.3", which is incorrect.
2014-05-04 00:15:33 +01:00
Jakob Kramer
e535e8d88a sort: replace loop with MIN() 2014-05-04 00:15:23 +01:00
Jakob Kramer
56e1616486 sort: remove 'rest' variable 2014-05-04 00:15:10 +01:00
Jakob Kramer
56b9a26de9 sort: don't repeat skipping columns logic 2014-05-04 00:14:58 +01:00
Jakob Kramer
c4e5354a32 sort: linebuf is no global 2014-05-04 00:14:19 +01:00
sin
f23409f65a Break long line in mktemp(1) 2014-05-02 21:38:40 +01:00
Jakob Kramer
0bc6b1377b sort: readability; check strndup return value 2014-04-30 15:17:01 +01:00
sin
f8a216a18c Add -D_GNU_SOURCE to config.mk for tcc 2014-04-29 22:31:16 +01:00
Silvan Jegen
60e972c229 Update tr.1 man page
Document the -d option and slightly change the wording of the page.

Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
2014-04-27 11:42:10 +01:00
Hiltjo Posthuma
997f4f006c chown: return EXIT_FAILURE if one file failed.
NOTE: coreutils chown wont process file series further on error, but busybox does. For consistency among the other tools follow busybox behaviour.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-24 11:51:54 +01:00
Hiltjo Posthuma
90861840b7 chmod: process file series behaviour
continue processing files if a chmod on a file in a series failed, but return with an error status code.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-24 11:51:43 +01:00
Hiltjo Posthuma
bd99b92e91 parsemode: rework
- for octal input: reset mode to 0.
- take umask into account.
- make '=rwx' etc work.
- we wont support crazy but valid modes like "a+rw,g=x,o=g"
- uudecode: use parsemode, mask is 0.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-24 11:51:33 +01:00
Hiltjo Posthuma
a1b62b2282 sort: style, explicitly state type
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-23 15:25:21 +01:00
dwts
459161481a use always static for usage and keep usage definition above main 2014-04-22 14:49:23 +01:00
dwts
575b38391c keep usage definition above main 2014-04-22 13:46:33 +01:00
sin
f488547779 Don't bail out if chmod(2) or chown(2) fails
Keep processing all the files specified.
2014-04-22 13:46:28 +01:00
dwts
b700d5a8ed minor style changes 2014-04-22 13:46:19 +01:00
Hiltjo Posthuma
59d0b5cd97 chown: add -R for compatability
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-18 20:31:39 +01:00
Hiltjo Posthuma
cd194d96ad chown: fix out-of-bounds ((null) bad address error)
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-18 20:31:28 +01:00
sin
1d5663672e Minor style changes to sort 2014-04-18 17:24:59 +01:00
Jakob Kramer
98a12cc146 sort: add -k, fix -u
Options  that are  specific to  a  single  key  definition are not
supported (e.g. "sort -k 2,3n -k 4,4").  Should you try to specify
such definitions, sort will  return with EXIT_FAILURE and an error
message.   Instead, all key definitions exclusively use the global
settings.

It always behaves like -b was set.
2014-04-18 13:43:32 +01:00
sin
02d91696b4 Fix char **argv to char *argv[] 2014-04-18 11:54:44 +01:00
Silvan Jegen
4e13ff39c3 Wrap mbtowc to check for errors 2014-04-12 21:29:16 +01:00
sin
bc13aa5960 No need to cast return value of mmap() in tr 2014-04-12 20:33:59 +01:00
Hiltjo Posthuma
9ad06c3aef update TODO file
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-12 20:33:50 +01:00
Hiltjo Posthuma
1599880c93 update some man pages
*sum tools: -c was added
tr: -d flag was added.
xargs: -n flag was added.
cmp: minor typo (change to lowercase).

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-12 20:33:33 +01:00
Hiltjo Posthuma
a8f45b4568 tr: change delete behaviour
when one argument is specified use delete behaviour again

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-12 20:33:10 +01:00
sin
16cf92119f Fix missing '-' in usage 2014-04-09 18:20:50 +01:00
Hiltjo Posthuma
1be58188ad xargs: implement -n
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 17:11:49 +01:00
Hiltjo Posthuma
6dd138613e cmp: suppress file open error with sflag
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:44 +01:00
Hiltjo Posthuma
560340341f make parsemode() generic
use for uudecode and chmod

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:32 +01:00
Hiltjo Posthuma
ff474a8cbc tr: add dflag, error with usage() on invalid flag combination
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:21 +01:00
Hiltjo Posthuma
3e49e946b7 tr: fix escape code handling in set2
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-09 15:40:04 +01:00
sin
e3c62682ff Don't bail out if the username/group name does not exist in ls(1) 2014-04-05 20:23:40 +01:00
sin
81f9cf2a33 Fix style issue in crypt.c 2014-04-04 11:10:18 +01:00
sin
fbf71521f1 Rename variable dif' to diff' in comm(1) 2014-04-04 11:06:30 +01:00
Hiltjo Posthuma
eee182cdd7 cmp: fix missing braces
just a style fix, this doesn't change any behaviour since fp[1] is set to stdin above.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:21:06 +01:00
Hiltjo Posthuma
6b45824463 cmp: fix wrong rebase, missing line, sorry
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:59 +01:00
Hiltjo Posthuma
bd9a81951f split: dont use table lookup for size
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:52 +01:00
Hiltjo Posthuma
f7403ce6c6 style: whitespace fixes
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:43 +01:00
Hiltjo Posthuma
ce28f6ca90 cmp: dont output EOF difference is sflag is set
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:36 +01:00
Hiltjo Posthuma
a7954e8cab cmp: fix line numbers
test case:
	printf 'a\n\na' > t1
	printf 'a\na' > t2
	cmp t1 t2

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:28 +01:00
Hiltjo Posthuma
1059cf5f17 cmp: make EOF check more clear
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-04-01 16:20:21 +01:00
sin
24a5006f57 Prefix error/warning messages with program name if DEBUG is defined 2014-03-28 16:00:01 +00:00
sin
897efd5f13 Remove "WARNING: " prefix from messages 2014-03-23 18:59:14 +00:00
sin
a6ef67cd3d Use strlcpy() 2014-03-23 18:33:45 +00:00
Hiltjo Posthuma
dd7eb63869 crypt: free line and tiny cleanup
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-23 18:02:46 +00:00