Commit Graph

1246 Commits

Author SHA1 Message Date
sin
3f3e15b314 readlink: Use strlcat() instead of strncat() 2015-02-11 11:51:57 +00:00
sin
aed987a9af Update README 2015-02-11 10:57:00 +00:00
sin
b63fe99941 Add Ralph to LICENSE 2015-02-11 10:56:59 +00:00
Tai Chi Minh Ralph Eastwood
bc2310376f uniq: add ascii implementation of -f and -s flags 2015-02-11 10:56:58 +00:00
Tai Chi Minh Ralph Eastwood
28e26bc688 readlink: add -m and -f flags 2015-02-11 10:56:58 +00:00
Jakob Kramer
0fcad66c75 make use of en*alloc functions 2015-02-11 01:17:21 +00:00
Jakob Kramer
c0a3c66a84 add estrndup 2015-02-11 01:17:21 +00:00
Jakob Kramer
08e93dd4f5 add en*alloc functions 2015-02-11 01:17:21 +00:00
sin
51680535ce getlines: Style fix 2015-02-11 00:27:30 +00:00
Jakob Kramer
66a5ea722d getlines: last line of file should always have a newline
This is a useful behavior if you want to reorder the lines,
because otherwise you might end up with originally two lines
on one, e.g.

	$ echo -ne "foo\nbar" | sort
	barfoo
2015-02-11 00:25:48 +00:00
Hiltjo Posthuma
c1e6ecb41b fix some mandoc warnings 2015-02-10 17:37:57 +01:00
sin
0779d69df7 paste: No need to make an exception for stdin, just close it at the end 2015-02-10 12:08:06 +00:00
FRIGN
1c6298103e Fix alphabetical order in README 2015-02-10 12:11:21 +01:00
Evan Gates
bc07f1b9b5 Add initial implementation of sed(1)
No manpage yet.
2015-02-10 10:35:22 +00:00
FRIGN
7143737b50 Update README reflecting recent changes to the codebase 2015-02-10 00:53:48 +01:00
FRIGN
237e8cdfa7 Add periods in expr.1 2015-02-10 00:34:47 +01:00
FRIGN
4d32205c2d Rework test.1
The previous version was not well-searchable and a bit too harsh
on emphasized text segments.
This version should improve that.
2015-02-10 00:34:47 +01:00
Tai Chi Minh Ralph Eastwood
22f868cf0b du.1: add symlink dereferencing flags to manpage 2015-02-09 22:54:53 +00:00
Tai Chi Minh Ralph Eastwood
1d2d28a8e4 du.c: add symlink dereferencing flags -H and -L 2015-02-09 22:54:53 +00:00
Tai Chi Minh Ralph Eastwood
bd89474b8a tar.1: add symbolic link dereferencing to manpage 2015-02-09 22:54:53 +00:00
Tai Chi Minh Ralph Eastwood
6e99f9e1c7 chgrp.1: note exception of -h flag unsupported 2015-02-09 22:54:53 +00:00
Tai Chi Minh Ralph Eastwood
c05bbe2eee chgrp.1: add symlink derefencing flags to manpage 2015-02-09 22:54:53 +00:00
Tai Chi Minh Ralph Eastwood
f581761c53 chown.1: add symlink dereferencing flags to manpage 2015-02-09 22:54:52 +00:00
Tai Chi Minh Ralph Eastwood
c21a664f7c cp.1: symlink dereferencing flags 2015-02-09 22:54:52 +00:00
Tai Chi Minh Ralph Eastwood
af8be7f92c cp: add symlink deref flags -H and -L for cp and mv 2015-02-09 22:54:52 +00:00
FRIGN
360a63769c Use strtonum and libutf in test(1), refactor code and manpage
and mark it as finished in README.
2015-02-09 22:21:23 +01:00
FRIGN
856c79e242 Make wording more consistent in head.1 and tail.1 2015-02-09 20:04:54 +01:00
FRIGN
e31980915b Remove trailing newline 2015-02-09 19:03:25 +01:00
FRIGN
77fe242ded Amend STANDARDS section in tail.1 2015-02-09 19:02:39 +01:00
FRIGN
77d8a04dee Small tail(1) manpage fix 2015-02-09 19:01:35 +01:00
FRIGN
9292ae2e16 Small code cleanup in tail(1) 2015-02-09 18:46:47 +01:00
FRIGN
006c9739b3 Add c-flag to tail(1) and refactor manpage
and mark it as finished in README.
2015-02-09 18:38:41 +01:00
sin
989127e525 tail: Skip leading spaces in tail -n " +20" 2015-02-09 16:10:00 +00:00
sin
fe3fc41838 tail: Fix tail -n -val to handle leading spaces
Previously 'tail -n "    -20" foo' was broken, now it works.
2015-02-09 16:05:55 +00:00
sin
f802a544e7 tail: Handle tail -n -val properly 2015-02-09 15:52:31 +00:00
FRIGN
a5cc60f2e0 Refactor tail(1) manpage and update README
It's not finished yet. We still need the c-flag.
2015-02-09 16:26:17 +01:00
sin
c0d36e0064 Switch concat() to use fread() and fwrite()
We should never mix FILE I/O with raw I/O.  Going from raw I/O
to FILE I/O is fine but doing the opposite is extremely tricky and
only works under certain conditions (unbuffered stream + no call
to ungetc()).
2015-02-09 15:24:03 +00:00
sin
124cb7415a tail: Ignore anything other than FIFOs and regular files for -f 2015-02-09 15:03:35 +00:00
sin
a25a57f6ac tail: Add rudimentary support to detect file truncation
We cannot in general detect that truncation happened.  At the moment
we use a heuristic to compare the file size before and after a write
happened.  If the new file size is smaller than the old, we correctly
handle truncation and dump the entire file to stdout.

