Commit Graph

1270 Commits

Author SHA1 Message Date
Jakob Kramer
331b2729d5 sort manpage: fix key definition 2015-02-01 17:49:02 +00:00
sin
2f6ffc9ec9 No need to specify "rb" and "wb" in fopen, use "r" and "w" 2015-02-01 15:55:30 +00:00
Hiltjo Posthuma
66e1bbccf3 Makefile: stricter regex replace for sbase VERSION 2015-02-01 16:33:46 +01:00
Hiltjo Posthuma
949f930280 split: fixes
- -b argument required, don't allow -b <= 0.
- -l argument required, don't allow -l <= 0.
- usage() and argument parsing: sort flags.
- don't write 0 size file, get rid of goto reproducable with:
  printf 'a' | split -b 1.
- close FILE *in if != stdin.
- mark split as finished in README.
- codestyle fixes.
2015-02-01 16:30:12 +01:00
sin
5552db75ba Don't call var "read" 2015-02-01 10:22:11 +00:00
FRIGN
22f40b5a03 Add explicit boundary to loop in readrune()
You never know what could happen. Better have a "blind" read than
a segmentation fault.
2015-02-01 04:20:02 +01:00
FRIGN
986a9de51a Add even stricter UTF-8-support to wc(1)
using readrune() and iswspace().
musl for instance doesn't differentiate between iswspace() and
isspace(), but when it does, the code will be ready.
It goes without saying that GNU coreutils don't use iswspace()[0].

[0]: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f=src/wc.c
2015-02-01 04:06:06 +01:00
FRIGN
696bb992c3 Return number of bytes read even on a partial read
and set the rune to Runeerror for later checking (if desired).
2015-02-01 03:54:56 +01:00
FRIGN
f2e6af7350 Return number of bytes read in readrune()
Could be useful in some cases...
2015-02-01 03:43:54 +01:00
FRIGN
8ab096d2a4 Finish up wc(1)
Use size_t for all counts, fix the manpage and refactor the code.
Here's yet another place where GNU coreutils fail:

sbase:
$ echo "GNU/Turd sucks" | wc -cm
    15

coreutils:
$ echo "GNU/Turd sucks" | wc -cm
     15      15

Take a bloody guess which behaviour is correct[0].

