Commit Graph

1829 Commits

Author SHA1 Message Date
sin
0d7822f866 Don't free the line buffer for each file
There's no point free-ing memory when the kernel can do it for us.
Just reuse the already allocated memory to hold lines.

Thanks Truls Becken for pointing this out.
2014-12-16 19:49:39 +00:00
sin
a3e4689743 grep: Don't bother free-ing the pattern list 2014-12-16 19:44:16 +00:00
sin
af66a5924e Add minimal cron.1 2014-12-16 11:04:18 +00:00
sin
e296329773 Rename crond to cron 2014-12-16 11:04:07 +00:00
Markus Wichmann
fea48eb229 Fix problem with multi month display spanning a year. 2014-12-16 10:56:13 +00:00
sin
d30ac8d64b Use eprintf() in usage() 2014-12-09 16:32:55 +00:00
sin
669f4b45cd Add crond(1) to README 2014-12-09 16:22:10 +00:00
sin
ab8a11eb93 Cleanup crond(1) a little 2014-12-09 16:19:49 +00:00
sin
8d2c5dd9a3 Import crond from http://git.2f30.org/scron/tree/ 2014-12-09 16:05:38 +00:00
sin
296af80dba Factor out table walk into a separate function 2014-12-09 15:51:21 +00:00
sin
979444a4c9 Forgot .El in cols.1 2014-12-08 15:15:12 +00:00
sin
909ffd5bf7 Update cols manpage 2014-12-08 15:14:08 +00:00
sin
45086e76f9 Remove old comment 2014-12-08 15:01:09 +00:00
sin
c953c022d3 Remove section on minix in README
All tools currently compile except ln(1) which uses the *at()
that do not seem to be implemented.
2014-12-08 14:55:25 +00:00
sin
1059782af8 Fix comparison >= 0 is always true in basename(1) 2014-12-08 12:14:39 +00:00
Michael Forney
e14e0becce cp: Rename -d option to -P
The -d option is a GNU extension and is equivalent to its "-P
--preserve=links" options.

Since we don't implement the --preserve=links functionality anyway (it
means preserve hard links between files), just call it -P, which is
specified by POSIX.

Additionally, there is no need to check for cp_Pflag again before
copying the symlink itself because the only way the mode in the stat
will indicate a symlink is if we used lstat (which we only do if -P is
specified).
2014-12-08 10:02:56 +00:00
Michael Forney
573ef00c91 ls: Always leave room for the NULL byte in the link target
Otherwise, if the length of the link target is the same as BUFSIZ, we
will try to write past the end of buf.
2014-12-08 10:02:28 +00:00
Michael Forney
46ea55a258 ls: Handle symlinks to directories properly
Also, implement the -H and -L options.
2014-12-08 10:02:09 +00:00
Brandon Mulcahy
c4014b730e Use utflen in cols(1) 2014-12-05 21:41:36 +00:00
Brandon Mulcahy
5214191155 Handle non-power-of-two tab sizes in expand(1) 2014-12-04 22:26:08 +00:00
sin
1150a5cbc9 Update nl(1) manpage 2014-12-04 13:50:15 +00:00
sin
88a6d6f97e State the reason for failure in readlink(1) 2014-12-04 12:14:59 +00:00
sin
761599ae61 nl(1) should handle up to 1 file 2014-12-04 12:05:09 +00:00
sin
86c88d8b3a Respect exit status in nl(1) + some stylistic changes 2014-12-04 12:00:47 +00:00
sin
95c9b4b255 Staticise functions in logger(1) 2014-12-04 11:46:11 +00:00
sin
5d1e46fefa Implement POSIX 2008 compliant logger(1) 2014-12-04 11:36:40 +00:00
Brandon Mulcahy
757cf0651a Fix basename suffix treatment
Explicitly use "." instead of the result of basename(3) when argv[0] is
an empty string in order to avoid a segfault.

Skip suffix treatment if the result of basename(3) is "/", per POSIX.

Fix the suffix check, which was previously checking for a match at any
location in the string.
2014-12-04 08:00:03 +00:00
sin
f141da6190 Bring back OpenBSD make compatibility in Makefile
Thanks @quing
2014-12-01 17:37:44 +00:00
Evan Gates
1bd598c9ed sort BIN, that was bugging me 2014-12-01 17:18:56 +00:00
sin
d13e5c2be3 Remove redundant deletions from clean target 2014-11-30 11:57:38 +00:00
Michael Forney
94ef670b27 ln: Add support for target directories
Also, now that we are using {sym,}linkat, implement the trivial -L and
-P options.
2014-11-23 20:58:15 +00:00
Michael Forney
cb427d553a sort: Implement -c and -C flags 2014-11-23 19:42:14 +00:00
sin
e23d20e1d4 Fix .SH to .Sh in kill.1 2014-11-23 13:22:55 +00:00
sin
6aab51a858 Update kill.1 2014-11-23 13:22:09 +00:00
sin
e514886f0d Update pwd.1 2014-11-23 12:56:19 +00:00
sin
5c9dc1b799 Add note about standards for strings.1 2014-11-23 12:46:24 +00:00
sin
aabcb69991 Respect exit status in strings(1) and update manpage 2014-11-23 12:44:38 +00:00
sin
d0604cc474 Don't stop at first failure in mkfifo(1) 2014-11-22 11:18:21 +00:00
sin
bf8e37625a Fix potential exit status wraparound in chgrp(1) 2014-11-22 11:14:56 +00:00
Hiltjo Posthuma
5c821d43ef grep: reset inverse flag if both are set 2014-11-21 23:07:50 +00:00
sin
e6df377504 Respect exit status in expand(1) 2014-11-21 17:53:33 +00:00
sin
cd35347203 Convert unexpand(1) to libutf 2014-11-21 17:52:22 +00:00
sin
18850f5dfa writerune() should operate on a FILE * 2014-11-21 16:34:57 +00:00
sin
5b5bb82ec0 Factor out readrune and writerune 2014-11-21 16:31:16 +00:00
sin
3de6a7510d Convert expand.c to libutf
We should librarify these chunks for now into a readrune
function.
2014-11-21 15:50:08 +00:00
sin
9a967e13f9 Fix grammar in grep.1 2014-11-21 14:22:33 +00:00
sin
9e74df6520 Add -h to grep(1) usage line 2014-11-21 13:15:36 +00:00
sin
78a55f6daf Another update to cmp.1 2014-11-21 13:12:36 +00:00
sin
cf705e6a24 Minor update to cmp(1) manpage 2014-11-21 13:12:16 +00:00
sin
8d26936b83 Update grep(1) manpage and usage line 2014-11-21 13:12:04 +00:00