If it so happened that the new size is larger or equal to the old size
after the file had been truncated without any reads in between, we will
assume the data was appended to the file.

There is no known way around this other than using inotify or kevent
which is outside the scope of sbase.
2015-02-09 14:47:35 +00:00
FRIGN
ff7093f7b3 An additional size_t-fix in tail(1) 2015-02-09 15:47:08 +01:00
FRIGN
78f33ff069 Convert tail(1) to use size_t 2015-02-09 15:30:23 +01:00
sin
080a1ee833 No need to free the buffer for every call to getline()
It will realloc as necessary if the new line size exceeds the
capacity of the allocated buffer.
2015-02-09 14:11:06 +00:00
FRIGN
2a83c2c8be Add f-flag to tail(1) and refactor code 2015-02-09 15:06:17 +01:00
FRIGN
6b63fc2f2b 2014 -> 2015 in touch.1 2015-02-09 12:38:31 +01:00
sin
8f5d77d8c7 Do not rely on the underlying type of time_t in date(1) and touch(1)
Use LLONG_MAX unconditionally.  In practice this only causes trouble
with systems that are not 2038 ready.
2015-02-08 23:45:03 +00:00
FRIGN
d6b3890af6 Add r-flag to touch(1), refactor manpage and code
and mark it as finished in README.
2015-02-09 00:41:57 +01:00
FRIGN
49ed53b46c Reformat README 2015-02-09 00:20:33 +01:00
FRIGN
1b4ba2b303 Remove wchar.h from unexpand(1)
not needed any more.
2015-02-09 00:20:02 +01:00
FRIGN
1004778757 Update TODO with current roadmap 2015-02-08 23:28:00 +01:00
FRIGN
5699d5fb64 Refactor tar(1) manpage
and mark it as finished in the README.
Specifically, add a small section on the compression flags, which
are basically an infected GNU limb which should be removed from
the face of the earth as soon as possible.
2015-02-08 23:16:27 +01:00