Add symbol to mark NUL handling in each tool (and where it is missing)
The assumption of NUL-terminated strings is actually quite a good one in most cases. You don't have to worry about paths, because they may not contain NUL. Same applies to arguments passed to you. Unless you have to unescape, there is no way for you to receive a NUL. There are two important exceptions though, and it's important that we address them, or else we get unexpected behaviour: 1) All tools using unescape() have to be strict about delimlen. Else they end up for instance unescaping '\\0abc' to '\0abc', which in C's string-vision is an empty string. 2) All tools doing line wrenching and putting them out again as lines again. puts() will cut each line containing NULs off at the first occurence.
This commit is contained in:
parent
a88906b423
commit
b83916ca27
188
README
188
README
|
@ -8,104 +8,104 @@ The following tools are implemented:
|
||||||
|
|
||||||
'#' -> UTF-8 support, '=' -> Implicit UTF-8 support, '*' -> Finished,
|
'#' -> UTF-8 support, '=' -> Implicit UTF-8 support, '*' -> Finished,
|
||||||
'|' -> Audited, 'o' -> POSIX 2013 compliant, 'x' -> Non-POSIX,
|
'|' -> Audited, 'o' -> POSIX 2013 compliant, 'x' -> Non-POSIX,
|
||||||
'()' -> Petty flag
|
'0' -> NUL handling, '()' -> Petty flag
|
||||||
|
|
||||||
UTILITY MISSING
|
UTILITY MISSING
|
||||||
------- -------
|
------- -------
|
||||||
=*|o basename .
|
0=*|o basename .
|
||||||
=*|o cal .
|
0=*|o cal .
|
||||||
=*|o cat .
|
0=*|o cat .
|
||||||
=*|o chgrp .
|
0=*|o chgrp .
|
||||||
=*|o chmod .
|
0=*|o chmod .
|
||||||
=*|o chown .
|
0=*|o chown .
|
||||||
=*|x chroot .
|
0=*|x chroot .
|
||||||
=*|o cksum .
|
0=*|o cksum .
|
||||||
=*|o cmp .
|
0=*|o cmp .
|
||||||
#*|x cols .
|
#*|x cols .
|
||||||
=*|o comm .
|
=*|o comm .
|
||||||
=*|o cp (-i)
|
0=*|o cp (-i)
|
||||||
=*|x cron .
|
0=*|x cron .
|
||||||
#*|o cut .
|
#*|o cut .
|
||||||
=*|o date .
|
0=*|o date .
|
||||||
=*|o dirname .
|
0=*|o dirname .
|
||||||
=*|o du .
|
0=*|o du .
|
||||||
=*|o echo .
|
0=*|o echo .
|
||||||
o ed .
|
o ed .
|
||||||
=*|o env .
|
0=*|o env .
|
||||||
#*|o expand .
|
0#*|o expand .
|
||||||
#*|o expr .
|
0#*|o expr .
|
||||||
=*|o false .
|
0=*|o false .
|
||||||
= find .
|
0= find .
|
||||||
=* x flock .
|
0=* x flock .
|
||||||
#*|o fold .
|
#*|o fold .
|
||||||
=*|o getconf (-v)
|
0=*|o getconf (-v)
|
||||||
=*|o grep .
|
=*|o grep .
|
||||||
=*|o head .
|
=*|o head .
|
||||||
=*|x hostname .
|
0=*|x hostname .
|
||||||
=*|x install .
|
0=*|x install .
|
||||||
=* o join .
|
=* o join .
|
||||||
=*|o kill .
|
0=*|o kill .
|
||||||
=*|o link .
|
0=*|o link .
|
||||||
=*|o ln .
|
0=*|o ln .
|
||||||
=*|o logger .
|
=*|o logger .
|
||||||
=*|o logname .
|
0=*|o logname .
|
||||||
#* o ls (-C, -k, -m, -p, -s, -x)
|
0#* o ls (-C, -k, -m, -p, -s, -x)
|
||||||
=*|x md5sum .
|
0=*|x md5sum .
|
||||||
=*|o mkdir .
|
0=*|o mkdir .
|
||||||
=*|o mkfifo .
|
0=*|o mkfifo .
|
||||||
=*|x mktemp .
|
0=*|x mktemp .
|
||||||
=*|o mv (-i)
|
0=*|o mv (-i)
|
||||||
=*|o nice .
|
0=*|o nice .
|
||||||
#*|o nl .
|
#*|o nl .
|
||||||
=*|o nohup .
|
0=*|o nohup .
|
||||||
=*|o od .
|
0=*|o od .
|
||||||
#* o pathchk .
|
0#* o pathchk .
|
||||||
#*|o paste .
|
#*|o paste .
|
||||||
=*|x printenv .
|
0=*|x printenv .
|
||||||
#*|o printf .
|
0#*|o printf .
|
||||||
=*|o pwd .
|
0=*|o pwd .
|
||||||
=*|x readlink .
|
0=*|x readlink .
|
||||||
=*|o renice .
|
0=*|o renice .
|
||||||
=*|o rm (-i)
|
0=*|o rm (-i)
|
||||||
=*|o rmdir .
|
0=*|o rmdir .
|
||||||
# sed .
|
# sed .
|
||||||
=*|x seq .
|
0=*|x seq .
|
||||||
=*|x setsid .
|
0=*|x setsid .
|
||||||
=*|x sha1sum .
|
0=*|x sha1sum .
|
||||||
=* x sha224sum .
|
0=* x sha224sum .
|
||||||
=*|x sha256sum .
|
0=*|x sha256sum .
|
||||||
=* x sha238sum .
|
0=* x sha238sum .
|
||||||
=*|x sha512sum .
|
0=*|x sha512sum .
|
||||||
=* x sha512-224sum .
|
0=* x sha512-224sum .
|
||||||
=* x sha512-256sum .
|
0=* x sha512-256sum .
|
||||||
=*|o sleep .
|
0=*|o sleep .
|
||||||
#*|o sort .
|
#*|o sort .
|
||||||
=*|o split .
|
0=*|o split .
|
||||||
=*|x sponge .
|
0=*|x sponge .
|
||||||
#*|o strings .
|
0#*|o strings .
|
||||||
=*|x sync .
|
0=*|x sync .
|
||||||
=*|o tail .
|
=*|o tail .
|
||||||
=*|x tar .
|
0=*|x tar .
|
||||||
=*|o tee .
|
0=*|o tee .
|
||||||
=*|o test .
|
0=*|o test .
|
||||||
=*|x tftp .
|
0=*|x tftp .
|
||||||
=*|o time .
|
0=*|o time .
|
||||||
=*|o touch .
|
0=*|o touch .
|
||||||
#*|o tr .
|
0#*|o tr .
|
||||||
=*|o true .
|
0=*|o true .
|
||||||
=* o tsort .
|
0=* o tsort .
|
||||||
=*|o tty .
|
0=*|o tty .
|
||||||
=*|o uname .
|
0=*|o uname .
|
||||||
#*|o unexpand .
|
0#*|o unexpand .
|
||||||
=*|o uniq .
|
=*|o uniq .
|
||||||
=*|o unlink .
|
0=*|o unlink .
|
||||||
=*|o uudecode .
|
0=*|o uudecode .
|
||||||
=*|o uuencode .
|
0=*|o uuencode .
|
||||||
#*|o wc .
|
0#*|o wc .
|
||||||
=*|x which .
|
0=*|x which .
|
||||||
=*|x whoami .
|
0=*|x whoami .
|
||||||
=*|o xargs (-p)
|
=*|o xargs (-p)
|
||||||
=*|x yes .
|
0=*|x yes .
|
||||||
|
|
||||||
The complement of sbase is ubase[1] which is Linux-specific and
|
The complement of sbase is ubase[1] which is Linux-specific and
|
||||||
provides all the non-portable tools. Together they are intended to
|
provides all the non-portable tools. Together they are intended to
|
||||||
|
|
Loading…
Reference in New Issue
Block a user