Commit Graph

656 Commits

Author SHA1 Message Date
sin
da715252b3 Add license heading at the top in expr.c 2014-11-16 12:57:54 +00:00
sin
15097f6ab3 Don't use C++ type comments 2014-11-16 12:54:47 +00:00
Evan Gates
6240d26beb new expr using shunting-yard instead of recursive descent (this time with tabs) 2014-11-16 12:52:48 +00:00
sin
67fcc79046 Use queue.h in grep(1) 2014-11-16 12:39:15 +00:00
Hiltjo Posthuma
865869fb28 grep: add -H flag 2014-11-16 11:23:18 +00:00
FRIGN
e17b9cdd0a Convert codebase to use emalloc.c utility-functions
This also definitely increases readability and makes OOM-conditions
more consistent.
2014-11-16 10:22:39 +00:00
sin
045fc62028 Group related decls together in util.h 2014-11-14 18:13:26 +00:00
sin
2982d88533 Import ealloc.c from ubase 2014-11-14 18:10:05 +00:00
sin
35d467d971 Add make to TODO 2014-11-14 17:59:51 +00:00
sin
3de142ba70 Delete dist when cleaning 2014-11-14 14:41:05 +00:00
sin
300eedc50a Add README and TODO to dist target 2014-11-14 11:58:42 +00:00
FRIGN
7fc5856e64 Tweak NULL-pointer checks
Use !p and p when comparing pointers as opposed to explicit
checks against NULL.  This is generally easier to read.
2014-11-14 10:54:30 +00:00
FRIGN
ec8246bbc6 Un-boolify sbase
It actually makes the binaries smaller, the code easier to read
(gems like "val == true", "val == false" are gone) and actually
predictable in the sense of that we actually know what we're
working with (one bitwise operator was quite adventurous and
should now be fixed).

This is also more consistent with the other suckless projects
around which don't use boolean types.
2014-11-14 10:54:20 +00:00
FRIGN
7d2683ddf2 Sort includes and more cleanup and fixes in util/ 2014-11-14 10:54:10 +00:00
Evan Gates
0810c61154 add -D_DEFAULT_SOURCE to placate gcc 2014-11-14 10:37:52 +00:00
sin
ee55fbe9e9 Just make $(HDR) a prereq for $(OBJ)
The result is always correct but it might do redundant builds.
Not really an issue as sbase builds very fast.  The alternative is
to track the header deps manually but this is already incomplete and
unlikely to be kept up to date.
2014-11-13 18:28:18 +00:00
sin
2c7516c716 Sort HDR in Makefile 2014-11-13 18:21:19 +00:00
FRIGN
eee98ed3a4 Fix coding style
It was about damn time. Consistency is very important in such a
big codebase.
2014-11-13 18:08:43 +00:00
sin
e35d9e62a5 Just use HOST_NAME_MAX in hostname(1)
Using sysconf() + malloc() is overkill.
2014-11-13 17:22:02 +00:00
sin
44b3ea8f76 Use _exit() instead of return if exec* fails 2014-11-13 17:06:41 +00:00
sin
2869adf458 Update TODO 2014-11-13 16:33:47 +00:00
sin
519a4f8105 Don't overwrite the line buffer when we hit EOF on one of the files in comm(1) 2014-11-13 16:01:53 +00:00
sin
d208659414 Add "-" support to comm(1) 2014-11-13 16:01:44 +00:00
sin
49c91462b3 Undef MIN/MAX in case they are defined somewhere else 2014-11-13 16:01:34 +00:00
sin
7ffe164106 Modify argv[0] in place 2014-11-13 16:01:22 +00:00
sin
6449db8691 Make both arguments to cmp(1) mandatory and handle "-" properly 2014-11-13 16:01:10 +00:00
sin
dfd0e6e77d Add a conformance table in the README
We should investigate the current state of the tools one by one
and mark out those that are complete and POSIX conformant.
2014-11-13 14:59:41 +00:00
sin
9f6dd58538 Remove unneeded statement 2014-11-13 14:56:43 +00:00
sin
f9a7a7e59f Fix argument naming in dirname(1) 2014-11-13 14:56:34 +00:00
sin
a7ad11ed5e Fix overflow in basename(1) 2014-11-13 14:56:25 +00:00
sin
c59894bd5c Implement cat -u and report correct exit condition 2014-11-13 14:56:15 +00:00
sin
5773a8f22b Implement concat() using read(2) and write(2)
This forces the data to be read as soon as they are available
and a simple cat(1) when stdin is referring to a tty works as
expected.
2014-11-13 14:56:06 +00:00
sin
a8c31586c5 Revert "config.mk: make cc the default $CC"
This reverts commit d2b527e369685606f812233a24dab12188d8930c.
2014-11-11 18:17:26 +00:00
sin
63f9f1ac14 Add special signal to the sigs table instead 2014-11-11 17:43:10 +00:00
sin
3ffe690384 Handle the special-case signal 0 and "0" properly 2014-11-11 17:40:26 +00:00
sin
f06ada4592 Simplify logic in kill(1) 2014-11-11 17:31:42 +00:00
sin
e4e47a617e Handle "--" for -l and -s as well in kill(1) 2014-11-11 17:13:10 +00:00
sin
c0f540162f Die early if signal is invalid in -signum 2014-11-11 16:34:33 +00:00
sin
0967d2e278 Factor out check for WTERMSIG 2014-11-11 16:34:28 +00:00
sin
e0b0741ba1 Add name2sig() and simplify kill(1) 2014-11-11 16:29:01 +00:00
sin
88f26b222b Actually print usage if kill -l is invoked with more than 1 arg 2014-11-11 16:09:24 +00:00
sin
a81544a810 kill -l accepts at most 1 arg 2014-11-11 16:08:30 +00:00
sin
aee8535a71 Fix outdated comments 2014-11-11 15:55:31 +00:00
sin
23d1dc6a55 Update manpage and usage for kill(1) 2014-11-11 15:53:26 +00:00
sin
61046dd39b Remove redundant check in kill(1) 2014-11-11 15:40:58 +00:00
sin
a0e9050925 Implement XSI extensions -signal_name and -signal_number for kill(1) 2014-11-11 15:37:26 +00:00
sin
237673302d Make kill(1) POSIX conformant
* XSI extensions support is missing, -signal_name and -signal_number.
2014-11-11 15:08:58 +00:00
sin
0444d16475 Fix kill -l 2014-11-10 23:56:10 +00:00
Hiltjo Posthuma
603d86f276 config.mk: make cc the default $CC 2014-11-10 23:56:10 +00:00
Hiltjo Posthuma
6d410168b8 style fix: fix indentation (double) 2014-11-10 23:56:10 +00:00