Commit Graph

867 Commits

Author SHA1 Message Date
sin
93c8aaf925 Print header in head(1) 2014-11-20 22:52:05 +00:00
sin
2a84dd5076 Respect exit status in head(1) 2014-11-20 22:39:56 +00:00
sin
8767e4b320 Properly handle multiline patterns in grep(1)
We should be POSIX compliant now.
2014-11-20 19:56:44 +00:00
sin
b6a41b688b If we have a match any pattern also match against blank lines 2014-11-20 18:20:10 +00:00
sin
f4d8ff9598 Properly handle -F and -i 2014-11-20 17:40:47 +00:00
sin
64aac9b504 Just use int for mode 2014-11-20 17:26:57 +00:00
sin
fe48fbc4e1 Break out on first match 2014-11-20 17:03:09 +00:00
sin
a1844fae70 Implement grep -f 2014-11-20 16:58:32 +00:00
sin
5ba4f37ec3 Handle null BRE/ERE and do not add a pattern to the list if it already exists 2014-11-20 16:46:57 +00:00
sin
7627a5069c Implement grep -x 2014-11-20 14:47:47 +00:00
sin
e34ce44192 Test directly, no need for intermediate assignment 2014-11-20 14:37:59 +00:00
sin
6866bcdec8 Implement grep -F 2014-11-20 14:35:55 +00:00
sin
728f36aa77 Implement grep -s 2014-11-20 14:14:41 +00:00
sin
5197affac5 Remove col(1)
Not quite necessary to have this in sbase at the moment.  We can do
a clean implementation when required.

This implementation also has some bugs that they have been fixed
in OpenBSD -current but I am too lazy to backport (we also had local
changes to col(1)).

printf(1) as imported from OpenBSD will stay for now because I need
it for booting my system.
2014-11-20 13:57:52 +00:00
sin
0d7c2351b4 Remove csplit(1)
Get rid of it for now as it is not really widely used.  We can do
a simple implementation when time comes.

Remove the table from README because it is not easy to edit unless
you use emacs.
2014-11-20 13:52:18 +00:00
FRIGN
1436518f9d Use < 0 instead of == -1 2014-11-19 20:09:29 +00:00
sin
9b38355ae8 Break out if stat fails on the source file in cp(1)
Save one level of indentation.
2014-11-19 15:08:57 +00:00
sin
2c42905f63 Make libutf.a and libutil.a different 2014-11-19 10:51:29 +00:00
sin
4399f35448 Fix two more instances where the check for "-" is insufficient 2014-11-18 21:58:50 +00:00
Evan Gates
148e6e3b79 read stdin if arg is exactly "-" not just begins with '-' 2014-11-18 21:53:37 +00:00
Evan Gates
84b08427a1 remove agetline 2014-11-18 21:05:28 +00:00
Evan Gates
cca0522872 clear suffix list then add only .o and .c in that order to avoid use of builtin .c inference rule skipping .c.o 2014-11-18 20:18:05 +00:00
sin
409ec7194f Add install(1) to TODO 2014-11-18 19:55:11 +00:00
sin
fda3ed9a56 Remove .POSIX from Makefile 2014-11-18 19:28:04 +00:00
sin
027052f5e5 Rename util/ to libutil/ 2014-11-17 16:48:34 +00:00
sin
ee1e90ebdc renice(1) rework 2014-11-17 16:33:38 +00:00
sin
4dc2b783b8 Nuke some fprintf() calls and replace with weprintf() 2014-11-17 16:33:24 +00:00
sin
af8e38f5fa Fix some error messages
There's many more to go.
2014-11-17 16:22:01 +00:00
sin
cb7cbde722 Add compat.h 2014-11-17 15:46:28 +00:00
sin
56709a2414 Import libutf from http://git.suckless.org/libutf 2014-11-17 15:46:01 +00:00
FRIGN
85df198b59 Refactor expr.c
Finish up what has been begun.
2014-11-17 15:05:49 +00:00
sin
166bc3052e Use PRIO_{MIN,MAX} instead of NZERO
Some systems do not define NZERO.  NZERO seems to be an XSI extension
and PRIO_{MIN,MAX} is not specified by POSIX but most relevant systems
define it.
2014-11-17 15:02:51 +00:00
sin
bd3cf55b54 Define HOST_NAME_MAX if necessary
Some systems do not provide this, namely FreeBSD and NetBSD.
2014-11-17 14:50:40 +00:00
sin
ba70777b56 Remove binlib and bin from PHONY 2014-11-17 14:46:52 +00:00
sin
74ac827587 Require GNU make to build sbase
We seem to have problems building individual tools across various
make implementations.  If anyone can step up and fix this we will
remove the dependency on GNU make.
2014-11-17 13:54:24 +00:00
sin
90507652c0 Staticise globals 2014-11-17 13:39:11 +00:00
sin
a84cbe9e1c Avoid messed up output because of trailing spaces 2014-11-17 13:22:54 +00:00
sin
ba89dc565f Add .PHONY targets 2014-11-17 13:02:32 +00:00
sin
a6be4e7a4c Only unlink the destination file if -f has been specified 2014-11-17 12:33:08 +00:00
sin
0d0624b855 Use $(RANLIB) in Makefile 2014-11-17 12:24:03 +00:00
sin
2ee3ae5994 Use LIB, LIBSRC and LIBOBJ and derive SRC, OBJ and MAN from BIN 2014-11-17 12:14:25 +00:00
sin
afa2e6ec54 Use SLIST_* instead of TAILQ_* in grep(1)
The order of evaluation is unspecified by POSIX so we do not need
to process the patterns in-order.
2014-11-17 10:59:51 +00:00
sin
de4a36957e Silence stupid warnings when building sbase-box 2014-11-17 10:52:24 +00:00
sin
4a97e0b526 List libutil.a first to be a bit more clear 2014-11-17 10:50:45 +00:00
sin
1b0d2c1ab3 Make clean more verbose 2014-11-17 10:39:02 +00:00
sin
e1c044e298 Do not append CPPFLAGS to CFLAGS 2014-11-17 10:38:37 +00:00
sin
2fd6e769dd Rename util.a to libutil.a 2014-11-17 10:37:07 +00:00
sin
9a9d6bb0dc Make build process more verbose 2014-11-17 10:36:39 +00:00
FRIGN
abdd0671f7 Refactor expr.c 2014-11-17 10:05:19 +00:00
Hiltjo Posthuma
f6552e3669 grep: add -h (inverse of -H) aswell 2014-11-17 10:05:10 +00:00