Skip to content

Commit

Permalink
remove autotools and gawk
Browse files Browse the repository at this point in the history
this was discuted in the first issue as

* we don't need both of them
* is makes everything complicated
  • Loading branch information
eiro committed Nov 20, 2024
1 parent e74ea9a commit aa09a7b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 78 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PREFIX ?= /usr/local

all:
# nothing to do.
# echo to install dformat in /bin, type
#
# make install PREFIX=/
# default prefix is ${PREFIX}
#

install: dformat; cp $< ${PREFIX}/bin
1 change: 0 additions & 1 deletion Makefile.am

This file was deleted.

61 changes: 17 additions & 44 deletions README
Original file line number Diff line number Diff line change
@@ -1,46 +1,19 @@
* NAME

dformat.awk - A Program for Typesetting Data Formats.

* DESCRIPTION
Usable version of the code described in the article

#+srcname: example
#+begin_src sh
cat > structure <<'EOF'
.begin dformat
style bitwid .3
PDP-8 Instr
0-2 Op code
3 Indirect Bit
4 Page-Zero Bit
5-11 Page Address
.end
EOF

dformat.awk < structure > structure.pic
pic structure.ms | groff -ms -T ps > structure.ps

#+end_src

* VERSION

This refers to version 0.1.
DFORMAT --
CSTR #142, Jon L. Bentley, Bell Labs, April 1988.
142.ps.gz

* USAGE

Check internet for the =142.ps.gz= file which is the official manual.
The title is "dformat - A Program for Typesetting Data Formats." by
Jon L. Bentley.

* AUTHOR

Jon L. Bentley at Bell Labs in April 1988.

* COPYRIGHT

Unsure of the copyright, not sure to have the right to put it in my
github repository. Whatever ...

# DFORMAT --
# CSTR #142, Jon L. Bentley, Bell Labs, April 1988.
# 142.ps.gz
# USAGE

* copy `dformat` in your `$PATH` or in your paper directory
* dformat is an awk script. both examples are working

< eg/pdp8 dformat | groff -epTpdf > pdf8.pdf
dformat eg/pdp8 | groff -epTpdf > pdf8.pdf

# TODO

* the git history in the AUTHORS
* fix the licence issue. GPL removed as there was no agreement of the original author
* better Make install and decent man page
3 changes: 0 additions & 3 deletions autogen.sh

This file was deleted.

23 changes: 0 additions & 23 deletions configure.ac

This file was deleted.

9 changes: 2 additions & 7 deletions src/dformat.awk → dformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
gawk '
#!/bin/awk -f

function error(s) { print "dformat error: " s " near input line " NR | "cat 1>&2" }

BEGIN { s = "recht 0.3 addrht 0.055 recspread 0.15 "
Expand Down Expand Up @@ -105,9 +106,3 @@ $1 == "pic" { $1 = ""; print $0; next }
}
}
END { if (inlang) error("eof inside begin/end") }
' $*

# See :
# DFORMAT -- A Program for Typesetting Data Formats.
# CSTR #142, Jon L. Bentley, Bell Labs, April 1988.
# 142.ps.gz
8 changes: 8 additions & 0 deletions eg/pdp8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.begin dformat
style bitwid .3
PDP-8 Instr
0-2 Op code
3 Indirect Bit
4 Page-Zero Bit
5-11 Page Address
.end

0 comments on commit aa09a7b

Please sign in to comment.