[0]: http://pubs.opengroup.org/onlinepubs/009604499/utilities/wc.html
2015-02-01 03:01:11 +01:00
sin
d75cc2e556 POSIX doesn't specify yes(1) so mark it as such in README 2015-02-01 01:27:44 +00:00
sin
9b37332e1e yes: Minor style fix 2015-02-01 01:27:05 +00:00
FRIGN
0b5ab80b05 Fix potential modulo 0 2015-02-01 02:23:35 +01:00
FRIGN
f40608ef09 Finish up yes(1) by adding multiple string support 2015-02-01 02:13:47 +01:00
FRIGN
27b770c02c Adjust some limits to more flexibility for strtonum 2015-02-01 01:24:03 +01:00
FRIGN
5a20d0e9d7 Finish up cols(1) 2015-02-01 00:55:22 +01:00
FRIGN
7cdb24d085 Finish up setsid(1) 2015-02-01 00:47:32 +01:00
FRIGN
7faf732d0b Edit readlink.1 and document missing flags 2015-02-01 00:43:43 +01:00
FRIGN
a645f52843 Finish up printenv(1) 2015-02-01 00:23:38 +01:00
FRIGN
cd37dc4553 Fix grammar in mktemp(1) 2015-02-01 00:15:19 +01:00
FRIGN
93a0e759c9 Finish up mktemp(1) 2015-02-01 00:14:19 +01:00
FRIGN
01195fa7e5 Finish up hostname(1) 2015-02-01 00:03:03 +01:00
FRIGN
bcf264f9cd Finish up chroot(1) and md5sum(1) 2015-01-31 23:54:51 +01:00
Jakob Kramer
4769b47dd7 Use size_t for number of lines in linebuf
.nlines and .capacity are used as array indices and
should therefore be of type size_t.
2015-01-31 22:49:43 +00:00
sin
0934e7f6ed Add .Os sbase and sed replace to .Os sbase $(VERSION) in make install 2015-01-31 19:37:03 +00:00
Jakob Kramer
572ad27110 sort: support sorting decimal numbers correctly
sorry not to have used strtold from the beginning
2015-01-31 19:19:55 +00:00
Hiltjo Posthuma
0e01a2db9b ln: usage, just use %s 2015-01-31 15:23:59 +01:00
Hiltjo Posthuma
6579919fec grep: getline returns signed (ssize_t) 2015-01-31 15:19:42 +01:00
Hiltjo Posthuma
f769c2402f fix mandoc warnings
- sort references in SEE ALSO section to section number, name.
- cols.1: proper order of sections.
- wrap lines to max 79 column length.
2015-01-31 14:43:27 +01:00
Hiltjo Posthuma
4a920a5960 remove sbase-VERSION from man page, fix sponge.1 date 2015-01-31 14:20:02 +01:00
Hiltjo Posthuma
3253f2eec3 split.1: convert to mandoc
... and fix usage line, when -l or -b is specified the argument is required,
not optional.
2015-01-31 14:07:13 +01:00
Hiltjo Posthuma
67e374bcba tar.1: convert to mandoc
- simplify usage line.
- add new flags (-m, -j and -z).
- fix typos.
2015-01-31 14:05:23 +01:00
Hiltjo Posthuma
6c2f9615ac uuencode.1, uudecode.1: convert to mandoc 2015-01-31 00:25:28 +01:00
Hiltjo Posthuma
89881a4e4c unexpand.1: convert to mandoc 2015-01-31 00:20:29 +01:00
Hiltjo Posthuma
658b5989d3 sponge.1: convert to mandoc 2015-01-31 00:16:25 +01:00
Hiltjo Posthuma
4e7cbbee28 sort.1: convert to mandoc 2015-01-30 23:49:13 +01:00
Hiltjo Posthuma
f2eb5d3b2d readlink.1: convert to mandoc 2015-01-30 23:34:36 +01:00
Hiltjo Posthuma
08904c0308 mktemp.1: convert to mandoc 2015-01-30 23:29:09 +01:00
Hiltjo Posthuma
0ac41ca998 printenv.1: convert to mandoc 2015-01-30 23:25:12 +01:00
Hiltjo Posthuma
073a5726c7 setsid.1: convert to mandoc 2015-01-30 23:10:09 +01:00
Hiltjo Posthuma
1e4fd252be *sum.1: convert to mandoc
... and fix order of sections, add OPTIONS section with a list describing the
flags.
2015-01-30 23:08:25 +01:00
Hiltjo Posthuma
a576a74635 test.1: convert to mandoc and some fixes
- sort flags.
- fix 2 typos.
2015-01-30 22:52:01 +01:00
Hiltjo Posthuma
b3c5b206e7 seq.1: convert to mandoc 2015-01-30 22:39:41 +01:00
Hiltjo Posthuma
1c93b03a85 hostname.1: convert to mandoc 2015-01-30 22:15:57 +01:00
Hiltjo Posthuma
1466021305 du.1: convert to mandoc 2015-01-30 22:13:37 +01:00
Hiltjo Posthuma
987152a7d7 cp.1: convert to mandoc, add mv(1) to SEE ALSO 2015-01-30 22:07:17 +01:00
Hiltjo Posthuma
481ed596ff sync.1: convert to mandoc 2015-01-30 21:56:25 +01:00
Hiltjo Posthuma
9d12daf179 mandoc: convert uname.1, uniq.1 and xargs.1 2015-01-30 21:51:23 +01:00
Hiltjo Posthuma
a7e0f6b4f1 tail.1: fix list 2015-01-30 21:49:32 +01:00
Hiltjo Posthuma
57a19e3b86 add some mandoc pages and fix some warnings
- add .Os, it is mandatory.
- don't redeclare .Nm when it's not needed.
- fix some warnings (checked with mandoc -Tlint).
- remove some leftover old stuff.
2015-01-30 21:21:50 +01:00