Add man pages
This commit is contained in:
parent
abac38e6d6
commit
6c1b7385c2
6
Makefile
6
Makefile
|
@ -2,12 +2,15 @@ DESTDIR ?=
|
|||
PREFIX ?= /usr/local
|
||||
EXEC_PREFIX ?= $(PREFIX)
|
||||
BINDIR ?= $(EXEC_PREFIX)/bin
|
||||
DATAROOTDIR ?= $(PREFIX)/share
|
||||
MANDIR ?= $(DATAROOTDIR)/man
|
||||
|
||||
CFLAGS += -Os -g -Wall -Wextra -pedantic
|
||||
CPPFLAGS +=
|
||||
LDFLAGS +=
|
||||
|
||||
BINS := plainhex plainunhex
|
||||
MAN1S := plainhex.1 plainunhex.1
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
@ -24,8 +27,9 @@ plainunhex: plainunhex.o
|
|||
.c.o:
|
||||
$(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
|
||||
|
||||
install: $(BINS)
|
||||
install: $(BINS) $(MAN1S)
|
||||
install -D -m 755 -t '$(DESTDIR)$(BINDIR)' $(BINS)
|
||||
install -D -m 644 -t '$(DESTDIR)$(MANDIR)/man1' $(MAN1S)
|
||||
|
||||
uninstall:
|
||||
cd $(DESTDIR)$(BINDIR) && rm $(BINS)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
.Dd Aug 17, 2019
|
||||
.Dt PLAINHEX 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm plainhex
|
||||
.Nd most basic possible hexdump
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
reads bytes from stdin and writes them hex-encoded to stdout.
|
||||
There is no line-wrapping, padding, or field separation.
|
||||
The hexdump is ended with a single newline.
|
||||
.Sh EXIT STATUS
|
||||
.Ex -std
|
||||
.Sh SEE ALSO
|
||||
.Xr plainunhex 1
|
|
@ -0,0 +1,18 @@
|
|||
.Dd Aug 17, 2019
|
||||
.Dt PLAINUNHEX 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm plainunhex
|
||||
.Nd most basic possible hexundump
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
reads pairs of hex digits from the stdin and writes the corresponding bytes
|
||||
to stdout.
|
||||
Both lowercase and uppercase hex digits are supported.
|
||||
Everything that is not a hex digit is ignored.
|
||||
.Sh EXIT STATUS
|
||||
.Ex -std
|
||||
.Sh SEE ALSO
|
||||
.Xr plainhex 1
|
Loading…
Reference in New Issue