Skip to content

Commit 86ac7f1

Browse files
committed
Tool to add or remove DEC-style line numbers.
1 parent e0849ea commit 86ac7f1

13 files changed

+392
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ dump
2929
check
3030
constantinople
3131
dumper
32+
linum

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ OBJS = pdp10-opc.o info.o dis.o symbols.o \
1616
UTILS = cat36 itsarc magdmp magfrm dskdmp dump \
1717
macdmp macro-tapes tape-dir harscntopbm palx cross \
1818
ipak kldcp klfedr scrmbl unscr tvpic tito dart od10 \
19-
constantinople dumper
19+
constantinople dumper linum
2020

2121
all: dis10 $(UTILS) check
2222

@@ -80,6 +80,9 @@ dumper: dumper.o $(OBJS) libwords.a
8080
od10: od10.o $(OBJS) libwords.a
8181
$(CC) $(CFLAGS) $^ -o $@
8282

83+
linum: linum.o $(OBJS) libwords.a
84+
$(CC) $(CFLAGS) $^ -o $@
85+
8386
constantinople: constantinople.o $(OBJS) libfiles.a libwords.a
8487
$(CC) $(CFLAGS) $^ -o $@
8588

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ is elsewhere: http://github.com/larsbrinkhoff/mldev
2424
- List or extract files from a TITO tape (Tymshare TYMCOM-X).
2525
- List, extract, or write files on a DART tape (SAIL WAITS).
2626
- Write files on a DUMPER tape (BBN TENEX, DEC TOPS-20).
27+
- Add or delete DEC-style text file line numbers.
2728

2829
## File formats supported.
2930

check.sh

+11
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ test_dump() {
5353
compare "$1.dump"
5454
}
5555

56+
test_linum() {
57+
./linum -Wascii "$1" samples/"$2" > out/"$2$1"
58+
compare "$2$1"
59+
}
60+
5661
test_dis10 ts.obs
5762
test_dis10 ts.ksfedr
5863
test_dis10 ts.name "-Sall"
@@ -96,4 +101,10 @@ test_dump l.bin "-Fpalx -Xoct -Oraw"
96101
test_dump logo.ptp "-Fhex -Xoct -Oraw"
97102
test_dump supdup.bin "-Wits -Fcross -Xoct -Oraw"
98103

104+
test_linum -a linum-1.txt
105+
test_linum -df linum-1.txt
106+
test_linum -af linum-2.txt
107+
test_linum -df linum-2.txt
108+
test_linum -d linum-3.txt
109+
99110
exit 0

0 commit comments

Comments
 (0)