Commit Graph

440 Commits

Author SHA1 Message Date
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
Hiltjo Posthuma
04f32f4d9a checksum tools: implement -c
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-23 18:02:39 +00:00
Hiltjo Posthuma
18b6e40161 crypt: error status code if an error occured in a file series
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-23 12:27:24 +00:00
Hiltjo Posthuma
7727530b53 crypt: dont error out if a file in a series fails
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-23 12:27:17 +00:00
sin
bc0de5e7e5 Rename mc(1) to cols(1)
There is an obvious name collision with the popular file manager
midnight commander.
2014-03-12 14:47:38 +00:00
Hiltjo Posthuma
f34e1ae1d0 kill: argc < 2 should be argc < 1
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-03-07 18:56:32 +00:00
sin
d9a1030d57 We do symbolic options for chmod(1)
Don't bomb out if the argument is not a valid octal number, it
could very well be something like "chmod +x test".
2014-03-04 11:05:01 +00:00
sin
760690c85e Make code a bit more clear 2014-03-04 10:43:51 +00:00
sin
c28e2a39ec We should not require both files to be present for cmp(1)
If the second file is not present, read from standard input.
2014-03-04 10:36:54 +00:00
sin
99300c9514 Update README
sbase compiles on minix3 as well.
2014-02-27 16:56:59 +00:00
sin
17338bfbb8 id(1) is not portable - move it to ubase 2014-02-27 14:30:21 +00:00
sin
795ffe490d Use the more portable NZERO instead of PRIO_*
We assume the valid range is [-NZERO, NZERO-1].
2014-02-27 14:24:21 +00:00
Daniel Bainton
2773bdaac7 add the man entry for ls -F 2014-02-19 12:35:36 +00:00
sin
fe62ed0d48 Preserve permissions when copying files 2014-02-18 16:51:54 +00:00
sin
73066131ab Add Daniel Bainton to LICENSE 2014-02-18 12:54:25 +00:00