Compare commits

...

2 Commits

Author SHA1 Message Date
Juhani Krekelä 18e786bf4d Add basic README 2019-08-17 20:43:00 +03:00
Juhani Krekelä 6c1b7385c2 Add man pages 2019-08-17 20:42:30 +03:00
4 changed files with 41 additions and 1 deletions

View File

@ -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)

1
README Normal file
View File

@ -0,0 +1 @@
Most basic possible hex(un)dump

17
plainhex.1 Normal file
View File

@ -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

18
plainunhex.1 Normal file
View File

@ -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