Add mandoc-manpage for sleep(1) and refactor the code a bit
and mark it as finished in README.
This commit is contained in:
parent
dc7f392339
commit
329936053b
2
README
2
README
|
@ -58,7 +58,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
|
||||||
=* rm yes (-i)
|
=* rm yes (-i)
|
||||||
=* rmdir yes none
|
=* rmdir yes none
|
||||||
= setsid non-posix none
|
= setsid non-posix none
|
||||||
= sleep yes none
|
=* sleep yes none
|
||||||
sort no -m, -o, -d, -f, -i
|
sort no -m, -o, -d, -f, -i
|
||||||
split yes none
|
split yes none
|
||||||
= sponge non-posix none
|
= sponge non-posix none
|
||||||
|
|
32
sleep.1
32
sleep.1
|
@ -1,11 +1,21 @@
|
||||||
.TH SLEEP 1 sbase\-VERSION
|
.Dd January 30, 2015
|
||||||
.SH NAME
|
.Dt SLEEP 1 sbase\-VERSION
|
||||||
sleep \- wait for a number of seconds
|
.Sh NAME
|
||||||
.SH SYNOPSIS
|
.Nm sleep
|
||||||
.B sleep
|
.Nd wait for a number of seconds
|
||||||
.I seconds
|
.Sh SYNOPSIS
|
||||||
.SH DESCRIPTION
|
.Nm sleep
|
||||||
.B sleep
|
.Ar num
|
||||||
waits until the given number of seconds have elapsed.
|
.Sh DESCRIPTION
|
||||||
.SH SEE ALSO
|
.Nm
|
||||||
.IR sleep (3)
|
waits for
|
||||||
|
.Ar num
|
||||||
|
seconds to elapse.
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr sleep 3
|
||||||
|
.Sh STANDARDS
|
||||||
|
The
|
||||||
|
.Nm
|
||||||
|
utility is compliant with the
|
||||||
|
.St -p1003.1-2008
|
||||||
|
specification.
|
||||||
|
|
4
sleep.c
4
sleep.c
|
@ -7,13 +7,13 @@
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
eprintf("usage: %s seconds\n", argv0);
|
eprintf("usage: %s num\n", argv0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
unsigned int seconds;
|
unsigned long seconds;
|
||||||
|
|
||||||
ARGBEGIN {
|
ARGBEGIN {
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user