FRIGN 79e45395e5 Refactor cmp(1) code and manpage
The algorithm had some areas which had potential for improvement.
This should make cmp(1) faster.
There have been changes to behaviour as well:

1) If argv[0] and argv[1] are the same, cmp(1) returns Same.
2) POSIX specifies the format of the difference-message to be:
      "%s %s differ: char %d, line %d\n", file1, file2,
      <byte number>, <line number>
   However, as cmp(1) operates on bytes, not characters, I changed
   it to
      "%s %s differ: byte %d, line %d\n", file1, file2,
      <byte number>, <line number>
   This is one example where the standard just keeps the old format
   for backwards-compatibility. As this is harmful, this change
   makes sense in the sense of consistentcy (and because we take
   the difference of char and byte very seriously in sbase, as
   opposed to GNU coreutils).

The manpage has been annotated, reflecting the second change, and
sections shortened where possible.
Thus I marked cmp(1) as finished in README.
2015-02-07 21:05:33 +01:00
2015-02-01 20:52:28 +01:00
2015-01-30 16:01:37 +01:00
2015-02-01 20:52:28 +01:00
2015-02-01 20:52:28 +01:00
2015-01-17 21:59:37 +00:00
2015-02-01 20:52:28 +01:00
2014-11-19 20:09:29 +00:00
2015-01-31 23:54:51 +01:00
2015-01-31 23:54:51 +01:00
2015-02-07 21:05:33 +01:00
2015-02-07 21:05:33 +01:00
2015-02-01 20:52:28 +01:00
2014-11-17 15:46:28 +00:00
2015-02-01 20:52:28 +01:00
2014-12-08 10:02:56 +00:00
2015-02-06 15:43:23 +01:00
2014-12-16 11:04:07 +00:00
2014-03-23 18:02:39 +00:00
2015-02-01 21:28:17 +01:00
2015-01-29 21:52:44 +01:00
2015-02-01 20:52:28 +01:00
2015-02-01 20:52:28 +01:00
2015-01-23 23:49:24 +01:00
2015-01-24 00:22:06 +01:00
2015-02-01 21:28:17 +01:00
2015-01-25 18:31:25 +00:00
2014-10-03 00:03:08 +01:00
2015-01-30 12:45:54 +01:00
2015-02-01 20:52:28 +01:00
2015-01-31 15:19:42 +01:00
2015-02-01 20:52:28 +01:00
2015-02-01 20:52:28 +01:00
2014-11-13 18:08:43 +00:00
2015-02-01 20:52:28 +01:00
2014-11-14 10:54:20 +00:00
2015-01-02 13:14:41 +00:00
2015-01-25 22:44:47 +01:00
2015-01-31 15:23:59 +01:00
2014-12-16 20:14:40 +00:00
2014-11-13 18:08:43 +00:00
2015-01-20 16:50:37 +00:00
2015-02-03 10:08:26 +00:00
2015-01-31 23:54:51 +01:00
2015-01-31 23:54:51 +01:00
2015-02-01 00:23:38 +01:00
2014-11-13 18:08:43 +00:00
2015-01-30 11:48:33 +00:00
2015-01-30 16:52:44 +01:00
2015-02-01 20:52:28 +01:00
2015-01-28 23:55:57 +01:00
2015-01-29 21:52:44 +01:00
2015-02-01 00:23:38 +01:00
2014-11-16 13:17:06 +00:00
2014-09-28 15:12:15 +01:00
2014-11-19 20:09:29 +00:00
2014-11-16 12:39:15 +00:00
2015-02-07 21:05:33 +01:00
2015-01-30 16:52:44 +01:00
2015-01-30 12:45:54 +01:00
2015-02-01 20:52:28 +01:00
2015-02-01 00:47:32 +01:00
2015-02-01 20:52:28 +01:00
2014-11-17 13:39:11 +00:00
2013-07-20 13:20:16 -04:00
2015-02-01 20:52:28 +01:00
2014-11-17 13:39:11 +00:00
2013-08-04 11:00:34 -04:00
2015-02-01 20:52:28 +01:00
2014-11-17 13:39:11 +00:00
2015-02-01 21:46:58 +01:00
2015-02-01 20:52:28 +01:00
2015-02-01 16:30:12 +01:00
2015-02-01 20:52:28 +01:00
2014-11-16 13:20:36 +00:00
2015-02-01 21:28:17 +01:00
2014-11-13 18:08:43 +00:00
2015-02-01 20:52:28 +01:00
2015-01-22 21:35:36 +00:00
2014-11-14 10:54:20 +00:00
2014-12-21 00:01:58 +00:00
2015-02-01 20:52:28 +01:00
2014-10-03 00:03:08 +01:00
2015-02-01 20:52:28 +01:00
2014-11-14 10:54:20 +00:00
2015-02-01 20:52:28 +01:00
2015-01-30 16:52:44 +01:00
2015-02-01 20:52:28 +01:00
2014-11-18 21:05:28 +00:00
2015-02-01 20:52:28 +01:00
2014-11-19 20:09:29 +00:00
2015-01-10 14:26:30 +00:00
2015-01-30 16:52:44 +01:00
2015-02-01 20:52:28 +01:00
2014-11-18 21:05:28 +00:00
2015-02-01 20:52:28 +01:00
2014-11-13 18:08:43 +00:00
2015-02-01 03:01:11 +01:00
2015-02-06 19:46:45 +00:00
2015-02-06 15:43:46 +01:00
2014-11-19 20:09:29 +00:00
2015-02-01 01:27:05 +00:00

sbase - suckless unix tools
===========================

sbase  is a  collection of  unix  tools that  are inherently  portable
across UNIX and UNIX-like systems.

The following tools are implemented ('*' == finished, '#' == UTF-8 support,
'=' == implicit UTF-8 support):

   UTILITY         POSIX 2008 COMPLIANT            MISSING OPTIONS
   -------         --------------------            ---------------
=* basename        yes                             none
=* cal             yes                             none
=* cat             yes                             none
=  chgrp           no                              -h, -H, -L, -P
=* chmod           yes                             none
=  chown           no                              -h, -H, -L, -P
=* chroot          non-posix                       none
=* cksum           yes                             none
=* cmp             yes                             none
#* cols            non-posix                       none
=* comm            yes                             none
=  cp              no                              -H, (-i), -L
=* cron            non-posix                       none
#* cut             yes                             none
=* date            yes                             none
=* dirname         yes                             none
=  du              no                              -H, -L, (-x)
=* echo            yes                             none
=* env             yes                             none
#* expand          yes                             none
=* expr            yes                             none
=* false           yes                             none
#* fold            yes                             none
=* grep            yes                             none
=* head            yes                             none
=* hostname        non-posix                       none
=* kill            yes                             none
=* link            yes                             none
=* ln              yes                             none
=* logger          yes                             none
=* logname         yes                             none
=  ls              no                              -C, -R, -q, -u
=* md5sum          non-posix                       none
=* mkdir           yes                             none
=* mkfifo          yes                             none
=* mktemp          non-posix                       none
=* mv              yes                             (-i)
=* nice            yes                             none
=  nl              no                              -d, -f, -h, -l, -n, -p, -v, -w
=* nohup           yes                             none
#* paste           yes                             none
=* printenv        non-posix                       none
   printf          stolen                          stolen
=* pwd             yes                             none
=  readlink        non-posix                       -e, -m
=* renice          yes                             none
=* rm              yes                             (-i)
=* rmdir           yes                             none
=* setsid          non-posix                       none
=* sleep           yes                             none
   sort            no                              -m, -o, -d, -f, -i
=* split           yes                             none
=  sponge          non-posix                       none
   strings         no                              -a, -n, -t
=  sync            non-posix                       none
=  tail            no                              -c, -f
=  tar             non-posix                       none
=* tee             yes                             none
   test            yes                             none
=  touch           no                              -r
#* tr              yes                             none
=* true            yes                             none
=  tty             yes                             none
=  uname           yes                             none
#  unexpand        yes                             none
=  uniq            no                              -f, -s
=  unlink          yes                             none
=  uudecode        no                              -o
=  uuencode        no                              -m
   seq             non-posix                       none
=  sha1sum         non-posix                       none
=  sha256sum       non-posix                       none
=  sha512sum       non-posix                       none
#* wc              yes                             none
=  xargs           no                              -I, -L, -p, -s, -t, -x
=* yes             non-posix                       none

The  complement of  sbase  is  ubase[1] which  is  Linux-specific  and
provides all  the non-portable tools.   Together they are  intended to
form a base system similar to busybox but much smaller and suckless.

Building
--------

To  build sbase,  simply  type  make.  You  may  have  to fiddle  with
config.mk depending on your system.

You  can  also  build  sbase-box,  which  generates  a  single  binary
containing  all  the  required  tools.    You  can  then  symlink  the
individual tools to sbase-box.

Ideally you will  want to statically link sbase.  If  you are on Linux
we recommend using musl-libc[2].

Portability
-----------

sbase has been  compiled on a variety of  different operating systems,
including Linux, *BSD, OSX, Haiku, Solaris, SCO OpenServer and others.

Various combinations of operating  systems and architectures have also
been built.

You can build sbase with gcc, clang, tcc, nwcc and pcc.

[1] http://git.suckless.org/ubase/
[2] http://www.musl-libc.org/
Description
Languages
C 79.5%
Roff 16%
Shell 1.9%
Awk 1.3%
Makefile 1.3%